|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: ImumInSettingsDataCollectionImpl.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CIMUMINSETTINGSDATACOLLECTIONIMPL_H |
|
20 #define CIMUMINSETTINGSDATACOLLECTIONIMPL_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <ImumInSettingsDataCollection.h> |
|
25 |
|
26 // CONSTANTS |
|
27 // MACROS |
|
28 // DATA TYPES |
|
29 // FUNCTION PROTOTYPES |
|
30 class CImumInSettingsDataArray; |
|
31 class CImumMboxDefaultData; |
|
32 class CImumInSettingsDataValidator; |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * |
|
39 * @lib |
|
40 * @since S60 3.2 |
|
41 */ |
|
42 class CImumInSettingsDataCollectionImpl : |
|
43 public CBase, |
|
44 public MImumInSettingsDataCollection |
|
45 { |
|
46 public: // Constructors and destructor |
|
47 |
|
48 /** |
|
49 * Creates object from CImumInSettingsDataCollectionImpl and leaves it to cleanup stack |
|
50 * @since S60 3.2 |
|
51 * @return, Constructed object |
|
52 */ |
|
53 static CImumInSettingsDataCollectionImpl* NewLC( |
|
54 const TUid& aProtocol, |
|
55 const MImumInSettingsDataCollection* aDefaultData, |
|
56 CImumInSettingsDataValidator& aValidator ); |
|
57 |
|
58 /** |
|
59 * Create object from CImumInSettingsDataCollectionImpl |
|
60 * @since S60 3.2 |
|
61 * @return, Constructed object |
|
62 */ |
|
63 static CImumInSettingsDataCollectionImpl* NewL( |
|
64 const TUid& aProtocol, |
|
65 const MImumInSettingsDataCollection* aDefaultData, |
|
66 CImumInSettingsDataValidator& aValidator ); |
|
67 |
|
68 /** |
|
69 * Destructor |
|
70 * @since S60 3.2 |
|
71 */ |
|
72 virtual ~CImumInSettingsDataCollectionImpl(); |
|
73 |
|
74 public: // New functions |
|
75 |
|
76 /** |
|
77 * |
|
78 * |
|
79 * @since S60 v3.2 |
|
80 * @leave &(leavedesc)s |
|
81 */ |
|
82 void ValidateL(); |
|
83 |
|
84 /** |
|
85 * |
|
86 * |
|
87 * @since S60 v3.2 |
|
88 * @param |
|
89 * @return |
|
90 */ |
|
91 void ResetAll(); |
|
92 |
|
93 /** |
|
94 * |
|
95 * |
|
96 * @since S60 v3.2 |
|
97 * @param |
|
98 */ |
|
99 void Log(); |
|
100 |
|
101 /** |
|
102 * Makes identical copy of the object and returns the implementation |
|
103 * |
|
104 * @since S60 v3.2 |
|
105 * @return Clone of implementation object |
|
106 * @leave |
|
107 */ |
|
108 CImumInSettingsDataCollectionImpl* DoCloneL() const; |
|
109 |
|
110 public: // Functions from base classes |
|
111 |
|
112 /** |
|
113 * |
|
114 * @since S60 3.2 |
|
115 * @param |
|
116 * @return |
|
117 */ |
|
118 TInt SetAttr( const TUint aAttributeKey, const TInt aValue ); |
|
119 |
|
120 /** |
|
121 * |
|
122 * @since S60 3.2 |
|
123 * @param |
|
124 * @return |
|
125 */ |
|
126 TInt SetAttr( const TUint aAttributeKey, const TInt64 aValue ); |
|
127 |
|
128 /** |
|
129 * |
|
130 * @since S60 3.2 |
|
131 * @param |
|
132 * @return |
|
133 */ |
|
134 TInt SetAttr( const TUint aAttributeKey, const TMsvId aId ); |
|
135 |
|
136 /** |
|
137 * |
|
138 * @since S60 3.2 |
|
139 * @param |
|
140 * @return |
|
141 */ |
|
142 TInt SetAttr( const TUint aAttributeKey, const TDesC& aText ); |
|
143 |
|
144 /** |
|
145 * |
|
146 * @since S60 3.2 |
|
147 * @param |
|
148 * @return |
|
149 */ |
|
150 TInt SetAttr( const TUint aAttributeKey, const TDesC8& aText ); |
|
151 |
|
152 /** |
|
153 * |
|
154 * @since S60 3.2 |
|
155 * @param |
|
156 * @return |
|
157 */ |
|
158 TInt GetAttr( const TUint aAttributeKey, TInt& aValue ) const; |
|
159 |
|
160 /** |
|
161 * |
|
162 * @since S60 3.2 |
|
163 * @param |
|
164 * @return |
|
165 */ |
|
166 TInt GetAttr( const TUint aAttributeKey, TInt64& aValue ) const; |
|
167 |
|
168 /** |
|
169 * |
|
170 * @since S60 3.2 |
|
171 * @param |
|
172 * @return |
|
173 */ |
|
174 TInt GetAttr( const TUint aAttributeKey, TMsvId& aId ) const; |
|
175 |
|
176 /** |
|
177 * |
|
178 * @since S60 3.2 |
|
179 * @param |
|
180 * @return |
|
181 */ |
|
182 TInt GetAttr( const TUint aAttributeKey, TDes& aText ) const; |
|
183 |
|
184 /** |
|
185 * |
|
186 * @since S60 3.2 |
|
187 * @param |
|
188 * @return |
|
189 */ |
|
190 TInt GetAttr( const TUint aAttributeKey, TDes8& aText ) const; |
|
191 |
|
192 /** |
|
193 * |
|
194 * @since S60 3.2 |
|
195 * @param aSettingsData |
|
196 * @return |
|
197 */ |
|
198 TBool operator!=( const MImumDaSettingsDataCollection& aConnectionSettings ) const; |
|
199 TBool operator!=( const MImumInSettingsDataCollection& aConnectionSettings ) const; |
|
200 |
|
201 /** |
|
202 * |
|
203 * @since S60 3.2 |
|
204 * @param aSettingsData |
|
205 * @return |
|
206 */ |
|
207 TBool operator==( const MImumDaSettingsDataCollection& aConnectionSettings ) const; |
|
208 TBool operator==( const MImumInSettingsDataCollection& aConnectionSettings ) const; |
|
209 |
|
210 /** |
|
211 * |
|
212 * @since S60 3.2 |
|
213 * @param aAttributeKey |
|
214 * @return |
|
215 */ |
|
216 void Reset( const TUint aAttributeKey ); |
|
217 |
|
218 /** |
|
219 * |
|
220 * @since S60 3.2 |
|
221 * @param aSettingsData |
|
222 * @return |
|
223 */ |
|
224 TInt Copy( const MImumDaSettingsDataCollection& aConnectionSettings ); |
|
225 TInt Copy( const MImumInSettingsDataCollection& aConnectionSettings ); |
|
226 |
|
227 /** |
|
228 * Makes identical copy of the object and returns the API class. |
|
229 * |
|
230 * @since S60 v3.2 |
|
231 * @return Clone of implementation object |
|
232 * @leave |
|
233 */ |
|
234 MImumInSettingsDataCollection* CloneL() const; |
|
235 |
|
236 protected: // Constructors |
|
237 |
|
238 /** |
|
239 * Default constructor for classCImumInSettingsDataCollectionImpl |
|
240 * @since S60 3.2 |
|
241 * @return, Constructed object |
|
242 */ |
|
243 CImumInSettingsDataCollectionImpl( |
|
244 const TUid& aProtocol, |
|
245 const MImumInSettingsDataCollection* aDefaultData, |
|
246 CImumInSettingsDataValidator& aValidator ); |
|
247 |
|
248 /** |
|
249 * Symbian 2-phase constructor |
|
250 * @since S60 3.2 |
|
251 */ |
|
252 void ConstructL( |
|
253 const TUid& aProtocol ); |
|
254 |
|
255 protected: // New virtual functions |
|
256 protected: // New functions |
|
257 protected: // Functions from base classes |
|
258 |
|
259 private: // New virtual functions |
|
260 private: // New functions |
|
261 |
|
262 /** |
|
263 * |
|
264 * |
|
265 * @since S60 v3.2 |
|
266 * @param |
|
267 * @leave &(leavedesc)s |
|
268 */ |
|
269 void SettingsDataCollectionExceptionL( |
|
270 const TInt aErrorCode ) const; |
|
271 |
|
272 private: // Functions from base classes |
|
273 |
|
274 public: // Data |
|
275 protected: // Data |
|
276 private: // Data |
|
277 |
|
278 // |
|
279 const MImumInSettingsDataCollection* iDefaultData; |
|
280 // |
|
281 TUid iProtocol; |
|
282 // |
|
283 CImumInSettingsDataValidator& iValidator; |
|
284 // Owned: |
|
285 CImumInSettingsDataArray* iSettings; |
|
286 }; |
|
287 |
|
288 #include "ImumInSettingsDataCollectionImpl.inl" |
|
289 |
|
290 #endif // CIMUMINSETTINGSDATACOLLECTIONIMPL_H |
|
291 |
|
292 // End of File |