64
|
1 |
/*
|
|
2 |
* Copyright (c) 2007 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: Defines an API to create and edit mailbox settings
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef IPSSETDATAEXTENSION_H
|
|
21 |
#define IPSSETDATAEXTENSION_H
|
|
22 |
|
|
23 |
#include <msvstd.h>
|
|
24 |
|
|
25 |
#include "ipssetutilsconsts.h"
|
|
26 |
|
|
27 |
/**
|
|
28 |
* Settings extension to current mailbox settings
|
|
29 |
*
|
|
30 |
* @since FS v1.0
|
|
31 |
* @lib IpsSosSettings.lib
|
|
32 |
*/
|
|
33 |
class CIpsSetDataExtension : public CBase
|
|
34 |
{
|
|
35 |
public: // Constructors and destructor
|
|
36 |
|
|
37 |
/**
|
|
38 |
* Creates mailbox extension object
|
|
39 |
*/
|
|
40 |
IMPORT_C static CIpsSetDataExtension* NewLC();
|
|
41 |
|
|
42 |
/**
|
|
43 |
* Creates mailbox extension object
|
|
44 |
*/
|
|
45 |
IMPORT_C static CIpsSetDataExtension* NewL();
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Destructor
|
|
49 |
*/
|
|
50 |
virtual ~CIpsSetDataExtension();
|
|
51 |
|
|
52 |
public: // New functions
|
|
53 |
|
|
54 |
/**
|
|
55 |
* Verifies the validy of the metadata in the settings
|
|
56 |
* @return ETrue if the settings are valid
|
|
57 |
* @return EFalse if the settings are invalid
|
|
58 |
*/
|
|
59 |
IMPORT_C TBool IsSettingsValid() const;
|
|
60 |
|
|
61 |
// COMMON
|
|
62 |
|
|
63 |
/**
|
|
64 |
* Retrieves the status flags of the settings
|
|
65 |
* @return Status flags
|
|
66 |
*/
|
|
67 |
IMPORT_C void SetStatusFlags( const TUint64 aStatusFlags );
|
|
68 |
|
|
69 |
/**
|
|
70 |
* Retrieves the status flags of the settings
|
|
71 |
* @return Status flags
|
|
72 |
*/
|
|
73 |
IMPORT_C TUint64 StatusFlags() const;
|
|
74 |
|
|
75 |
/**
|
|
76 |
* Makes identical copy of settings
|
|
77 |
* @param aExtension, Setting to be copied
|
|
78 |
*/
|
|
79 |
IMPORT_C void CopyL(
|
|
80 |
const CIpsSetDataExtension& aExtension );
|
|
81 |
|
|
82 |
/**
|
|
83 |
* Sets the id of the mailbox the setting is associated with
|
|
84 |
* This is not exported
|
|
85 |
* @param aMailboxId, Mailbox, who owns the settings
|
|
86 |
*/
|
|
87 |
IMPORT_C void SetMailboxId(
|
|
88 |
const TMsvId aMailboxId );
|
|
89 |
|
|
90 |
/**
|
|
91 |
* Returns the id of the owner of the setting
|
|
92 |
* @return Mailbox id
|
|
93 |
*/
|
|
94 |
IMPORT_C TMsvId MailboxId() const;
|
|
95 |
|
|
96 |
/**
|
|
97 |
* Set the account id of the base settings
|
|
98 |
* This is not exported
|
|
99 |
* @param aAccountId, Sets value of iAccountId
|
|
100 |
*/
|
|
101 |
IMPORT_C void SetAccountId( const TUint32 aAccountId );
|
|
102 |
|
|
103 |
/**
|
|
104 |
* Get the account id of the base settings
|
|
105 |
* @return value of iAccountId
|
|
106 |
*/
|
|
107 |
IMPORT_C TUint32 AccountId() const;
|
|
108 |
|
|
109 |
/**
|
|
110 |
* Set the account id of the extended settings
|
|
111 |
* This is not exported
|
|
112 |
* @param aExtensionId, Sets value of iExtensionId
|
|
113 |
*/
|
|
114 |
IMPORT_C void SetExtensionId( const TUint32 aExtensionId );
|
|
115 |
|
|
116 |
/**
|
|
117 |
* Get the account id of the extended settings
|
|
118 |
* @return value of iExtensionId
|
|
119 |
*/
|
|
120 |
IMPORT_C TUint32 ExtensionId() const;
|
|
121 |
|
|
122 |
/**
|
|
123 |
* Set method for member iProtocol
|
|
124 |
* This is not exported
|
|
125 |
* @param aProtocol, Sets value of iProtocol
|
|
126 |
*/
|
|
127 |
IMPORT_C void SetProtocol( const TUid& aProtocol );
|
|
128 |
|
|
129 |
/**
|
|
130 |
* Get function for member iProtocol
|
|
131 |
* @return value of iProtocol
|
|
132 |
*/
|
|
133 |
IMPORT_C TUid Protocol() const;
|
|
134 |
|
|
135 |
/**
|
|
136 |
* Set method for member iEmailAddress
|
|
137 |
* @param aEmailAddress, Sets value of iEmailAddress
|
|
138 |
*/
|
|
139 |
IMPORT_C void SetEmailAddress( const TDesC& aEmailAddress );
|
|
140 |
|
|
141 |
/**
|
|
142 |
* Get function for member iEmailAddress
|
|
143 |
* @return value of iEmailAddress
|
|
144 |
*/
|
|
145 |
IMPORT_C const TDesC& EmailAddress() const;
|
|
146 |
|
|
147 |
// EXTENDED MAIL SETTINGS
|
|
148 |
|
|
149 |
/**
|
|
150 |
* Sets the state of email notification -flag
|
|
151 |
*/
|
|
152 |
IMPORT_C void SetEmailNotificationState(
|
|
153 |
const TIpsSetDataEmnStates aEmnState );
|
|
154 |
|
|
155 |
/**
|
|
156 |
* Fetches the state of email notification -flag
|
|
157 |
* @return ETrue or EFalse, according to flag state
|
|
158 |
*/
|
|
159 |
IMPORT_C TIpsSetDataEmnStates EmailNotificationState() const;
|
|
160 |
|
|
161 |
/**
|
|
162 |
* A flag to
|
|
163 |
* @param aNewMailIndicators, Sets value of iNewMailIndicators
|
|
164 |
*/
|
|
165 |
IMPORT_C void SetNewMailIndicators(
|
|
166 |
const TBool aNewState );
|
|
167 |
|
|
168 |
/**
|
|
169 |
*
|
|
170 |
* @return value of EMailNewIndicators
|
|
171 |
*/
|
|
172 |
IMPORT_C TBool NewMailIndicators() const;
|
|
173 |
|
|
174 |
/**
|
|
175 |
* Sets the state of hide messages -flag
|
|
176 |
* @param aNewState, The new state of the flag
|
|
177 |
*/
|
|
178 |
IMPORT_C void SetHideMsgs(
|
|
179 |
const TBool aNewState );
|
|
180 |
|
|
181 |
/**
|
|
182 |
* Fetches the state of hide messages -flag
|
|
183 |
* @return ETrue or EFalse, according to flag state
|
|
184 |
*/
|
|
185 |
IMPORT_C TBool HideMsgs() const;
|
|
186 |
|
|
187 |
/**
|
|
188 |
* Sets the value of open html mail -setting
|
|
189 |
* @param aOpenHtmlMail, New value of the setting
|
|
190 |
*/
|
|
191 |
IMPORT_C void SetOpenHtmlMail(
|
|
192 |
const TInt aOpenHtmlMail );
|
|
193 |
|
|
194 |
/**
|
|
195 |
* Fetches the state of open html mail -setting
|
|
196 |
* @return Setting value
|
|
197 |
*/
|
|
198 |
IMPORT_C TInt OpenHtmlMail() const;
|
|
199 |
|
|
200 |
// ALWAYS ONLINE
|
|
201 |
|
|
202 |
/**
|
|
203 |
* Get function for member iVersion
|
|
204 |
* @return value of iVersion
|
|
205 |
*/
|
|
206 |
IMPORT_C TInt Version() const;
|
|
207 |
|
|
208 |
/**
|
|
209 |
* Set method for member iAlwaysOnlineState
|
|
210 |
* @param aAlwaysOnlineState, Sets value of iAlwaysOnlineState
|
|
211 |
*/
|
|
212 |
IMPORT_C void SetAlwaysOnlineState(
|
|
213 |
const TIpsSetDataAoStates aAlwaysOnlineState,
|
|
214 |
TBool aIgnoreStateFlag=EFalse );
|
|
215 |
|
|
216 |
/**
|
|
217 |
* Get function for member iAlwaysOnlineState
|
|
218 |
* @return value of iAlwaysOnlineState
|
|
219 |
*/
|
|
220 |
IMPORT_C TIpsSetDataAoStates AlwaysOnlineState() const;
|
|
221 |
|
|
222 |
/**
|
|
223 |
* Set method for member iSelectedWeekDays
|
|
224 |
* @param aSelectedWeekDays, Sets value of iSelectedWeekDays
|
|
225 |
*/
|
|
226 |
IMPORT_C void SetSelectedWeekDays(
|
|
227 |
const TUint aSelectedWeekDays );
|
|
228 |
|
|
229 |
/**
|
|
230 |
* Get function for member iSelectedWeekDays
|
|
231 |
* @return value of iSelectedWeekDays
|
|
232 |
*/
|
|
233 |
IMPORT_C TUint SelectedWeekDays() const;
|
|
234 |
|
|
235 |
/**
|
|
236 |
* Set method for member iSelectedTimeStart
|
|
237 |
* @param aSelectedTimeStart, Sets value of iSelectedTimeStart
|
|
238 |
*/
|
|
239 |
IMPORT_C void SetSelectedTimeStart(
|
|
240 |
const TTime aSelectedTimeStart );
|
|
241 |
|
|
242 |
/**
|
|
243 |
* Get function for member iSelectedTimeStart
|
|
244 |
* @return value of iSelectedTimeStart
|
|
245 |
*/
|
|
246 |
IMPORT_C TTime SelectedTimeStart() const;
|
|
247 |
|
|
248 |
/**
|
|
249 |
* Set method for member iSelectedTimeStop
|
|
250 |
* @param aSelectedTimeStop, Sets value of iSelectedTimeStop
|
|
251 |
*/
|
|
252 |
IMPORT_C void SetSelectedTimeStop(
|
|
253 |
const TTime aSelectedTimeStop );
|
|
254 |
|
|
255 |
/**
|
|
256 |
* Get function for member iSelectedTimeStop
|
|
257 |
* @return value of iSelectedTimeStop
|
|
258 |
*/
|
|
259 |
IMPORT_C TTime SelectedTimeStop() const;
|
|
260 |
|
|
261 |
/**
|
|
262 |
* Set method for member iInboxRefreshTime
|
|
263 |
* @param aInboxRefreshTime, Sets value of iInboxRefreshTime
|
|
264 |
*/
|
|
265 |
IMPORT_C void SetInboxRefreshTime(
|
|
266 |
const TInt aInboxRefreshTime );
|
|
267 |
|
|
268 |
/**
|
|
269 |
* Get function for member iInboxRefreshTime
|
|
270 |
* @return value of iInboxRefreshTime
|
|
271 |
*/
|
|
272 |
IMPORT_C TInt InboxRefreshTime() const;
|
|
273 |
|
|
274 |
/**
|
|
275 |
* Set method for member iUpdateMode
|
|
276 |
* @param aUpdateMode, Sets value of iUpdateMode
|
|
277 |
*/
|
|
278 |
IMPORT_C void SetUpdateMode(
|
|
279 |
const TIpsSetDataAoUpdateModes aUpdateMode );
|
|
280 |
|
|
281 |
/**
|
|
282 |
* Get function for member iUpdateMode
|
|
283 |
* @return value of iUpdateMode
|
|
284 |
*/
|
|
285 |
IMPORT_C TIpsSetDataAoUpdateModes UpdateMode() const;
|
|
286 |
|
|
287 |
/**
|
|
288 |
* Set method for member iLastUpdateInfo
|
|
289 |
* @param aLastUpdateInfo, Sets value of iLastUpdateInfo
|
|
290 |
*/
|
|
291 |
IMPORT_C void SetLastUpdateInfo( const TAOInfo& aLastUpdateInfo );
|
|
292 |
|
|
293 |
/**
|
|
294 |
* Get function for member iLastUpdateInfo
|
|
295 |
* @return value of iLastUpdateInfo
|
|
296 |
*/
|
|
297 |
IMPORT_C TAOInfo LastUpdateInfo() const;
|
|
298 |
|
|
299 |
/**
|
|
300 |
*
|
|
301 |
*
|
|
302 |
* @param
|
|
303 |
* @return
|
|
304 |
*/
|
|
305 |
IMPORT_C void SetOutgoingLogin( const TInt aOutgoingLogin );
|
|
306 |
|
|
307 |
/**
|
|
308 |
*
|
|
309 |
*
|
|
310 |
* @param
|
|
311 |
* @return
|
|
312 |
*/
|
|
313 |
IMPORT_C TInt OutgoingLogin() const;
|
|
314 |
|
|
315 |
/**
|
|
316 |
*
|
|
317 |
*/
|
|
318 |
IMPORT_C void SetLastModified( TTime aTime );
|
|
319 |
|
|
320 |
/**
|
|
321 |
*
|
|
322 |
*/
|
|
323 |
IMPORT_C TTime LastModified() const;
|
|
324 |
|
|
325 |
/**
|
|
326 |
*
|
|
327 |
*/
|
|
328 |
IMPORT_C void SetSyncStatus( TInt aLastSyncStatus );
|
|
329 |
|
|
330 |
/**
|
|
331 |
*
|
|
332 |
*/
|
|
333 |
IMPORT_C TInt LastSyncStatus() const;
|
|
334 |
|
|
335 |
/**
|
|
336 |
*
|
|
337 |
*/
|
|
338 |
IMPORT_C void SetEmnReceivedButNotSyncedFlag( TBool aFlag );
|
|
339 |
|
|
340 |
/**
|
|
341 |
*
|
|
342 |
*/
|
|
343 |
IMPORT_C TBool EmnReceivedButNotSyncedFlag() const;
|
|
344 |
|
|
345 |
/**
|
|
346 |
*
|
|
347 |
*/
|
|
348 |
IMPORT_C void PopulateDefaults();
|
|
349 |
|
|
350 |
//<cmail>
|
|
351 |
/**
|
|
352 |
* Set method for member iHiddenData
|
|
353 |
* @param ETrue if username, servers etc. are hidden
|
|
354 |
*/
|
|
355 |
IMPORT_C void SetDataHidden( const TBool aIsHidden );
|
|
356 |
|
|
357 |
/**
|
|
358 |
* Get method for member iHiddenData
|
|
359 |
* @return value of iLastUpdateInfo
|
|
360 |
*/
|
|
361 |
IMPORT_C TBool DataHidden() const;
|
|
362 |
|
|
363 |
/**
|
|
364 |
* Sets a flag when mailbox receives it's first OMA EMN.
|
|
365 |
* (email notification)
|
|
366 |
*/
|
|
367 |
IMPORT_C void SetFirstEmnReceived( TBool aValue );
|
|
368 |
|
|
369 |
/**
|
|
370 |
* Returns flag which indicates has mailbox received
|
|
371 |
* it's first OMA EMN.
|
|
372 |
*/
|
|
373 |
IMPORT_C TBool FirstEmnReceived() const;
|
|
374 |
|
|
375 |
private: // Constructors and destructor
|
|
376 |
|
|
377 |
/**
|
|
378 |
* ConstructL
|
|
379 |
*/
|
|
380 |
void ConstructL();
|
|
381 |
|
|
382 |
/**
|
|
383 |
* Default constructor
|
|
384 |
*/
|
|
385 |
CIpsSetDataExtension();
|
|
386 |
|
|
387 |
private: // Data
|
|
388 |
|
|
389 |
/**
|
|
390 |
* Flags for storing.
|
|
391 |
*/
|
|
392 |
/*enum TMailExtensionFlags
|
|
393 |
{
|
|
394 |
EMailNewIndicators = 0x01,
|
|
395 |
EMailNewNotifications = 0x02,
|
|
396 |
EMailHideMsgsOverLimit = 0x04,
|
|
397 |
EMailShowFieldCC = 0x08,
|
|
398 |
EMailShowFieldBCC = 0x10,
|
|
399 |
EMailShowFieldSubject = 0x20,
|
|
400 |
EMailRoamHomeOnly = 0x40
|
|
401 |
};*/
|
|
402 |
|
|
403 |
/**
|
|
404 |
* Common: Id of the mailbox this settings belongs
|
|
405 |
*/
|
|
406 |
TInt iMailboxId;
|
|
407 |
/**
|
|
408 |
* Common: Account id of the base settings
|
|
409 |
*/
|
|
410 |
TUint32 iAccountId;
|
|
411 |
/**
|
|
412 |
* Common: Account id of the extended settings
|
|
413 |
*/
|
|
414 |
TUint32 iExtensionId;
|
|
415 |
/**
|
|
416 |
* Common: Protocol of the base settings
|
|
417 |
*/
|
|
418 |
TUid iProtocol;
|
|
419 |
/**
|
|
420 |
* Extended: HTML mail opening mode.
|
|
421 |
*/
|
|
422 |
TInt iOpenHtmlMail;
|
|
423 |
/**
|
|
424 |
* AO: Settings version.
|
|
425 |
*/
|
|
426 |
TInt iVersion;
|
|
427 |
/**
|
|
428 |
* AO:
|
|
429 |
*/
|
|
430 |
TIpsSetDataAoStates iAlwaysOnlineState;
|
|
431 |
/**
|
|
432 |
* AO: Selected weekdays: 0-6 = Monday-Sunday
|
|
433 |
*/
|
|
434 |
TUint iSelectedWeekDays;
|
|
435 |
/**
|
|
436 |
* AO: Connection starting time
|
|
437 |
*/
|
|
438 |
TTime iSelectedTimeStart;
|
|
439 |
/**
|
|
440 |
* AO: Connection ending time
|
|
441 |
*/
|
|
442 |
TTime iSelectedTimeStop;
|
|
443 |
/**
|
|
444 |
* AO: Inbox refresh interval in minutes
|
|
445 |
*/
|
|
446 |
TInt iInboxRefreshTime;
|
|
447 |
/**
|
|
448 |
* AO: Mail update mode.
|
|
449 |
*/
|
|
450 |
TIpsSetDataAoUpdateModes iUpdateMode;
|
|
451 |
/**
|
|
452 |
* AO: Email address for Always Online.
|
|
453 |
*/
|
|
454 |
RBuf iEmailAddress;
|
|
455 |
/**
|
|
456 |
* EMN: Emn states
|
|
457 |
*/
|
|
458 |
TIpsSetDataEmnStates iEmnState;
|
|
459 |
|
|
460 |
TBool iHideMessages;
|
|
461 |
TBool iNewMailIndicators;
|
|
462 |
|
|
463 |
//<cmail>
|
|
464 |
/**
|
|
465 |
* User name and server addresses are hidden from the user
|
|
466 |
*/
|
|
467 |
TBool iHiddenData;
|
|
468 |
//</cmail>
|
|
469 |
|
|
470 |
/**
|
|
471 |
* AO: Last update status.
|
|
472 |
*/
|
|
473 |
TAOInfo iLastUpdateInfo;
|
|
474 |
/**
|
|
475 |
* Method to make outgoing login
|
|
476 |
*/
|
|
477 |
TInt iOutgoingLogin;
|
|
478 |
/**
|
|
479 |
* Timestamp to indicate last modification timevoid SetLastModified()
|
|
480 |
*/
|
|
481 |
TTime iLastModified;
|
|
482 |
|
|
483 |
TInt iSyncStatus;
|
|
484 |
|
|
485 |
TBool iEmnReceivedButNotSyncedFlag;
|
|
486 |
|
|
487 |
/**
|
|
488 |
* Common: Status flags of settings
|
|
489 |
*/
|
|
490 |
TUint64 iStatusFlags;
|
|
491 |
|
|
492 |
TBool iFirstEMNReceived;
|
|
493 |
|
|
494 |
|
|
495 |
};
|
|
496 |
|
|
497 |
#endif // IPSSETDATAEXTENSION_H
|
|
498 |
|
|
499 |
// End of File
|