|
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 MMTPDATAPROVIDERCONFIG_H |
|
23 #define MMTPDATAPROVIDERCONFIG_H |
|
24 |
|
25 #include <e32std.h> |
|
26 |
|
27 /** |
|
28 Defines the data provider configurability parameter interface. |
|
29 @publishedPartner |
|
30 @released |
|
31 */ |
|
32 class MMTPDataProviderConfig |
|
33 { |
|
34 public: |
|
35 |
|
36 /** |
|
37 Defines the data provider configurability parameters. |
|
38 */ |
|
39 enum TParameter |
|
40 { |
|
41 /** |
|
42 This parameter specifies the type of the data provider which in turn |
|
43 determines how it will be loaded. The set of valid parameter values is |
|
44 defined by the @see TMTPDataProviderType enumeration. |
|
45 |
|
46 This parameter value can be accessed using the @see UintValue API. |
|
47 */ |
|
48 EDataProviderType, |
|
49 |
|
50 /** |
|
51 This parameter specifies the highest major MTP protocol revision |
|
52 supported by the data provider. MTP protocol revision identifiers take |
|
53 the form N.N, of which the major protocol revision comprises the most |
|
54 significant digit(s) to the left of the period (.), e.g. a major |
|
55 protocol version value of 1 would represent all MTP protocol revisions |
|
56 from 1.0 up to (but not including) 2.0. |
|
57 |
|
58 This parameter value can be accessed using the @see UintValue API. |
|
59 */ |
|
60 EMajorProtocolRevision, |
|
61 |
|
62 /** |
|
63 This parameter indicates whether the object enumerations which the data |
|
64 provider registers with the MTP object manager should persist when the |
|
65 data provider is unloaded from the MTP framework. If the persistent |
|
66 option is selected, then on each subsequent activation after its |
|
67 initial object store enumeration is complete the data provider will be |
|
68 required to re-enumerate only that portion of its object store which |
|
69 has changed (objects added, removed, or modified) since it was last |
|
70 loaded. If the persistent option is not selected, then the data |
|
71 provider will be required to re-enumerate its entire object store each |
|
72 time it is loaded. |
|
73 |
|
74 This parameter value can be accessed using the @see BoolValue API |
|
75 */ |
|
76 EObjectEnumerationPersistent, |
|
77 |
|
78 /** |
|
79 This parameter specifies the modes of operation which the data provider |
|
80 supports. It is specified as an integer which encodes a set of bit |
|
81 flags. The set of valid bit flag values is defined by the @see TMTPMode |
|
82 enumeration. |
|
83 |
|
84 The set of parameter values can be accessed using the |
|
85 @see GetArrayValue API. |
|
86 */ |
|
87 ESupportedModes, |
|
88 |
|
89 /** |
|
90 This parameter is reserved for future use. |
|
91 */ |
|
92 EServerName, |
|
93 |
|
94 /** |
|
95 This parameter is reserved for future use. |
|
96 */ |
|
97 EServerImageName, |
|
98 |
|
99 /** |
|
100 This parameter specifies an optional configuration data resource whose |
|
101 form and function is specific to the data provider. |
|
102 |
|
103 The parameter value is specified as an LLINK resource and can be |
|
104 accessed using the @see DesC8Value API. |
|
105 */ |
|
106 EOpaqueResource, |
|
107 |
|
108 /** |
|
109 This parameter specifies the resource filename in which the set of data |
|
110 provider configurability parameter values are specified. |
|
111 |
|
112 The set of parameter values can be accessed using the |
|
113 @see DesCValue API. |
|
114 */ |
|
115 EResourceFileName, |
|
116 |
|
117 /** |
|
118 This parameter specifies the enumeration phase of the data provider |
|
119 |
|
120 This parameter value can be accessed using the @see UintValue API. |
|
121 */ |
|
122 EEnumerationPhase |
|
123 }; |
|
124 |
|
125 public: |
|
126 |
|
127 /** |
|
128 Provides the specified @see TBool parameter value. |
|
129 @param aParam The parameter value to retrieve. |
|
130 @return Returns The parameter value |
|
131 @panic USER 0, if the parameter data type is not @see TBool. |
|
132 */ |
|
133 virtual TBool BoolValue(TParameter aParam) const = 0; |
|
134 |
|
135 /** |
|
136 Provides the specified @see TDesC parameter value. |
|
137 @param aParam The parameter value to retrieve. |
|
138 @return Returns The parameter value |
|
139 @panic USER 0, if the parameter data type is not @see TDesC. |
|
140 */ |
|
141 virtual const TDesC& DesCValue(TParameter aParam) const = 0; |
|
142 |
|
143 /** |
|
144 Provides the specified @see TDesC8 parameter value. |
|
145 @param aParam The parameter value to retrieve. |
|
146 @return Returns The parameter value |
|
147 @panic USER 0, if the parameter data type is not @see TDesC8. |
|
148 */ |
|
149 virtual const TDesC8& DesC8Value(TParameter aParam) const = 0; |
|
150 |
|
151 /** |
|
152 Provides the specified @see TUint parameter value. |
|
153 @param aParam The parameter value to retrieve. |
|
154 @return Returns The parameter value |
|
155 @panic USER 0, if the parameter data type is not @see TUint. |
|
156 */ |
|
157 virtual TUint UintValue(TParameter aParam) const = 0; |
|
158 |
|
159 /** |
|
160 Retrieves the specified @see RArray<TUint> parameter value. |
|
161 @param aParam The parameter value to retrieve. |
|
162 @return Returns The parameter value |
|
163 @panic USER 0, if the parameter data type is not @see RArray<TUint>. |
|
164 */ |
|
165 virtual void GetArrayValue(TParameter aParam, RArray<TUint>& aArray) const = 0; |
|
166 }; |
|
167 |
|
168 #endif // MMTPDATAPROVIDERCONFIG_H |