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: This file implements classes CIpsSetDataExtension, Extension.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#include "emailtrace.h"
|
|
21 |
#include <e32base.h>
|
|
22 |
|
|
23 |
#include "ipssetutilsconsts.h"
|
|
24 |
#include "ipssetdataextension.h"
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
29 |
|
|
30 |
// ----------------------------------------------------------------------------
|
|
31 |
// CIpsSetDataExtension::CIpsSetDataExtension()
|
|
32 |
// ----------------------------------------------------------------------------
|
|
33 |
//
|
|
34 |
CIpsSetDataExtension::CIpsSetDataExtension()
|
|
35 |
:
|
|
36 |
iMailboxId( KErrNotFound ),
|
|
37 |
iAccountId( 0 ),
|
|
38 |
iExtensionId( 0 ),
|
|
39 |
iProtocol( TUid::Uid( 0 ) ),
|
|
40 |
iOpenHtmlMail( KErrNotFound ),
|
|
41 |
iVersion( KErrNotFound ),
|
|
42 |
iAlwaysOnlineState( EMailAoOff ),
|
|
43 |
iSelectedWeekDays( 0 ),
|
|
44 |
iSelectedTimeStart( 0 ),
|
|
45 |
iSelectedTimeStop( 0 ),
|
|
46 |
iInboxRefreshTime( KErrNotFound ),
|
|
47 |
iUpdateMode( EMailAoHeadersOnly ),
|
|
48 |
iEmailAddress( NULL ),
|
|
49 |
iEmnState( EMailEmnOff ),
|
|
50 |
iHideMessages( EFalse ),
|
|
51 |
iNewMailIndicators( ETrue ),
|
|
52 |
//<cmail>
|
|
53 |
iHiddenData( EFalse )
|
|
54 |
//</cmail>
|
|
55 |
{
|
|
56 |
FUNC_LOG;
|
|
57 |
}
|
|
58 |
|
|
59 |
// ----------------------------------------------------------------------------
|
|
60 |
// CIpsSetDataExtension::~CIpsSetDataExtension()
|
|
61 |
// ----------------------------------------------------------------------------
|
|
62 |
//
|
|
63 |
CIpsSetDataExtension::~CIpsSetDataExtension()
|
|
64 |
{
|
|
65 |
FUNC_LOG;
|
|
66 |
iEmailAddress.Close();
|
|
67 |
}
|
|
68 |
|
|
69 |
// ----------------------------------------------------------------------------
|
|
70 |
// CIpsSetDataExtension::NewL()
|
|
71 |
// ----------------------------------------------------------------------------
|
|
72 |
//
|
|
73 |
EXPORT_C CIpsSetDataExtension* CIpsSetDataExtension::NewL()
|
|
74 |
{
|
|
75 |
FUNC_LOG;
|
|
76 |
CIpsSetDataExtension* self = NewLC();
|
|
77 |
CleanupStack::Pop( self );
|
|
78 |
|
|
79 |
return self;
|
|
80 |
}
|
|
81 |
|
|
82 |
// ----------------------------------------------------------------------------
|
|
83 |
// CIpsSetDataExtension::NewLC()
|
|
84 |
// ----------------------------------------------------------------------------
|
|
85 |
//
|
|
86 |
EXPORT_C CIpsSetDataExtension* CIpsSetDataExtension::NewLC()
|
|
87 |
{
|
|
88 |
FUNC_LOG;
|
|
89 |
CIpsSetDataExtension* self =
|
|
90 |
new ( ELeave ) CIpsSetDataExtension();
|
|
91 |
CleanupStack::PushL( self );
|
|
92 |
|
|
93 |
self->ConstructL();
|
|
94 |
|
|
95 |
return self;
|
|
96 |
}
|
|
97 |
|
|
98 |
// ----------------------------------------------------------------------------
|
|
99 |
// CIpsSetDataExtension::ConstructL()
|
|
100 |
// ----------------------------------------------------------------------------
|
|
101 |
//
|
|
102 |
void CIpsSetDataExtension::ConstructL()
|
|
103 |
{
|
|
104 |
FUNC_LOG;
|
|
105 |
iEmailAddress.CreateL( KIpsSetUiMaxSettingsLongTextLength );
|
|
106 |
PopulateDefaults();
|
|
107 |
}
|
|
108 |
|
|
109 |
// ----------------------------------------------------------------------------
|
|
110 |
// CIpsSetDataExtension::CopyL()
|
|
111 |
// ----------------------------------------------------------------------------
|
|
112 |
//
|
|
113 |
void CIpsSetDataExtension::CopyL(
|
|
114 |
const CIpsSetDataExtension& aExtension )
|
|
115 |
{
|
|
116 |
FUNC_LOG;
|
|
117 |
// remove trailing L, function can not leave
|
|
118 |
iStatusFlags = aExtension.iStatusFlags;
|
|
119 |
iMailboxId = aExtension.iMailboxId;
|
|
120 |
iAccountId = aExtension.iAccountId;
|
|
121 |
iExtensionId = aExtension.iExtensionId;
|
|
122 |
iProtocol = aExtension.iProtocol;
|
|
123 |
iHideMessages = aExtension.iHideMessages;
|
|
124 |
iNewMailIndicators = aExtension.iNewMailIndicators;
|
|
125 |
iOpenHtmlMail = aExtension.iOpenHtmlMail;
|
|
126 |
iVersion = aExtension.iVersion;
|
|
127 |
iAlwaysOnlineState = aExtension.iAlwaysOnlineState;
|
|
128 |
iSelectedWeekDays = aExtension.iSelectedWeekDays;
|
|
129 |
iSelectedTimeStart = aExtension.iSelectedTimeStart;
|
|
130 |
iSelectedTimeStop = aExtension.iSelectedTimeStop;
|
|
131 |
iInboxRefreshTime = aExtension.iInboxRefreshTime;
|
|
132 |
iUpdateMode = aExtension.iUpdateMode;
|
|
133 |
iLastUpdateInfo = aExtension.iLastUpdateInfo;
|
|
134 |
iEmailAddress.Copy( aExtension.iEmailAddress );
|
|
135 |
iEmnState = aExtension.iEmnState;
|
|
136 |
iOutgoingLogin = aExtension.iOutgoingLogin;
|
|
137 |
iLastModified = aExtension.iLastModified;
|
|
138 |
iSyncStatus = aExtension.iSyncStatus;
|
|
139 |
//<cmail>
|
|
140 |
iHiddenData = aExtension.iHiddenData;
|
|
141 |
//</cmail>
|
|
142 |
}
|
|
143 |
|
|
144 |
// ----------------------------------------------------------------------------
|
|
145 |
// CIpsSetDataExtension::IsSettingsValid()
|
|
146 |
// ----------------------------------------------------------------------------
|
|
147 |
//
|
|
148 |
EXPORT_C TBool CIpsSetDataExtension::IsSettingsValid() const
|
|
149 |
{
|
|
150 |
FUNC_LOG;
|
|
151 |
|
|
152 |
// this function not work as described,
|
|
153 |
// extension id seems to be > 255 in pop accounts
|
|
154 |
// just comment out and return always true...
|
|
155 |
|
|
156 |
// Verify that the account id is set, extension id is set, mailbox id
|
|
157 |
// is set and the protocol is set to either imap4 or pop3
|
|
158 |
|
|
159 |
// Make sure the mailbox id is valid
|
|
160 |
/*if ( iMailboxId < 0 )
|
|
161 |
{
|
|
162 |
return EFalse;
|
|
163 |
}
|
|
164 |
|
|
165 |
// Make sure that the account id is between 1 <= id <= 255
|
|
166 |
if ( !iAccountId || iAccountId > KIPSMaxAccounts )
|
|
167 |
{
|
|
168 |
return EFalse;
|
|
169 |
}
|
|
170 |
|
|
171 |
// Check the extension id's for each protocol
|
|
172 |
IpsSetDataCtrlAccount accountControl;
|
|
173 |
TUint32 extensionId = accountControl.ExtendedAccountIdToAccountId(
|
|
174 |
iExtensionId, iProtocol );
|
|
175 |
|
|
176 |
// Make sure that the extension id is between 1 <= id <= 255
|
|
177 |
if ( !extensionId || extensionId > KIPSMaxAccounts )
|
|
178 |
{
|
|
179 |
return EFalse;
|
|
180 |
}*/
|
|
181 |
|
|
182 |
// Settings are valid
|
|
183 |
return ETrue;
|
|
184 |
}
|
|
185 |
|
|
186 |
/******************************************************************************
|
|
187 |
|
|
188 |
Extended mail settings
|
|
189 |
|
|
190 |
******************************************************************************/
|
|
191 |
|
|
192 |
// ----------------------------------------------------------------------------
|
|
193 |
// CIpsSetDataExtension::SetStatusFlags()
|
|
194 |
// ----------------------------------------------------------------------------
|
|
195 |
//
|
|
196 |
EXPORT_C void CIpsSetDataExtension::SetStatusFlags(
|
|
197 |
const TUint64 aStatusFlags )
|
|
198 |
{
|
|
199 |
FUNC_LOG;
|
|
200 |
iStatusFlags = aStatusFlags;
|
|
201 |
}
|
|
202 |
|
|
203 |
// ----------------------------------------------------------------------------
|
|
204 |
// CIpsSetDataExtension::StatusFlags()
|
|
205 |
// ----------------------------------------------------------------------------
|
|
206 |
//
|
|
207 |
EXPORT_C TUint64 CIpsSetDataExtension::StatusFlags() const
|
|
208 |
{
|
|
209 |
FUNC_LOG;
|
|
210 |
return iStatusFlags;
|
|
211 |
}
|
|
212 |
|
|
213 |
// ----------------------------------------------------------------------------
|
|
214 |
// CIpsSetDataExtension::SetEmailAddress()
|
|
215 |
// ----------------------------------------------------------------------------
|
|
216 |
//
|
|
217 |
EXPORT_C void CIpsSetDataExtension::SetEmailAddress(
|
|
218 |
const TDesC& aEmailAddress )
|
|
219 |
{
|
|
220 |
FUNC_LOG;
|
|
221 |
iEmailAddress.Copy( aEmailAddress );
|
|
222 |
}
|
|
223 |
|
|
224 |
// ----------------------------------------------------------------------------
|
|
225 |
// CIpsSetDataExtension::EmailAddress()
|
|
226 |
// ----------------------------------------------------------------------------
|
|
227 |
//
|
|
228 |
EXPORT_C const TDesC& CIpsSetDataExtension::EmailAddress() const
|
|
229 |
{
|
|
230 |
FUNC_LOG;
|
|
231 |
return iEmailAddress;
|
|
232 |
}
|
|
233 |
|
|
234 |
// ----------------------------------------------------------------------------
|
|
235 |
// CIpsSetDataExtension::SetEmailNotificationState()
|
|
236 |
// ----------------------------------------------------------------------------
|
|
237 |
//
|
|
238 |
EXPORT_C void CIpsSetDataExtension::SetEmailNotificationState(
|
|
239 |
const TIpsSetDataEmnStates aEmnState )
|
|
240 |
{
|
|
241 |
FUNC_LOG;
|
|
242 |
iEmnState = aEmnState;
|
|
243 |
}
|
|
244 |
|
|
245 |
// ----------------------------------------------------------------------------
|
|
246 |
// CIpsSetDataExtension::EmailNotificationState()
|
|
247 |
// ----------------------------------------------------------------------------
|
|
248 |
//
|
|
249 |
EXPORT_C TIpsSetDataEmnStates CIpsSetDataExtension::EmailNotificationState()
|
|
250 |
const
|
|
251 |
{
|
|
252 |
FUNC_LOG;
|
|
253 |
return iEmnState;
|
|
254 |
}
|
|
255 |
|
|
256 |
// ----------------------------------------------------------------------------
|
|
257 |
// CIpsSetDataExtension::SetNewMailIndicators()
|
|
258 |
// ----------------------------------------------------------------------------
|
|
259 |
//
|
|
260 |
EXPORT_C void CIpsSetDataExtension::SetNewMailIndicators(
|
|
261 |
const TBool aNewState )
|
|
262 |
{
|
|
263 |
FUNC_LOG;
|
|
264 |
iNewMailIndicators = aNewState;
|
|
265 |
}
|
|
266 |
|
|
267 |
// ----------------------------------------------------------------------------
|
|
268 |
// CIpsSetDataExtension::NewMailIndicators()
|
|
269 |
// ----------------------------------------------------------------------------
|
|
270 |
//
|
|
271 |
EXPORT_C TBool CIpsSetDataExtension::NewMailIndicators() const
|
|
272 |
{
|
|
273 |
FUNC_LOG;
|
|
274 |
return iNewMailIndicators;
|
|
275 |
}
|
|
276 |
|
|
277 |
// ----------------------------------------------------------------------------
|
|
278 |
// CIpsSetDataExtension::SetHideMsgs()
|
|
279 |
// ----------------------------------------------------------------------------
|
|
280 |
//
|
|
281 |
EXPORT_C void CIpsSetDataExtension::SetHideMsgs(
|
|
282 |
const TBool aNewState )
|
|
283 |
{
|
|
284 |
FUNC_LOG;
|
|
285 |
iHideMessages = aNewState;
|
|
286 |
}
|
|
287 |
|
|
288 |
// ----------------------------------------------------------------------------
|
|
289 |
// CIpsSetDataExtension::HideMsgs()
|
|
290 |
// ----------------------------------------------------------------------------
|
|
291 |
//
|
|
292 |
EXPORT_C TBool CIpsSetDataExtension::HideMsgs() const
|
|
293 |
{
|
|
294 |
FUNC_LOG;
|
|
295 |
return iHideMessages;
|
|
296 |
}
|
|
297 |
|
|
298 |
// ----------------------------------------------------------------------------
|
|
299 |
// CIpsSetDataExtension::SetOpenHtmlMail()
|
|
300 |
// ----------------------------------------------------------------------------
|
|
301 |
//
|
|
302 |
EXPORT_C void CIpsSetDataExtension::SetOpenHtmlMail(
|
|
303 |
const TInt aOpenHtmlMail )
|
|
304 |
{
|
|
305 |
FUNC_LOG;
|
|
306 |
iOpenHtmlMail = aOpenHtmlMail;
|
|
307 |
}
|
|
308 |
|
|
309 |
// ----------------------------------------------------------------------------
|
|
310 |
// CIpsSetDataExtension::OpenHtmlMail()
|
|
311 |
// ----------------------------------------------------------------------------
|
|
312 |
//
|
|
313 |
EXPORT_C TInt CIpsSetDataExtension::OpenHtmlMail() const
|
|
314 |
{
|
|
315 |
FUNC_LOG;
|
|
316 |
return iOpenHtmlMail;
|
|
317 |
}
|
|
318 |
|
|
319 |
// ----------------------------------------------------------------------------
|
|
320 |
// CIpsSetDataExtension::SetOpenHtmlMail()
|
|
321 |
// ----------------------------------------------------------------------------
|
|
322 |
//
|
|
323 |
EXPORT_C void CIpsSetDataExtension::SetMailboxId(
|
|
324 |
const TMsvId aMailboxId )
|
|
325 |
{
|
|
326 |
FUNC_LOG;
|
|
327 |
iMailboxId = aMailboxId;
|
|
328 |
}
|
|
329 |
|
|
330 |
// ----------------------------------------------------------------------------
|
|
331 |
// CIpsSetDataExtension::OpenHtmlMail()
|
|
332 |
// ----------------------------------------------------------------------------
|
|
333 |
//
|
|
334 |
EXPORT_C TMsvId CIpsSetDataExtension::MailboxId() const
|
|
335 |
{
|
|
336 |
FUNC_LOG;
|
|
337 |
return iMailboxId;
|
|
338 |
}
|
|
339 |
|
|
340 |
// ----------------------------------------------------------------------------
|
|
341 |
// CIpsSetDataExtension::SetAccountId()
|
|
342 |
// ----------------------------------------------------------------------------
|
|
343 |
//
|
|
344 |
EXPORT_C void CIpsSetDataExtension::SetAccountId(
|
|
345 |
const TUint32 aAccountId )
|
|
346 |
{
|
|
347 |
FUNC_LOG;
|
|
348 |
iAccountId = aAccountId;
|
|
349 |
}
|
|
350 |
|
|
351 |
// ----------------------------------------------------------------------------
|
|
352 |
// CIpsSetDataExtension::AccountId()
|
|
353 |
// ----------------------------------------------------------------------------
|
|
354 |
//
|
|
355 |
EXPORT_C TUint32 CIpsSetDataExtension::AccountId() const
|
|
356 |
{
|
|
357 |
FUNC_LOG;
|
|
358 |
return iAccountId;
|
|
359 |
}
|
|
360 |
|
|
361 |
// ----------------------------------------------------------------------------
|
|
362 |
// CIpsSetDataExtension::SetExtensionId()
|
|
363 |
// ----------------------------------------------------------------------------
|
|
364 |
//
|
|
365 |
EXPORT_C void CIpsSetDataExtension::SetExtensionId(
|
|
366 |
const TUint32 aExtensionId )
|
|
367 |
{
|
|
368 |
FUNC_LOG;
|
|
369 |
iExtensionId = aExtensionId;
|
|
370 |
}
|
|
371 |
|
|
372 |
// ----------------------------------------------------------------------------
|
|
373 |
// CIpsSetDataExtension::ExtensionId()
|
|
374 |
// ----------------------------------------------------------------------------
|
|
375 |
//
|
|
376 |
EXPORT_C TUint32 CIpsSetDataExtension::ExtensionId() const
|
|
377 |
{
|
|
378 |
FUNC_LOG;
|
|
379 |
return iExtensionId;
|
|
380 |
}
|
|
381 |
|
|
382 |
// ----------------------------------------------------------------------------
|
|
383 |
// CIpsSetDataExtension::SetProtocol()
|
|
384 |
// ----------------------------------------------------------------------------
|
|
385 |
//
|
|
386 |
EXPORT_C void CIpsSetDataExtension::SetProtocol(
|
|
387 |
const TUid& aProtocol )
|
|
388 |
{
|
|
389 |
FUNC_LOG;
|
|
390 |
iProtocol = aProtocol;
|
|
391 |
}
|
|
392 |
|
|
393 |
// ----------------------------------------------------------------------------
|
|
394 |
// CIpsSetDataExtension::Protocol()
|
|
395 |
// ----------------------------------------------------------------------------
|
|
396 |
//
|
|
397 |
EXPORT_C TUid CIpsSetDataExtension::Protocol() const
|
|
398 |
{
|
|
399 |
FUNC_LOG;
|
|
400 |
return iProtocol;
|
|
401 |
}
|
|
402 |
|
|
403 |
// ----------------------------------------------------------------------------
|
|
404 |
// CIpsSetDataExtension::SetSyncStatus()
|
|
405 |
// ----------------------------------------------------------------------------
|
|
406 |
EXPORT_C void CIpsSetDataExtension::SetSyncStatus( TInt aLastSyncStatus )
|
|
407 |
{
|
|
408 |
FUNC_LOG;
|
|
409 |
iSyncStatus = aLastSyncStatus;
|
|
410 |
}
|
|
411 |
|
|
412 |
// ----------------------------------------------------------------------------
|
|
413 |
// CIpsSetDataExtension::LastSyncStatus()
|
|
414 |
// ----------------------------------------------------------------------------
|
|
415 |
EXPORT_C TInt CIpsSetDataExtension::LastSyncStatus() const
|
|
416 |
{
|
|
417 |
FUNC_LOG;
|
|
418 |
return iSyncStatus;
|
|
419 |
}
|
|
420 |
|
|
421 |
//<cmail>
|
|
422 |
// ----------------------------------------------------------------------------
|
|
423 |
// CIpsSetDataExtension::SetDataHidden()
|
|
424 |
// ----------------------------------------------------------------------------
|
|
425 |
EXPORT_C void CIpsSetDataExtension::SetDataHidden( const TBool aIsHidden )
|
|
426 |
{
|
|
427 |
iHiddenData = aIsHidden;
|
|
428 |
}
|
|
429 |
|
|
430 |
// ----------------------------------------------------------------------------
|
|
431 |
// CIpsSetDataExtension::DataHidden()
|
|
432 |
// ----------------------------------------------------------------------------
|
|
433 |
EXPORT_C TBool CIpsSetDataExtension::DataHidden() const
|
|
434 |
{
|
|
435 |
return iHiddenData;
|
|
436 |
}
|
|
437 |
//</cmail>
|
|
438 |
|
|
439 |
/******************************************************************************
|
|
440 |
|
|
441 |
Always Online settings
|
|
442 |
|
|
443 |
******************************************************************************/
|
|
444 |
|
|
445 |
// ----------------------------------------------------------------------------
|
|
446 |
// CIpsSetDataExtension::Version()
|
|
447 |
// ----------------------------------------------------------------------------
|
|
448 |
//
|
|
449 |
EXPORT_C TInt CIpsSetDataExtension::Version() const
|
|
450 |
{
|
|
451 |
FUNC_LOG;
|
|
452 |
return iVersion;
|
|
453 |
}
|
|
454 |
|
|
455 |
// ----------------------------------------------------------------------------
|
|
456 |
// CIpsSetDataExtension::SetAlwaysOnlineState()
|
|
457 |
// ----------------------------------------------------------------------------
|
|
458 |
//
|
|
459 |
EXPORT_C void CIpsSetDataExtension::SetAlwaysOnlineState(
|
|
460 |
const TIpsSetDataAoStates aAlwaysOnlineState,
|
|
461 |
TBool aIgnoreStateFlag )
|
|
462 |
{
|
|
463 |
FUNC_LOG;
|
|
464 |
iAlwaysOnlineState = aAlwaysOnlineState;
|
|
465 |
|
|
466 |
if ( aIgnoreStateFlag )
|
|
467 |
{
|
|
468 |
//a call from plugin's GoOnline will not change this flag.
|
|
469 |
return;
|
|
470 |
}
|
|
471 |
//EMailAoOff will not cause any flag changes.
|
|
472 |
}
|
|
473 |
|
|
474 |
// ----------------------------------------------------------------------------
|
|
475 |
// CIpsSetDataExtension::AlwaysOnlineState()
|
|
476 |
// ----------------------------------------------------------------------------
|
|
477 |
//
|
|
478 |
EXPORT_C TIpsSetDataAoStates CIpsSetDataExtension::AlwaysOnlineState() const
|
|
479 |
{
|
|
480 |
FUNC_LOG;
|
|
481 |
return iAlwaysOnlineState;
|
|
482 |
}
|
|
483 |
|
|
484 |
// ----------------------------------------------------------------------------
|
|
485 |
// CIpsSetDataExtension::SetSelectedWeekDays()
|
|
486 |
// ----------------------------------------------------------------------------
|
|
487 |
//
|
|
488 |
EXPORT_C void CIpsSetDataExtension::SetSelectedWeekDays(
|
|
489 |
const TUint aSelectedWeekDays )
|
|
490 |
{
|
|
491 |
FUNC_LOG;
|
|
492 |
iSelectedWeekDays = aSelectedWeekDays;
|
|
493 |
}
|
|
494 |
|
|
495 |
// ----------------------------------------------------------------------------
|
|
496 |
// CIpsSetDataExtension::SelectedWeekDays()
|
|
497 |
// ----------------------------------------------------------------------------
|
|
498 |
//
|
|
499 |
EXPORT_C TUint CIpsSetDataExtension::SelectedWeekDays() const
|
|
500 |
{
|
|
501 |
FUNC_LOG;
|
|
502 |
return iSelectedWeekDays;
|
|
503 |
}
|
|
504 |
|
|
505 |
// ----------------------------------------------------------------------------
|
|
506 |
// CIpsSetDataExtension::SetSelectedTimeStart()
|
|
507 |
// ----------------------------------------------------------------------------
|
|
508 |
//
|
|
509 |
EXPORT_C void CIpsSetDataExtension::SetSelectedTimeStart(
|
|
510 |
const TTime aSelectedTimeStart )
|
|
511 |
{
|
|
512 |
FUNC_LOG;
|
|
513 |
iSelectedTimeStart = aSelectedTimeStart;
|
|
514 |
}
|
|
515 |
|
|
516 |
// ----------------------------------------------------------------------------
|
|
517 |
// CIpsSetDataExtension::SelectedTimeStart()
|
|
518 |
// ----------------------------------------------------------------------------
|
|
519 |
//
|
|
520 |
EXPORT_C TTime CIpsSetDataExtension::SelectedTimeStart() const
|
|
521 |
{
|
|
522 |
FUNC_LOG;
|
|
523 |
return iSelectedTimeStart;
|
|
524 |
}
|
|
525 |
|
|
526 |
// ----------------------------------------------------------------------------
|
|
527 |
// CIpsSetDataExtension::SetSelectedTimeStop()
|
|
528 |
// ----------------------------------------------------------------------------
|
|
529 |
//
|
|
530 |
EXPORT_C void CIpsSetDataExtension::SetSelectedTimeStop(
|
|
531 |
const TTime aSelectedTimeStop )
|
|
532 |
{
|
|
533 |
FUNC_LOG;
|
|
534 |
iSelectedTimeStop = aSelectedTimeStop;
|
|
535 |
}
|
|
536 |
|
|
537 |
// ----------------------------------------------------------------------------
|
|
538 |
// CIpsSetDataExtension::SelectedTimeStop()
|
|
539 |
// ----------------------------------------------------------------------------
|
|
540 |
//
|
|
541 |
EXPORT_C TTime CIpsSetDataExtension::SelectedTimeStop() const
|
|
542 |
{
|
|
543 |
FUNC_LOG;
|
|
544 |
return iSelectedTimeStop;
|
|
545 |
}
|
|
546 |
|
|
547 |
// ----------------------------------------------------------------------------
|
|
548 |
// CIpsSetDataExtension::SetInboxRefreshTime()
|
|
549 |
// ----------------------------------------------------------------------------
|
|
550 |
//
|
|
551 |
EXPORT_C void CIpsSetDataExtension::SetInboxRefreshTime(
|
|
552 |
const TInt aInboxRefreshTime )
|
|
553 |
{
|
|
554 |
FUNC_LOG;
|
|
555 |
iInboxRefreshTime = aInboxRefreshTime;
|
|
556 |
}
|
|
557 |
|
|
558 |
// ----------------------------------------------------------------------------
|
|
559 |
// CIpsSetDataExtension::InboxRefreshTime()
|
|
560 |
// ----------------------------------------------------------------------------
|
|
561 |
//
|
|
562 |
EXPORT_C TInt CIpsSetDataExtension::InboxRefreshTime() const
|
|
563 |
{
|
|
564 |
FUNC_LOG;
|
|
565 |
return iInboxRefreshTime;
|
|
566 |
}
|
|
567 |
|
|
568 |
// ----------------------------------------------------------------------------
|
|
569 |
// CIpsSetDataExtension::SetUpdateMode()
|
|
570 |
// ----------------------------------------------------------------------------
|
|
571 |
//
|
|
572 |
EXPORT_C void CIpsSetDataExtension::SetUpdateMode(
|
|
573 |
const TIpsSetDataAoUpdateModes aUpdateMode )
|
|
574 |
{
|
|
575 |
FUNC_LOG;
|
|
576 |
iUpdateMode = aUpdateMode;
|
|
577 |
}
|
|
578 |
|
|
579 |
// ----------------------------------------------------------------------------
|
|
580 |
// CIpsSetDataExtension::UpdateMode()
|
|
581 |
// ----------------------------------------------------------------------------
|
|
582 |
//
|
|
583 |
EXPORT_C TIpsSetDataAoUpdateModes CIpsSetDataExtension::UpdateMode() const
|
|
584 |
{
|
|
585 |
FUNC_LOG;
|
|
586 |
return iUpdateMode;
|
|
587 |
}
|
|
588 |
|
|
589 |
// ----------------------------------------------------------------------------
|
|
590 |
// CIpsSetDataExtension::SetLastUpdateInfo()
|
|
591 |
// ----------------------------------------------------------------------------
|
|
592 |
//
|
|
593 |
EXPORT_C void CIpsSetDataExtension::SetLastUpdateInfo(
|
|
594 |
const TAOInfo& aLastUpdateInfo )
|
|
595 |
{
|
|
596 |
FUNC_LOG;
|
|
597 |
iLastUpdateInfo = aLastUpdateInfo;
|
|
598 |
}
|
|
599 |
|
|
600 |
// ----------------------------------------------------------------------------
|
|
601 |
// CIpsSetDataExtension::LastUpdateInfo()
|
|
602 |
// ----------------------------------------------------------------------------
|
|
603 |
//
|
|
604 |
EXPORT_C TAOInfo CIpsSetDataExtension::LastUpdateInfo() const
|
|
605 |
{
|
|
606 |
FUNC_LOG;
|
|
607 |
return iLastUpdateInfo;
|
|
608 |
}
|
|
609 |
|
|
610 |
// ---------------------------------------------------------------------------
|
|
611 |
// CIpsSetDataExtension::SetOutgoingLogin()
|
|
612 |
// ---------------------------------------------------------------------------
|
|
613 |
//
|
|
614 |
EXPORT_C void CIpsSetDataExtension::SetOutgoingLogin(
|
|
615 |
const TInt aOutgoingLogin )
|
|
616 |
{
|
|
617 |
FUNC_LOG;
|
|
618 |
iOutgoingLogin = aOutgoingLogin;
|
|
619 |
}
|
|
620 |
|
|
621 |
// ---------------------------------------------------------------------------
|
|
622 |
// CIpsSetDataExtension::OutgoingLogin()
|
|
623 |
// ---------------------------------------------------------------------------
|
|
624 |
//
|
|
625 |
EXPORT_C TInt CIpsSetDataExtension::OutgoingLogin() const
|
|
626 |
{
|
|
627 |
FUNC_LOG;
|
|
628 |
return iOutgoingLogin;
|
|
629 |
}
|
|
630 |
|
|
631 |
// ---------------------------------------------------------------------------
|
|
632 |
// ---------------------------------------------------------------------------
|
|
633 |
EXPORT_C void CIpsSetDataExtension::SetLastModified( TTime aTime )
|
|
634 |
{
|
|
635 |
FUNC_LOG;
|
|
636 |
iLastModified = aTime;
|
|
637 |
}
|
|
638 |
|
|
639 |
// ---------------------------------------------------------------------------
|
|
640 |
// ---------------------------------------------------------------------------
|
|
641 |
EXPORT_C TTime CIpsSetDataExtension::LastModified() const
|
|
642 |
{
|
|
643 |
FUNC_LOG;
|
|
644 |
return iLastModified;
|
|
645 |
}
|
|
646 |
|
|
647 |
// ---------------------------------------------------------------------------
|
|
648 |
// ---------------------------------------------------------------------------
|
|
649 |
EXPORT_C void CIpsSetDataExtension::SetEmnReceivedButNotSyncedFlag(
|
|
650 |
TBool aFlag )
|
|
651 |
{
|
|
652 |
iEmnReceivedButNotSyncedFlag = aFlag;
|
|
653 |
}
|
|
654 |
|
|
655 |
// ---------------------------------------------------------------------------
|
|
656 |
// ---------------------------------------------------------------------------
|
|
657 |
EXPORT_C TBool CIpsSetDataExtension::EmnReceivedButNotSyncedFlag() const
|
|
658 |
{
|
|
659 |
return iEmnReceivedButNotSyncedFlag;
|
|
660 |
}
|
|
661 |
|
|
662 |
// ---------------------------------------------------------------------------
|
|
663 |
// ---------------------------------------------------------------------------
|
|
664 |
EXPORT_C void CIpsSetDataExtension::PopulateDefaults()
|
|
665 |
{
|
|
666 |
FUNC_LOG;
|
|
667 |
iOpenHtmlMail = KIpsSetExtDefaultOpenHtmlMail;
|
|
668 |
iVersion = KIpsSetExtDefaultAoVersion;
|
|
669 |
iAlwaysOnlineState = static_cast<TIpsSetDataAoStates>(
|
|
670 |
KIpsSetExtDefaultAlwaysOnlineState);
|
|
671 |
iSelectedWeekDays = KIpsSetExtDefaultSelectedWeekDays;
|
|
672 |
iSelectedTimeStart = KIpsSetExtDefaultSelectedTimeStart;
|
|
673 |
iSelectedTimeStop = KIpsSetExtDefaultSelectedTimeStop;
|
|
674 |
iInboxRefreshTime = KIpsSetExtDefaultInboxRefreshTime;
|
|
675 |
iUpdateMode = static_cast<TIpsSetDataAoUpdateModes>(
|
|
676 |
KIpsSetExtDefaultUpdateMode);
|
|
677 |
iEmailAddress = KNullDesC16;
|
|
678 |
iEmnState = static_cast<TIpsSetDataEmnStates>(
|
|
679 |
KIpsSetExtDefaultEmailNotificationState);
|
|
680 |
iHideMessages = KIpsSetExtDefaultHideMsgs;
|
|
681 |
iNewMailIndicators = KIpsSetExtDefaultNewMailIndicators;
|
|
682 |
iLastUpdateInfo.iLastUpdateFailed =
|
|
683 |
KIpsSetExtDefaultTAOInfoLastUpdateFailed;
|
|
684 |
iLastUpdateInfo.iLastSuccessfulUpdate =
|
|
685 |
KIpsSetExtDefaultTAOInfoLastSuccessfulUpdate;
|
|
686 |
iLastUpdateInfo.iUpdateSuccessfulWithCurSettings =
|
|
687 |
KIpsSetExtDefaultTAOInfoUpdateSuccessfulWithCurSettings;
|
|
688 |
iOutgoingLogin = KIpsSetExtDefaultOutgoingLogin;
|
|
689 |
iLastModified = KIpsSetExtDefaultLastModified;
|
|
690 |
iSyncStatus = KIpsSetExtDefaultSyncStatus;
|
|
691 |
iStatusFlags = KIpsSetExtDefaultStatusFlags;
|
|
692 |
//<cmail>
|
|
693 |
iHiddenData = KIpsSetExtDefaultHiddenData;
|
|
694 |
//</cmail>
|
|
695 |
iEmnReceivedButNotSyncedFlag =
|
|
696 |
KIpsSetExtDefaultEmnReceivedButNotSyncedFlag;
|
|
697 |
iFirstEMNReceived = KIpsSetExtDefaultFirstEMNReceived;
|
|
698 |
}
|
|
699 |
|
|
700 |
// ---------------------------------------------------------------------------
|
|
701 |
// ---------------------------------------------------------------------------
|
|
702 |
EXPORT_C void CIpsSetDataExtension::SetFirstEmnReceived( TBool aValue )
|
|
703 |
{
|
|
704 |
iFirstEMNReceived = aValue;
|
|
705 |
}
|
|
706 |
|
|
707 |
// ---------------------------------------------------------------------------
|
|
708 |
// ---------------------------------------------------------------------------
|
|
709 |
EXPORT_C TBool CIpsSetDataExtension::FirstEmnReceived() const
|
|
710 |
{
|
|
711 |
return iFirstEMNReceived;
|
|
712 |
}
|
|
713 |
// End of File
|
|
714 |
|