|
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: ImumMboxInternalDataConverter.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CIMUMMBOXInternalDataCONVERTER_H |
|
20 #define CIMUMMBOXInternalDataCONVERTER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <imapset.h> |
|
25 |
|
26 #include "ImumMboxDataExtension.h" |
|
27 #include "ImumInMailboxUtilities.h" |
|
28 |
|
29 // CONSTANTS |
|
30 // MACROS |
|
31 // DATA TYPES |
|
32 // FUNCTION PROTOTYPES |
|
33 // FORWARD DECLARATIONS |
|
34 class CImumInternalApiImpl; |
|
35 class CImumInternalApiImpl; |
|
36 class CImumInSettingsData; |
|
37 class CImumMboxData; |
|
38 class MImumInSettingsDataCollection; |
|
39 class CImImap4Settings; |
|
40 class CImPop3Settings; |
|
41 class CImSmtpSettings; |
|
42 class CImumMboxDataExtension; |
|
43 class CMsvCommDbUtilities; |
|
44 |
|
45 // CLASS DECLARATION |
|
46 |
|
47 |
|
48 /** |
|
49 * |
|
50 * @lib |
|
51 * @since Series60 3.0 |
|
52 */ |
|
53 NONSHARABLE_CLASS( CImumMboxInternalDataConverter ) : public CBase |
|
54 { |
|
55 public: // Constructors and destructor |
|
56 |
|
57 /** |
|
58 * Creates object from CImumMboxInternalDataConverter and leaves it to cleanup stack |
|
59 * @since Series60 3.0 |
|
60 * @return, Constructed object |
|
61 */ |
|
62 static CImumMboxInternalDataConverter* NewLC( |
|
63 CImumInternalApiImpl& aMailboxApi, |
|
64 const CImumMboxData& aSourceData, |
|
65 CImumInSettingsData& aTargetData ); |
|
66 |
|
67 /** |
|
68 * Create object from CImumMboxInternalDataConverter |
|
69 * @since Series60 3.0 |
|
70 * @return, Constructed object |
|
71 */ |
|
72 static CImumMboxInternalDataConverter* NewL( |
|
73 CImumInternalApiImpl& aMailboxApi, |
|
74 const CImumMboxData& aSourceData, |
|
75 CImumInSettingsData& aTargetData ); |
|
76 |
|
77 /** |
|
78 * Destructor |
|
79 * @since Series60 3.0 |
|
80 */ |
|
81 virtual ~CImumMboxInternalDataConverter(); |
|
82 |
|
83 public: // New functions |
|
84 |
|
85 |
|
86 /** |
|
87 * |
|
88 * |
|
89 * @since S60 v3.2 |
|
90 */ |
|
91 static void ConvertToInternalMboxDataL( |
|
92 CImumInternalApiImpl& aMailboxApi, |
|
93 const CImumMboxData& aSourceData, |
|
94 CImumInSettingsData& aTargetData ); |
|
95 |
|
96 /** |
|
97 * |
|
98 * |
|
99 * @since S60 v3.2 |
|
100 */ |
|
101 static CImumInSettingsData* ConvertToInternalMboxDataLC( |
|
102 CImumInternalApiImpl& aMailboxApi, |
|
103 const CImumMboxData& aSourceData ); |
|
104 |
|
105 public: // Functions from base classes |
|
106 |
|
107 protected: // Constructors |
|
108 |
|
109 /** |
|
110 * Default constructor for classCImumMboxInternalDataConverter |
|
111 * @since Series60 3.0 |
|
112 * @return, Constructed object |
|
113 */ |
|
114 CImumMboxInternalDataConverter( |
|
115 CImumInternalApiImpl& aMailboxApi, |
|
116 const CImumMboxData& aSourceData, |
|
117 CImumInSettingsData& aTargetData ); |
|
118 |
|
119 /** |
|
120 * Symbian 2-phase constructor |
|
121 * @since Series60 3.0 |
|
122 */ |
|
123 void ConstructL(); |
|
124 |
|
125 protected: // New virtual functions |
|
126 protected: // New functions |
|
127 protected: // Functions from base classes |
|
128 |
|
129 private: // New virtual functions |
|
130 private: // New functions |
|
131 |
|
132 |
|
133 /** |
|
134 * |
|
135 * |
|
136 * @since S60 v3.2 |
|
137 */ |
|
138 void DoConvertToInternalMboxDataL(); |
|
139 |
|
140 /** |
|
141 * |
|
142 * |
|
143 * @since S60 v3.2 |
|
144 */ |
|
145 static CImumInSettingsData* CreateInternalDataLC( |
|
146 CImumInternalApiImpl& aMailboxApi, |
|
147 const TUid& aProtocol ); |
|
148 |
|
149 /** |
|
150 * |
|
151 * |
|
152 * @since S60 v3.2 |
|
153 * @param |
|
154 */ |
|
155 void ConvToInternalImap4DataL(); |
|
156 |
|
157 /** |
|
158 * |
|
159 * |
|
160 * @since S60 v3.2 |
|
161 * @param |
|
162 */ |
|
163 void ConvToInternalPop3DataL(); |
|
164 |
|
165 /** |
|
166 * |
|
167 * |
|
168 * @since S60 v3.2 |
|
169 * @param |
|
170 * @return |
|
171 */ |
|
172 void DoPopulateInternalImap4SettingsL(); |
|
173 |
|
174 /** |
|
175 * |
|
176 * |
|
177 * @since S60 v3.2 |
|
178 * @param |
|
179 * @return |
|
180 */ |
|
181 void DoPopulateInternalPop3SettingsL(); |
|
182 |
|
183 /** |
|
184 * |
|
185 * |
|
186 * @since S60 v3.2 |
|
187 * @param |
|
188 * @return |
|
189 */ |
|
190 void DoPopulateInternalSmtpSettingsL(); |
|
191 |
|
192 /** |
|
193 * |
|
194 * |
|
195 * @since S60 v3.2 |
|
196 * @param |
|
197 * @return |
|
198 */ |
|
199 void DoPopulateInternalGeneralSettingsL(); |
|
200 |
|
201 /** |
|
202 * |
|
203 * |
|
204 * @since S60 v3.2 |
|
205 * @param |
|
206 * @return |
|
207 */ |
|
208 template<TInt TAttrSize, class TAttrSettings> |
|
209 inline static void FillText8InternalL( |
|
210 TAttrSettings& aSettings, |
|
211 const TUint aAttributeKey, |
|
212 const TDesC8& aText ); |
|
213 |
|
214 template<TInt TAttrSize, class TAttrSettings> |
|
215 inline static void FillTextInternalL( |
|
216 TAttrSettings& aSettings, |
|
217 const TUint aAttributeKey, |
|
218 const TDesC& aText ); |
|
219 |
|
220 /** |
|
221 * |
|
222 * |
|
223 * @since S60 v3.2 |
|
224 */ |
|
225 void SetIdsToInternalDataL(); |
|
226 |
|
227 /** |
|
228 * |
|
229 * |
|
230 * @since S60 v3.2 |
|
231 * @param |
|
232 * @return |
|
233 */ |
|
234 TInt32 GetInternalImapPartial( |
|
235 const TImImap4PartialMailOptions& aPartialOptions ); |
|
236 |
|
237 /** |
|
238 * |
|
239 * |
|
240 * @since S60 v3.2 |
|
241 * @param |
|
242 * @return |
|
243 */ |
|
244 TInt32 GetInternalImapDownload( |
|
245 const TImap4GetMailOptions& aPartialOptions ); |
|
246 |
|
247 /** |
|
248 * |
|
249 * |
|
250 * @since S60 v3.2 |
|
251 * @param |
|
252 * @return |
|
253 */ |
|
254 void SetInternalAccessPointL( const TInt aIndex ); |
|
255 |
|
256 /** |
|
257 * |
|
258 * |
|
259 * @since S60 v3.2 |
|
260 * @param |
|
261 * @return |
|
262 */ |
|
263 TInt InternalAoState( const TMailAoStates& aAoState ); |
|
264 |
|
265 /** |
|
266 * |
|
267 * |
|
268 * @since S60 v3.2 |
|
269 * @param |
|
270 * @return |
|
271 */ |
|
272 TInt InternalEmnState( const TMailEmnStates& aEmnState ); |
|
273 |
|
274 /** |
|
275 * |
|
276 * |
|
277 * @since S60 v3.2 |
|
278 * @param |
|
279 * @return |
|
280 */ |
|
281 TInt InternalRetrivalInterval( TInt aInterval ); |
|
282 |
|
283 /** |
|
284 * |
|
285 * |
|
286 * @since S60 v3.2 |
|
287 * @param |
|
288 * @return |
|
289 */ |
|
290 TInt32 GetInternalPopDownloadL( |
|
291 const TInt32& aSetting, |
|
292 MImumInSettingsDataCollection& aInternalDataCollection ); |
|
293 |
|
294 /** |
|
295 * |
|
296 * |
|
297 * @since S60 v3.2 |
|
298 * @param |
|
299 * @return |
|
300 */ |
|
301 TInt32 GetInternalPopSyncL( |
|
302 const TInt32& aSetting ); |
|
303 |
|
304 private: // Functions from base classes |
|
305 |
|
306 public: // Data |
|
307 protected: // Data |
|
308 private: // Data |
|
309 |
|
310 // Reference to mailbox Api object |
|
311 CImumInternalApiImpl& iMailboxApi; |
|
312 // Reference to symbian data |
|
313 CImumInSettingsData& iTargetData; |
|
314 // Reference to internal data |
|
315 const CImumMboxData& iSourceData; |
|
316 |
|
317 }; |
|
318 |
|
319 |
|
320 #include "ImumMboxInternalDataConverter.inl" |
|
321 |
|
322 #endif // CIMUMMBOXInternalDataCONVERTER_H |