|
1 /* |
|
2 * Copyright (c) 2006 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: |
|
15 * Class declaration file |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 #ifndef __ImumMboxData_H__ |
|
23 #define __ImumMboxData_H__ |
|
24 |
|
25 // INCLUDES |
|
26 #include <e32std.h> |
|
27 #include <msvstd.h> |
|
28 #include <cemailaccounts.h> |
|
29 #include <iapprefs.h> |
|
30 |
|
31 #include "Imas.hrh" |
|
32 |
|
33 // CONSTANTS |
|
34 // MACROS |
|
35 // DATA TYPES |
|
36 |
|
37 /** |
|
38 * Panics |
|
39 */ |
|
40 enum TImumImasPanic |
|
41 { |
|
42 EImasPanicInvalidMailbox = 0, |
|
43 EImasPanicNullDbTable, |
|
44 EImasPanicControlNotFound, |
|
45 KImasPanicNoServicesDefined, |
|
46 EImasPanicInvalidSignatureSource, |
|
47 EImasPanicServiceIdsNotCreated, |
|
48 EImasPanicAccountIdsNotCreated, |
|
49 EImasPanicDefaultAccountNotFound, |
|
50 EImasPanicNoSettings, |
|
51 EImasPanicBadEngineSetting, |
|
52 EImasPanicBadListIndex, |
|
53 EImasPanicIdArrayNotNull, |
|
54 EImasPanicUnknownSettings |
|
55 |
|
56 }; |
|
57 |
|
58 // FUNCTION PROTOTYPES |
|
59 // FORWARD DECLARATIONS |
|
60 class CRichText; |
|
61 class CParaFormatLayer; |
|
62 class CCharFormatLayer; |
|
63 class CImSmtpSettings; |
|
64 class CImPop3Settings; |
|
65 class CImImap4Settings; |
|
66 class CImIAPPreferences; |
|
67 class CImBaseEmailSettings; |
|
68 class CImumMboxDataExtension; |
|
69 GLREF_C void ImasPanic( TImumImasPanic aCode ); |
|
70 |
|
71 // CLASS DECLARATION |
|
72 |
|
73 /////////////////////////////////////////////////////////////////////////////// |
|
74 // |
|
75 // ACCOUNT SETTINGS DATA |
|
76 // |
|
77 /////////////////////////////////////////////////////////////////////////////// |
|
78 |
|
79 /** |
|
80 * ?one_line_short_description. |
|
81 * ?other_description_lines |
|
82 * |
|
83 * @lib Imum.lib |
|
84 * @since S60 3.0 |
|
85 */ |
|
86 class CMsvImailSignature : public CBase |
|
87 { |
|
88 public: |
|
89 |
|
90 /** |
|
91 * CMsvImailSignature |
|
92 */ |
|
93 CMsvImailSignature(); |
|
94 |
|
95 /** |
|
96 * CMsvImailSignature |
|
97 * @param CRichText* |
|
98 * @param CParaFormatLayer* |
|
99 * @param CCharFormatLayer* |
|
100 */ |
|
101 CMsvImailSignature( |
|
102 CRichText* aRichText, |
|
103 CParaFormatLayer* aParaFormat, |
|
104 CCharFormatLayer* aCharFormat ); |
|
105 |
|
106 /** |
|
107 * ~CMsvImailSignature |
|
108 * Destructor |
|
109 */ |
|
110 ~CMsvImailSignature(); |
|
111 |
|
112 /** |
|
113 * CopyL |
|
114 * @param CMsvImailSignature& |
|
115 */ |
|
116 void CopyL(const CMsvImailSignature& aSignature); |
|
117 |
|
118 /** |
|
119 * CreateEmptyRichTextL |
|
120 */ |
|
121 void CreateEmptyRichTextL(); |
|
122 |
|
123 public: |
|
124 CRichText* iRichText; |
|
125 CParaFormatLayer* iParaFormatLayer; |
|
126 CCharFormatLayer* iCharFormatLayer; |
|
127 }; |
|
128 |
|
129 /////////////////////////////////////////////////////////////////////////////// |
|
130 |
|
131 /** |
|
132 * class CImumMboxData |
|
133 * |
|
134 */ |
|
135 class CImumMboxData : public CBase |
|
136 { |
|
137 public: |
|
138 |
|
139 /** |
|
140 * NewL function to create settings |
|
141 * @since S60 2.0 |
|
142 */ |
|
143 static CImumMboxData* NewL(); |
|
144 |
|
145 /** |
|
146 * NewLC function to create settings |
|
147 * @since S60 2.0 |
|
148 */ |
|
149 static CImumMboxData* NewLC(); |
|
150 |
|
151 /** |
|
152 * NewL function to create POP3 settings |
|
153 * @since S60 3.0 |
|
154 * @param aName, name |
|
155 * @param aSmtpSettings, pointer to smtp settings |
|
156 * @param aPop3Settings, pointer to pop3 settings |
|
157 * @return Pointer to settings |
|
158 */ |
|
159 static CImumMboxData* NewL( |
|
160 const TDesC& aName, |
|
161 CImSmtpSettings* aSmtpSettings, |
|
162 CImPop3Settings* aPop3Settings, |
|
163 CImumMboxDataExtension* aExtendedSettings = NULL ); |
|
164 |
|
165 /** |
|
166 * NewLC function to create POP3 settings |
|
167 * @since S60 3.0 |
|
168 * @param aName, name |
|
169 * @param aSmtpSettings, pointer to smtp settings |
|
170 * @param aPop3Settings, pointer to pop3 settings |
|
171 * @return Pointer to settings |
|
172 */ |
|
173 static CImumMboxData* NewLC( |
|
174 const TDesC& aName, |
|
175 CImSmtpSettings* aSmtpSettings, |
|
176 CImPop3Settings* aPop3Settings, |
|
177 CImumMboxDataExtension* aExtendedSettings = NULL ); |
|
178 |
|
179 /** |
|
180 * NewL function to create IMAP4 settings |
|
181 * @since S60 3.0 |
|
182 * @param aName, name |
|
183 * @param aSmtpSettings, pointer to smtp settings |
|
184 * @param aImap4Settings, pointer to pop3 settings |
|
185 * @return Pointer to settings |
|
186 */ |
|
187 static CImumMboxData* NewL( |
|
188 const TDesC& aName, |
|
189 CImSmtpSettings* aSmtpSettings, |
|
190 CImImap4Settings* aImap4Settings, |
|
191 CImumMboxDataExtension* aExtendedSettings = NULL ); |
|
192 |
|
193 /** |
|
194 * NewLC function to create IMAP4 settings |
|
195 * @since S60 3.0 |
|
196 * @param aName, name |
|
197 * @param aSmtpSettings, pointer to smtp settings |
|
198 * @param aImap4Settings, pointer to pop3 settings |
|
199 * @return Pointer to settings |
|
200 */ |
|
201 static CImumMboxData* NewLC( |
|
202 const TDesC& aName, |
|
203 CImSmtpSettings* aSmtpSettings, |
|
204 CImImap4Settings* aImap4Settings, |
|
205 CImumMboxDataExtension* aExtendedSettings = NULL ); |
|
206 |
|
207 /** |
|
208 * ~CImumMboxData |
|
209 */ |
|
210 ~CImumMboxData(); |
|
211 |
|
212 /** |
|
213 * CopyL |
|
214 * @param CImumMboxData&, settings reference |
|
215 */ |
|
216 void CopyL( const CImumMboxData& aSettings ); |
|
217 |
|
218 /** |
|
219 * RelatedMtmSettings |
|
220 * @return settings reference |
|
221 */ |
|
222 CImBaseEmailSettings& RelatedMtmSettings() const; |
|
223 |
|
224 /** |
|
225 * |
|
226 * @since S60 3.0 |
|
227 */ |
|
228 void InitializeL(); |
|
229 |
|
230 /** |
|
231 * |
|
232 * @since S60 |
|
233 * @return |
|
234 */ |
|
235 void Clean(); |
|
236 |
|
237 /** |
|
238 * |
|
239 * @since S60 3.0 |
|
240 */ |
|
241 TBool IsOk() const; |
|
242 |
|
243 protected: |
|
244 |
|
245 /** |
|
246 * CImumMboxData |
|
247 */ |
|
248 CImumMboxData(); |
|
249 |
|
250 /** |
|
251 * CImumMboxData |
|
252 * @since S60 3.0 |
|
253 * @param TDesC&, name |
|
254 * @param CImSmtpSettings*, smtp settings |
|
255 * @param CImPop3Settings*, pop3 settings |
|
256 * @param CImImap4Settings*, imap4 settings |
|
257 */ |
|
258 CImumMboxData( |
|
259 const TDesC& aName, |
|
260 CImSmtpSettings* aSmtpSettings, |
|
261 CImPop3Settings* aPop3Settings, |
|
262 CImImap4Settings* aImap4Settings, |
|
263 CImumMboxDataExtension* aExtendedSettings ); |
|
264 |
|
265 /** |
|
266 * ConstructL |
|
267 * @since S60 |
|
268 */ |
|
269 void ConstructL(); |
|
270 |
|
271 public: // Data |
|
272 |
|
273 // Common settings |
|
274 TBool iIsImap4; |
|
275 TBuf<KImasImailServiceNameLength> iName; |
|
276 CMsvImailSignature* iSignature; |
|
277 TMsvId iMailboxId; |
|
278 TMsvId iDefaultAccountId; |
|
279 |
|
280 // IMAP4 settings |
|
281 CImImap4Settings* iImap4Settings; |
|
282 TImapAccount iImap4AccountId; |
|
283 |
|
284 // POP3 settings |
|
285 CImPop3Settings* iPop3Settings; |
|
286 TPopAccount iPop3AccountId; |
|
287 |
|
288 // SMTP settings |
|
289 CImSmtpSettings* iSmtpSettings; |
|
290 |
|
291 // Extra settings |
|
292 CImumMboxDataExtension* iExtendedSettings; |
|
293 |
|
294 // Internet Access Point settings |
|
295 // - Incoming server |
|
296 TUint32 iIncomingIap; |
|
297 TCommDbDialogPref iIncomingDialogPref; |
|
298 CImIAPPreferences* iIncomingIapPref; |
|
299 // - Incoming server |
|
300 TUint32 iOutgoingIap; |
|
301 TCommDbDialogPref iOutgoingDialogPref; |
|
302 CImIAPPreferences* iOutgoingIapPref; |
|
303 |
|
304 }; |
|
305 |
|
306 #endif // __ImumMboxData_H__ |