|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @publishedPartner |
|
19 @released |
|
20 */ |
|
21 |
|
22 #ifndef MMTPFRAMEWORKCONFIG_H |
|
23 #define MMTPFRAMEWORKCONFIG_H |
|
24 |
|
25 #include <e32base.h> |
|
26 |
|
27 /** |
|
28 Defines the framework configurability parameter interface. |
|
29 |
|
30 The MTP framework implements a number of configurability parameters using a |
|
31 central repository. The initial set of configurability parameters are loaded |
|
32 from a compiled (binary) initialisation file. Read only access to the |
|
33 framework configurability data is available for reference purposes using this |
|
34 interface. Write access to these parameters is only available to the MTP |
|
35 framework. |
|
36 @publishedPartner |
|
37 @released |
|
38 */ |
|
39 class MMTPFrameworkConfig |
|
40 { |
|
41 public: |
|
42 |
|
43 /** |
|
44 Defines the framework configurability parameters. |
|
45 */ |
|
46 enum TParameter |
|
47 { |
|
48 /** |
|
49 This parameter defines the Device Friendly Name MTP device property |
|
50 value. It is implemented as a string and has a maximum length of 254 |
|
51 characters. The parameter value specified in the initialisation file |
|
52 may be overwritten in the course of MTP operational processing, if an |
|
53 MTP SetDevicePropValue specifying the Device Friendly Name device |
|
54 property is received. |
|
55 |
|
56 This parameter value can be retrieved as either @see TDes or @see HBufC |
|
57 values. |
|
58 */ |
|
59 EDeviceFriendlyName = 0x00000000, |
|
60 |
|
61 /** |
|
62 This parameter defines the Synchronization Partner MTP device property |
|
63 value. It is implemented as a string and has a maximum length of 254 |
|
64 characters. The parameter value specified in the initialisation file |
|
65 may be overwritten in the course of MTP operational processing, if an |
|
66 MTP SetDevicePropValue specifying the Synchronization Partner device |
|
67 property is received. |
|
68 |
|
69 This parameter value can be retrieved as either @see TDes or @see HBufC |
|
70 values. |
|
71 */ |
|
72 ESynchronizationPartnerName = 0x00000001, |
|
73 |
|
74 /** |
|
75 This parameter is reserved for future use. |
|
76 */ |
|
77 ERamDriveMetadataStorageEnable = 0x00000002, |
|
78 |
|
79 /** |
|
80 This parameter indicates if the framework will allocate MTP logical |
|
81 storage IDs. If set to ETrue, then the framework will allocates a |
|
82 single logical storage ID on each of the available Symbian OS file |
|
83 system drives as they become available. If set to EFalse then the |
|
84 framework will not allocate any MTP logical storage IDs, in which |
|
85 case the active data providers are responsible for doing so using |
|
86 the @see MMTPStorageMgr interface. |
|
87 |
|
88 This parameter value can be retrieved as an @see TBool value. |
|
89 */ |
|
90 ELogicalStorageIdsAllocationEnable = 0x00000003, |
|
91 |
|
92 /** |
|
93 This parameter specifies the Symbian OS file system drive which acts as |
|
94 the default MTP storage ID (0x00000000). It is implemented as an |
|
95 integer value which represents the default drive using a zero based |
|
96 numbering scheme (i.e. 0 represents the A drive, 25 represents the Z |
|
97 drive etc.) or a MTP storage ID(assigned by the MTP framework). |
|
98 |
|
99 This parameter value can be retrieved as an @see TUint value. |
|
100 */ |
|
101 EDefaultStorageDrive = 0x00000004, |
|
102 |
|
103 /** |
|
104 This parameter specifies the device's default MTP Object Format Code. |
|
105 This format is used when processing MTP operation which specify a |
|
106 default (0x00000000) ObjectFormatCode parameter (e.g. InitiateCapture, |
|
107 InitiateOpenCapture). |
|
108 |
|
109 This parameter value can be retrieved as an @see TUint value. |
|
110 */ |
|
111 EDefaultObjectFormatCode = 0x00000005, |
|
112 |
|
113 /** |
|
114 UID of the Stub SIS File |
|
115 This is used by the framework while loading the dataprovider. |
|
116 This parameter value can be retrieved as an @see TUint value. |
|
117 */ |
|
118 EPackageStubUID = 0x00000006, |
|
119 /** |
|
120 Implimentation UID of transport PlugIn with high priority. |
|
121 This is used when ETransportSwitchEnabled is enabled.when |
|
122 MTP client try to start a transport protocol while another |
|
123 one already exist, if the new one is equal to this parameter |
|
124 value, the previous protocol plugin will be stopped and the |
|
125 new transport protocol plugin will be started. |
|
126 |
|
127 This value can be retrieved as an @TDes value. |
|
128 */ |
|
129 ETransportHighPriorityUID = 0x00000007, |
|
130 |
|
131 /** |
|
132 Transport protocol implementation switch enable flag. |
|
133 If set to ETrue, the switch is allowed;if set to EFalse, |
|
134 the switch is not allowed. |
|
135 Refer to ETransportHighPriorityUID for more details. |
|
136 |
|
137 This value can be retrieved as an @see TBool value. |
|
138 */ |
|
139 ETransportSwitchEnabled = 0x00000008, |
|
140 |
|
141 /* |
|
142 * Reserved by MTP framework. |
|
143 * This parameter specifies the device default FunctionalID(128 bits, GUID), |
|
144 */ |
|
145 EDeviceDefaultFuncationalID = 0x00000010, |
|
146 |
|
147 /* |
|
148 * Reserved by MTP framework. |
|
149 * This parameter specifies the device current FunctionalID(128 bits, GUID), |
|
150 */ |
|
151 EDeviceCurrentFuncationalID = 0x00000011, |
|
152 |
|
153 /* |
|
154 * Reserved by MTP framework. |
|
155 * This parameter specifies the device default ModelID(128 bits, GUID), |
|
156 */ |
|
157 EDeviceDefaultModelID = 0x00000012, |
|
158 |
|
159 /* |
|
160 * Reserved by MTP framework. |
|
161 * This parameter specifies the device current ModelID(128 bits, GUID), |
|
162 */ |
|
163 EDeviceCurrentModelID = 0x00000013, |
|
164 |
|
165 /* |
|
166 * Reserved by MTP framework. |
|
167 * Indicate whether the MTP server has crashed or been abnormally down or not. |
|
168 * This parameter value can be retrieved as an @see TBool value. |
|
169 */ |
|
170 EAbnormalDown = 0x00000014, |
|
171 |
|
172 /** |
|
173 This parameter specifies the Symbian OS file system drives which are |
|
174 excluded from the set of MTP storages which are managed by the MTP |
|
175 framework. Any drive which is identified in this set will not be |
|
176 assigned a corresponding MTP storage ID value by the MTP framework. |
|
177 This parameter is implemented as an array of integer values each of |
|
178 which represent an excluded drive using a zero based numbering scheme |
|
179 (i.e. 0 represents the A drive, 25 represents the Z drive etc.) |
|
180 |
|
181 This parameter value can be retrieved as an @see RArray<TUint> value. |
|
182 */ |
|
183 EExcludedStorageDrives = 0x00010000 |
|
184 }; |
|
185 |
|
186 public: |
|
187 |
|
188 /** |
|
189 Provides the value of a descriptor configurability parameter. This should |
|
190 be used when the length of the parameter value is known not to exceed the |
|
191 capacity of the parameter value buffer. If the maximum parameter length is |
|
192 not known then the @see ValueL method should be used. |
|
193 @param aParam The identifier of the parameter value to be retrieved |
|
194 @param aValue The parameter value buffer to be filled. |
|
195 @leave One of the system wide error codes, if a processing failure occurs. |
|
196 */ |
|
197 virtual void GetValueL(TParameter aParam, TDes& aValue) const = 0; |
|
198 |
|
199 /** |
|
200 Provides the value of a descriptor configurability parameter. This should |
|
201 be used when the maximum length of the parameter value is not known. |
|
202 @param aParam The identifier of the parameter value to be retrieved. |
|
203 @return A pointer to a heap descriptor containing the parameter value. |
|
204 Ownership IS transferred. |
|
205 @leave One of the system wide error codes, if a processing failure occurs. |
|
206 */ |
|
207 virtual HBufC* ValueL(TParameter aParam) const = 0; |
|
208 |
|
209 /** |
|
210 Provides the value of an unsigned integer configurability parameter. |
|
211 @param aParam The identifier of the parameter value to be retrieved |
|
212 @param aValue The parameter value buffer to be filled. |
|
213 @leave One of the system wide error codes, if a processing failure occurs. |
|
214 */ |
|
215 virtual void GetValueL(TParameter aParam, TUint& aValue) const = 0; |
|
216 |
|
217 /** |
|
218 Provides the value of a boolean configurability parameter. |
|
219 @param aParam The identifier of the parameter value to be retrieved |
|
220 @param aValue The parameter value buffer to be filled. |
|
221 @leave One of the system wide error codes, if a processing failure occurs. |
|
222 */ |
|
223 virtual void GetValueL(TParameter aParam, TBool& aValue) const = 0; |
|
224 |
|
225 /** |
|
226 Provides the value of an unsigned integer array configurabilitt parameter. |
|
227 @param aParam The identifier of the parameter value to be retrieved |
|
228 @param aValue The parameter value buffer to be filled. |
|
229 @leave One of the system wide error codes, if a processing failure occurs. |
|
230 */ |
|
231 virtual void GetValueL(TParameter aParam, RArray<TUint>& aArray) const = 0; |
|
232 }; |
|
233 |
|
234 #endif // MMTPFRAMEWORKCONFIG_H |