|
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 class CIpsSetData. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "emailtrace.h" |
|
20 #include <smtpset.h> |
|
21 #include <pop3set.h> |
|
22 #include <imapset.h> |
|
23 #include <txtrich.h> // CRichText |
|
24 #include <SendUiConsts.h> |
|
25 #include <StringLoader.h> |
|
26 #include <ipssossettings.rsg> |
|
27 |
|
28 #include "ipssetdataapi.h" |
|
29 #include "ipssetdata.h" |
|
30 #include "ipssetdatasignature.h" |
|
31 #include "ipssetdataextension.h" |
|
32 #include "ipssetdatamanager.h" |
|
33 #include "ipssetutils.h" |
|
34 #include "ipssetutilsconsts.h" |
|
35 #include "ipssetutilsconsts.hrh" |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 // ============================ MEMBER FUNCTIONS =============================== |
|
41 |
|
42 // ---------------------------------------------------------------------------- |
|
43 // CIpsSetData::CIpsSetData() |
|
44 // ---------------------------------------------------------------------------- |
|
45 // |
|
46 CIpsSetData::CIpsSetData() |
|
47 { |
|
48 FUNC_LOG; |
|
49 } |
|
50 |
|
51 // ---------------------------------------------------------------------------- |
|
52 // CIpsSetData::~CIpsSetData() |
|
53 // ---------------------------------------------------------------------------- |
|
54 // |
|
55 CIpsSetData::~CIpsSetData() |
|
56 { |
|
57 FUNC_LOG; |
|
58 iName.Close(); |
|
59 iTempStore.Close(); |
|
60 delete iSignature; |
|
61 delete iImap4Settings; |
|
62 delete iPop3Settings; |
|
63 delete iSmtpSettings; |
|
64 delete iExtendedSettings; |
|
65 delete iIncomingIapPref; |
|
66 delete iOutgoingIapPref; |
|
67 } |
|
68 |
|
69 // ---------------------------------------------------------------------------- |
|
70 // CIpsSetData::ConstructL() |
|
71 // ---------------------------------------------------------------------------- |
|
72 // |
|
73 void CIpsSetData::ConstructL() |
|
74 { |
|
75 FUNC_LOG; |
|
76 iName.CreateL( KIpsSetUiMaxSettingsTextLength ); |
|
77 iTempStore.CreateL( KIPsSetUiMaxSettingsUsrNameLength ); |
|
78 iSignature = CIpsSetDataSignature::NewL(); |
|
79 iSignature->CreateEmptyRichTextL(); |
|
80 iSmtpSettings = new ( ELeave ) CImSmtpSettings; |
|
81 iPop3Settings = new ( ELeave ) CImPop3Settings; |
|
82 iImap4Settings = new ( ELeave ) CImImap4Settings; |
|
83 iIncomingIapPref = CImIAPPreferences::NewLC(); |
|
84 CleanupStack::Pop( iIncomingIapPref ); |
|
85 iOutgoingIapPref = CImIAPPreferences::NewLC(); |
|
86 CleanupStack::Pop( iOutgoingIapPref ); |
|
87 iExtendedSettings = CIpsSetDataExtension::NewL(); |
|
88 SetDefaultDataL(); |
|
89 } |
|
90 |
|
91 // ---------------------------------------------------------------------------- |
|
92 // CIpsSetData::NewL() |
|
93 // ---------------------------------------------------------------------------- |
|
94 // |
|
95 CIpsSetData* CIpsSetData::NewL() |
|
96 { |
|
97 FUNC_LOG; |
|
98 CIpsSetData* self = NewLC(); |
|
99 CleanupStack::Pop( self ); |
|
100 |
|
101 return self; |
|
102 } |
|
103 |
|
104 // ---------------------------------------------------------------------------- |
|
105 // CIpsSetData::NewLC() |
|
106 // ---------------------------------------------------------------------------- |
|
107 // |
|
108 CIpsSetData* CIpsSetData::NewLC() |
|
109 { |
|
110 FUNC_LOG; |
|
111 CIpsSetData* self = new ( ELeave ) CIpsSetData(); |
|
112 CleanupStack::PushL( self ); |
|
113 self->ConstructL(); |
|
114 |
|
115 return self; |
|
116 } |
|
117 |
|
118 // ===================== New functions ======================== |
|
119 |
|
120 // --------------------------------------------------------------------------- |
|
121 // CIpsSetData::SetDefaultDataL() |
|
122 // --------------------------------------------------------------------------- |
|
123 // |
|
124 void CIpsSetData::SetDefaultDataL() |
|
125 { |
|
126 FUNC_LOG; |
|
127 |
|
128 CEmailAccounts* accounts = CEmailAccounts::NewL(); |
|
129 CleanupStack::PushL( accounts ); |
|
130 accounts->PopulateDefaultImapSettingsL( *iImap4Settings, *iIncomingIapPref ); |
|
131 accounts->PopulateDefaultPopSettingsL( *iPop3Settings, *iIncomingIapPref ); |
|
132 CleanupStack::PopAndDestroy( accounts ); |
|
133 |
|
134 // POP3 preset settings |
|
135 iPop3Settings->SetAutoSendOnConnect( ETrue ); |
|
136 iPop3Settings->SetDisconnectedUserMode( ETrue ); |
|
137 iPop3Settings->SetDeleteEmailsWhenDisconnecting( EFalse ); |
|
138 iPop3Settings->SetAcknowledgeReceipts( EFalse ); |
|
139 iPop3Settings->SetGetMailOptions( EGetPop3EmailHeaders ); |
|
140 iPop3Settings->SetInboxSynchronisationLimit( |
|
141 KIpsSetFetchHeadersDefaultLimit ); |
|
142 iPop3Settings->SetPopulationLimitL( KIpsSetDataFullBodyAndAttas ); |
|
143 |
|
144 // IMAP4 preset settings |
|
145 iImap4Settings->SetAutoSendOnConnect( ETrue ); |
|
146 iImap4Settings->SetDisconnectedUserMode( ETrue ); |
|
147 iImap4Settings->SetDeleteEmailsWhenDisconnecting( EFalse ); |
|
148 iImap4Settings->SetAcknowledgeReceipts( EFalse ); |
|
149 iImap4Settings->SetSynchronise( EUseLocal ); |
|
150 iImap4Settings->SetInboxSynchronisationLimit( |
|
151 KIpsSetFetchHeadersDefaultLimit ); |
|
152 iImap4Settings->SetBodyTextSizeLimitL( KIpsSetDataFullBodyAndAttas ); |
|
153 |
|
154 // SMTP Preset parameters |
|
155 iSmtpSettings->SetBodyEncoding( EMsgOutboxMIME ); |
|
156 iSmtpSettings->SetAddVCardToEmail( EFalse ); |
|
157 iSmtpSettings->SetAddSignatureToEmail( EFalse ); |
|
158 iSmtpSettings->SetRequestReceipts( EFalse ); |
|
159 iSmtpSettings->SetSMTPAuth( ETrue ); |
|
160 // <cmail> "To" an "Cc" needs to be included |
|
161 // in header of reply/forward mail's body |
|
162 iSmtpSettings->SetToCcIncludeLimitL( KSmtpToCcIncludeLimitMax ); |
|
163 // </cmail> |
|
164 |
|
165 // Extended Preset parameters |
|
166 iExtendedSettings->PopulateDefaults(); |
|
167 } |
|
168 |
|
169 |
|
170 // --------------------------------------------------------------------------- |
|
171 // CIpsSetData::LoadL() |
|
172 // --------------------------------------------------------------------------- |
|
173 // |
|
174 void CIpsSetData::LoadL( const TMsvId aMailboxId, CMsvSession& aSession ) |
|
175 { |
|
176 FUNC_LOG; |
|
177 CIpsSetDataManager* manager = CIpsSetDataManager::NewLC( aSession ); |
|
178 |
|
179 TMsvEntry mbox = IpsSetUtils::GetMailboxEntryL( aSession, aMailboxId ); |
|
180 manager->LoadEmailSettingsL( mbox, *this ); |
|
181 |
|
182 CleanupStack::PopAndDestroy( manager ); |
|
183 manager = NULL; |
|
184 } |
|
185 |
|
186 // --------------------------------------------------------------------------- |
|
187 // CIpsSetData::SaveL() |
|
188 // --------------------------------------------------------------------------- |
|
189 // |
|
190 void CIpsSetData::SaveL( CMsvSession& aSession ) |
|
191 { |
|
192 FUNC_LOG; |
|
193 CIpsSetDataManager* manager = CIpsSetDataManager::NewLC( aSession ); |
|
194 |
|
195 manager->SaveEmailSettingsL( *this ); |
|
196 |
|
197 CleanupStack::PopAndDestroy( manager ); |
|
198 manager = NULL; |
|
199 } |
|
200 |
|
201 // --------------------------------------------------------------------------- |
|
202 // CIpsSetData::IncomingIapPref() |
|
203 // --------------------------------------------------------------------------- |
|
204 // |
|
205 CImIAPPreferences* CIpsSetData::IncomingIapPref() const |
|
206 { |
|
207 FUNC_LOG; |
|
208 return iIncomingIapPref; |
|
209 } |
|
210 |
|
211 // --------------------------------------------------------------------------- |
|
212 // CIpsSetData::OutgoingIapPref() |
|
213 // --------------------------------------------------------------------------- |
|
214 // |
|
215 CImIAPPreferences* CIpsSetData::OutgoingIapPref() const |
|
216 { |
|
217 FUNC_LOG; |
|
218 return iOutgoingIapPref; |
|
219 } |
|
220 |
|
221 |
|
222 // --------------------------------------------------------------------------- |
|
223 // CIpsSetData::Imap4Settings() |
|
224 // --------------------------------------------------------------------------- |
|
225 // |
|
226 CImImap4Settings* CIpsSetData::Imap4Settings() |
|
227 { |
|
228 FUNC_LOG; |
|
229 return iImap4Settings; |
|
230 } |
|
231 |
|
232 // --------------------------------------------------------------------------- |
|
233 // CIpsSetData::Pop3Settings() |
|
234 // --------------------------------------------------------------------------- |
|
235 // |
|
236 CImPop3Settings* CIpsSetData::Pop3Settings() |
|
237 { |
|
238 FUNC_LOG; |
|
239 return iPop3Settings; |
|
240 } |
|
241 |
|
242 |
|
243 // --------------------------------------------------------------------------- |
|
244 // CIpsSetData::SmtpSettings() |
|
245 // --------------------------------------------------------------------------- |
|
246 // |
|
247 CImSmtpSettings* CIpsSetData::SmtpSettings() |
|
248 { |
|
249 FUNC_LOG; |
|
250 return iSmtpSettings; |
|
251 } |
|
252 |
|
253 // --------------------------------------------------------------------------- |
|
254 // CIpsSetData::ExtendedSettings() |
|
255 // --------------------------------------------------------------------------- |
|
256 // |
|
257 CIpsSetDataExtension* CIpsSetData::ExtendedSettings() |
|
258 { |
|
259 FUNC_LOG; |
|
260 return iExtendedSettings; |
|
261 } |
|
262 |
|
263 |
|
264 // --------------------------------------------------------------------------- |
|
265 // CIpsSetData::IsOk() |
|
266 // --------------------------------------------------------------------------- |
|
267 // |
|
268 TBool CIpsSetData::IsOk() |
|
269 { |
|
270 FUNC_LOG; |
|
271 return ETrue; |
|
272 } |
|
273 |
|
274 // --------------------------------------------------------------------------- |
|
275 // CIpsSetData::Protocol() |
|
276 // --------------------------------------------------------------------------- |
|
277 // |
|
278 const TUid& CIpsSetData::Protocol() const |
|
279 { |
|
280 FUNC_LOG; |
|
281 return iProtocol; |
|
282 } |
|
283 |
|
284 |
|
285 // --------------------------------------------------------------------------- |
|
286 // CIpsSetData::ImapAccount() |
|
287 // --------------------------------------------------------------------------- |
|
288 // |
|
289 TImapAccount& CIpsSetData::ImapAccount() |
|
290 { |
|
291 FUNC_LOG; |
|
292 return iImap4AccountId; |
|
293 } |
|
294 |
|
295 // --------------------------------------------------------------------------- |
|
296 // CIpsSetData::ImapAccount() |
|
297 // --------------------------------------------------------------------------- |
|
298 // |
|
299 const TImapAccount& CIpsSetData::ImapAccount() const |
|
300 { |
|
301 FUNC_LOG; |
|
302 return iImap4AccountId; |
|
303 } |
|
304 |
|
305 |
|
306 // --------------------------------------------------------------------------- |
|
307 // CIpsSetData::PopAccount() |
|
308 // --------------------------------------------------------------------------- |
|
309 // |
|
310 TPopAccount& CIpsSetData::PopAccount() |
|
311 { |
|
312 FUNC_LOG; |
|
313 return iPop3AccountId; |
|
314 } |
|
315 |
|
316 // --------------------------------------------------------------------------- |
|
317 // CIpsSetData::PopAccount() |
|
318 // --------------------------------------------------------------------------- |
|
319 // |
|
320 const TPopAccount& CIpsSetData::PopAccount() const |
|
321 { |
|
322 FUNC_LOG; |
|
323 return iPop3AccountId; |
|
324 } |
|
325 |
|
326 // --------------------------------------------------------------------------- |
|
327 // CIpsSetData::SmtpAccount() |
|
328 // --------------------------------------------------------------------------- |
|
329 // |
|
330 TSmtpAccount& CIpsSetData::SmtpAccount() |
|
331 { |
|
332 FUNC_LOG; |
|
333 return iSmtpAccountId; |
|
334 } |
|
335 |
|
336 // --------------------------------------------------------------------------- |
|
337 // CIpsSetData::SmtpAccount() |
|
338 // --------------------------------------------------------------------------- |
|
339 // |
|
340 const TSmtpAccount& CIpsSetData::SmtpAccount() const |
|
341 { |
|
342 FUNC_LOG; |
|
343 return iSmtpAccountId; |
|
344 } |
|
345 |
|
346 // --------------------------------------------------------------------------- |
|
347 // CIpsSetData::EmailAddress() |
|
348 // --------------------------------------------------------------------------- |
|
349 // |
|
350 const TDesC& CIpsSetData::EmailAddress() const |
|
351 { |
|
352 FUNC_LOG; |
|
353 RBuf& temp = *const_cast<RBuf*>( &iTempStore ); |
|
354 temp.Copy( iSmtpSettings->EmailAddress() ); |
|
355 return iTempStore; |
|
356 } |
|
357 |
|
358 // --------------------------------------------------------------------------- |
|
359 // CIpsSetData::ReplyToAddress() |
|
360 // --------------------------------------------------------------------------- |
|
361 // |
|
362 const TDesC& CIpsSetData::ReplyToAddress() const |
|
363 { |
|
364 FUNC_LOG; |
|
365 RBuf& temp = *const_cast<RBuf*>( &iTempStore ); |
|
366 temp.Copy( iSmtpSettings->ReplyToAddress() ); |
|
367 return iTempStore; |
|
368 } |
|
369 |
|
370 // --------------------------------------------------------------------------- |
|
371 // CIpsSetData::MailboxName() |
|
372 // --------------------------------------------------------------------------- |
|
373 // |
|
374 const TDesC& CIpsSetData::MailboxName() const |
|
375 { |
|
376 FUNC_LOG; |
|
377 return iSmtpAccountId.iSmtpAccountName; |
|
378 } |
|
379 |
|
380 // --------------------------------------------------------------------------- |
|
381 // CIpsSetData::MyName() |
|
382 // --------------------------------------------------------------------------- |
|
383 // |
|
384 const TDesC& CIpsSetData::MyName() const |
|
385 { |
|
386 FUNC_LOG; |
|
387 RBuf& temp = *const_cast<RBuf*>( &iTempStore ); |
|
388 temp.Copy( iSmtpSettings->EmailAlias() ); |
|
389 return iTempStore; |
|
390 } |
|
391 |
|
392 // --------------------------------------------------------------------------- |
|
393 // CIpsSetData::IncludeSignature() |
|
394 // --------------------------------------------------------------------------- |
|
395 // |
|
396 TBool CIpsSetData::IncludeSignature() const |
|
397 { |
|
398 FUNC_LOG; |
|
399 return iSmtpSettings->AddSignatureToEmail() ? EIpsSetUiOn : EIpsSetUiOff; |
|
400 } |
|
401 |
|
402 // --------------------------------------------------------------------------- |
|
403 // CIpsSetData::Signature() |
|
404 // --------------------------------------------------------------------------- |
|
405 // |
|
406 CIpsSetDataSignature& CIpsSetData::Signature() |
|
407 { |
|
408 FUNC_LOG; |
|
409 return *iSignature; |
|
410 } |
|
411 |
|
412 // --------------------------------------------------------------------------- |
|
413 // CIpsSetData::Signature() |
|
414 // --------------------------------------------------------------------------- |
|
415 // |
|
416 const CIpsSetDataSignature& CIpsSetData::Signature() const |
|
417 { |
|
418 FUNC_LOG; |
|
419 return *iSignature; |
|
420 } |
|
421 |
|
422 // --------------------------------------------------------------------------- |
|
423 // CIpsSetData::UserName() |
|
424 // --------------------------------------------------------------------------- |
|
425 // |
|
426 const TDesC& CIpsSetData::UserName( const TBool aIncoming ) const |
|
427 { |
|
428 FUNC_LOG; |
|
429 // The method is const type, but we have to store the text into a |
|
430 // temporary storage, so cast the constness away from the variable. |
|
431 RBuf& temp = *const_cast<RBuf*>( &iTempStore ); |
|
432 |
|
433 if ( aIncoming ) |
|
434 { |
|
435 if ( iProtocol == KSenduiMtmImap4Uid ) |
|
436 { |
|
437 temp.Copy( iImap4Settings->LoginName() ); |
|
438 return iTempStore; |
|
439 } |
|
440 else |
|
441 { |
|
442 temp.Copy( iPop3Settings->LoginName() ); |
|
443 return iTempStore; |
|
444 } |
|
445 } |
|
446 else |
|
447 { |
|
448 temp.Copy( iSmtpSettings->LoginName() ); |
|
449 return iTempStore; |
|
450 } |
|
451 } |
|
452 |
|
453 // --------------------------------------------------------------------------- |
|
454 // CIpsSetData::UserPwd() |
|
455 // --------------------------------------------------------------------------- |
|
456 // |
|
457 const TDesC& CIpsSetData::UserPwd( const TBool aIncoming ) const |
|
458 { |
|
459 FUNC_LOG; |
|
460 // The method is const type, but we have to store the text into a |
|
461 // temporary storage, so cast the constness away from the variable. |
|
462 RBuf& temp = *const_cast<RBuf*>( &iTempStore ); |
|
463 |
|
464 if ( aIncoming ) |
|
465 { |
|
466 if ( iProtocol == KSenduiMtmImap4Uid ) |
|
467 { |
|
468 temp.Copy( iImap4Settings->Password() ); |
|
469 return iTempStore; |
|
470 } |
|
471 else |
|
472 { |
|
473 temp.Copy( iPop3Settings->Password() ); |
|
474 return iTempStore; |
|
475 } |
|
476 } |
|
477 else |
|
478 { |
|
479 temp.Copy( iSmtpSettings->Password() ); |
|
480 return iTempStore; |
|
481 } |
|
482 } |
|
483 |
|
484 // --------------------------------------------------------------------------- |
|
485 // CIpsSetData::MailServer() |
|
486 // --------------------------------------------------------------------------- |
|
487 // |
|
488 const TDesC& CIpsSetData::MailServer( const TBool aIncoming ) const |
|
489 { |
|
490 FUNC_LOG; |
|
491 RBuf& temp = *const_cast<RBuf*>( &iTempStore ); |
|
492 |
|
493 if ( aIncoming ) |
|
494 { |
|
495 if ( iProtocol == KSenduiMtmImap4Uid ) |
|
496 { |
|
497 temp.Copy( iImap4Settings->ServerAddress() ); |
|
498 return iTempStore; |
|
499 } |
|
500 else |
|
501 { |
|
502 temp.Copy( iPop3Settings->ServerAddress() ); |
|
503 return iTempStore; |
|
504 } |
|
505 } |
|
506 else |
|
507 { |
|
508 temp.Copy( iSmtpSettings->ServerAddress() ); |
|
509 return iTempStore; |
|
510 } |
|
511 } |
|
512 |
|
513 // --------------------------------------------------------------------------- |
|
514 // CIpsSetData::Iap() |
|
515 // --------------------------------------------------------------------------- |
|
516 // |
|
517 TImIAPChoice CIpsSetData::Iap( const TBool aIncoming ) const |
|
518 { |
|
519 FUNC_LOG; |
|
520 |
|
521 TImIAPChoice ret; |
|
522 ret.iDialogPref = ECommDbDialogPrefPrompt; |
|
523 ret.iIAP = 0; |
|
524 if ( aIncoming ) |
|
525 { |
|
526 if (iIncomingIapPref->SNAPDefined()) |
|
527 { |
|
528 ret.iIAP = iIncomingIapPref->SNAPPreference(); |
|
529 } |
|
530 |
|
531 if ( iIncomingIapPref->NumberOfIAPs() > 0 ) |
|
532 { |
|
533 ret = iIncomingIapPref->IAPPreference(0); |
|
534 } |
|
535 } |
|
536 else |
|
537 { |
|
538 if ( iOutgoingIapPref->NumberOfIAPs() > 0 ) |
|
539 { |
|
540 ret = iOutgoingIapPref->IAPPreference(0); |
|
541 } |
|
542 |
|
543 } |
|
544 return ret; |
|
545 } |
|
546 |
|
547 // --------------------------------------------------------------------------- |
|
548 // CIpsSetData::Security() |
|
549 // --------------------------------------------------------------------------- |
|
550 // |
|
551 TInt CIpsSetData::Security( const TBool aIncoming ) const |
|
552 { |
|
553 FUNC_LOG; |
|
554 const CImBaseEmailSettings& settings = !aIncoming ? |
|
555 *iSmtpSettings : |
|
556 iProtocol == KSenduiMtmImap4Uid ? |
|
557 *static_cast<const CImBaseEmailSettings*>( iImap4Settings ) : |
|
558 *static_cast<const CImBaseEmailSettings*>( iPop3Settings ); |
|
559 return settings.SecureSockets() ? |
|
560 EStartTls : settings.SSLWrapper() ? ESslTls : ESecurityOff; |
|
561 } |
|
562 |
|
563 // --------------------------------------------------------------------------- |
|
564 // CIpsSetData::Port() |
|
565 // --------------------------------------------------------------------------- |
|
566 // |
|
567 TInt CIpsSetData::Port( const TBool aIncoming ) const |
|
568 { |
|
569 FUNC_LOG; |
|
570 if ( aIncoming ) |
|
571 { |
|
572 if ( iProtocol == KSenduiMtmImap4Uid ) |
|
573 { |
|
574 return iImap4Settings->Port(); |
|
575 } |
|
576 else |
|
577 { |
|
578 return iPop3Settings->Port(); |
|
579 } |
|
580 } |
|
581 else |
|
582 { |
|
583 return iSmtpSettings->Port(); |
|
584 } |
|
585 } |
|
586 |
|
587 // --------------------------------------------------------------------------- |
|
588 // CIpsSetData::APop() |
|
589 // --------------------------------------------------------------------------- |
|
590 // |
|
591 TInt CIpsSetData::APop() const |
|
592 { |
|
593 FUNC_LOG; |
|
594 if ( iProtocol == KSenduiMtmImap4Uid ) |
|
595 { |
|
596 return KErrNotFound; |
|
597 } |
|
598 else |
|
599 { |
|
600 return iPop3Settings->Apop() ? EIpsSetUiOn : EIpsSetUiOff; |
|
601 } |
|
602 } |
|
603 |
|
604 // --------------------------------------------------------------------------- |
|
605 // CIpsSetData::UserAuthentication() |
|
606 // --------------------------------------------------------------------------- |
|
607 // |
|
608 TInt CIpsSetData::UserAuthentication() const |
|
609 { |
|
610 FUNC_LOG; |
|
611 return iExtendedSettings->OutgoingLogin(); |
|
612 } |
|
613 |
|
614 // --------------------------------------------------------------------------- |
|
615 // CIpsSetData::ImapPath() |
|
616 // --------------------------------------------------------------------------- |
|
617 // |
|
618 const TDesC& CIpsSetData::ImapPath() const |
|
619 { |
|
620 FUNC_LOG; |
|
621 // The method is const type, but we have to store the text into a |
|
622 // temporary storage, so cast the constness away from the variable. |
|
623 RBuf& temp = *const_cast<RBuf*>( &iTempStore ); |
|
624 |
|
625 if ( iProtocol == KSenduiMtmImap4Uid ) |
|
626 { |
|
627 temp.Copy( iImap4Settings->FolderPath() ); |
|
628 |
|
629 // If path is not set, use default string |
|
630 if ( !temp.Length() ) |
|
631 { |
|
632 HBufC* text = NULL; |
|
633 TRAP_IGNORE( text = StringLoader::LoadL( R_FSE_SETTINGS_MAIL_FOLDER_PATH ) ); |
|
634 temp.Copy( *text ); |
|
635 delete text; |
|
636 text = NULL; |
|
637 } |
|
638 |
|
639 return iTempStore; |
|
640 } |
|
641 else |
|
642 { |
|
643 return KNullDesC; |
|
644 } |
|
645 } |
|
646 |
|
647 // --------------------------------------------------------------------------- |
|
648 // CIpsSetData::DownloadSize() |
|
649 // --------------------------------------------------------------------------- |
|
650 // |
|
651 TInt CIpsSetData::DownloadSize() const |
|
652 { |
|
653 FUNC_LOG; |
|
654 TInt ret(0); |
|
655 if ( iProtocol == KSenduiMtmImap4Uid ) |
|
656 { |
|
657 ret = iImap4Settings->BodyTextSizeLimit(); |
|
658 } |
|
659 else |
|
660 { |
|
661 ret = iPop3Settings->PopulationLimit(); |
|
662 } |
|
663 |
|
664 return ret; |
|
665 } |
|
666 |
|
667 // --------------------------------------------------------------------------- |
|
668 // CIpsSetData::RetrieveLimit() |
|
669 // --------------------------------------------------------------------------- |
|
670 // |
|
671 TInt CIpsSetData::RetrieveLimit( const TRetrieveLimit aType ) const |
|
672 { |
|
673 FUNC_LOG; |
|
674 TInt ret = 0; |
|
675 switch ( aType ) |
|
676 { |
|
677 case EPop3Limit: |
|
678 ret = iPop3Settings->InboxSynchronisationLimit(); |
|
679 break; |
|
680 case EImap4Inbox: |
|
681 ret = iImap4Settings->InboxSynchronisationLimit(); |
|
682 break; |
|
683 case EImap4Folders: |
|
684 ret = iImap4Settings->MailboxSynchronisationLimit(); |
|
685 break; |
|
686 default: |
|
687 break; |
|
688 } |
|
689 return ret; |
|
690 } |
|
691 |
|
692 // --------------------------------------------------------------------------- |
|
693 // CIpsSetData::Schedule() |
|
694 // --------------------------------------------------------------------------- |
|
695 // |
|
696 TInt CIpsSetData::Schedule() const |
|
697 { |
|
698 FUNC_LOG; |
|
699 // First, check if notifications are on, one button off from the checks |
|
700 if ( iExtendedSettings->EmailNotificationState() != EMailEmnOff ) |
|
701 { |
|
702 return ENotification; |
|
703 } |
|
704 // EMN is off, maybe its manual mode |
|
705 else if ( iExtendedSettings->AlwaysOnlineState() == EMailAoOff ) |
|
706 { |
|
707 return EManual; |
|
708 } |
|
709 // Nope, its the interval |
|
710 else |
|
711 { |
|
712 switch ( iExtendedSettings->InboxRefreshTime() ) |
|
713 { |
|
714 case KIpsSetDataFiveMinutes: return E5Mins; |
|
715 case KIpsSetDataTenMinutes: return E10Mins; |
|
716 case KIpsSetDataFifteenMinutes: return E15Mins; |
|
717 case KIpsSetDataThirtyMinutes: return E30Mins; |
|
718 case KIpsSetDataMinutesInHour: return E1Hour; |
|
719 case KIpsSetDataMinutesInFourHours: return E4Hours; |
|
720 case KIpsSetDataMinutesInTwelveHours: return E12Hours; |
|
721 case KIpsSetDataMinutesInOneDay: return E1Day; |
|
722 default: break; |
|
723 } |
|
724 } |
|
725 |
|
726 return E1Hour; |
|
727 } |
|
728 |
|
729 // --------------------------------------------------------------------------- |
|
730 // CIpsSetData::Days() |
|
731 // --------------------------------------------------------------------------- |
|
732 // |
|
733 TInt CIpsSetData::Days() const |
|
734 { |
|
735 FUNC_LOG; |
|
736 return iExtendedSettings->SelectedWeekDays(); |
|
737 } |
|
738 |
|
739 // --------------------------------------------------------------------------- |
|
740 // CIpsSetData::Hours() |
|
741 // --------------------------------------------------------------------------- |
|
742 // |
|
743 TTime CIpsSetData::Hours( const TBool aStartTime ) const |
|
744 { |
|
745 FUNC_LOG; |
|
746 return aStartTime ? |
|
747 iExtendedSettings->SelectedTimeStart() : |
|
748 iExtendedSettings->SelectedTimeStop(); |
|
749 } |
|
750 |
|
751 // --------------------------------------------------------------------------- |
|
752 // CIpsSetData::SetProtocol() |
|
753 // --------------------------------------------------------------------------- |
|
754 // |
|
755 void CIpsSetData::SetProtocol( const TUid& aProtocol ) |
|
756 { |
|
757 FUNC_LOG; |
|
758 iProtocol = aProtocol; |
|
759 } |
|
760 |
|
761 // --------------------------------------------------------------------------- |
|
762 // CIpsSetData::SetEmailAddressL() |
|
763 // --------------------------------------------------------------------------- |
|
764 // |
|
765 void CIpsSetData::SetEmailAddressL( const TDesC& aEmailAddress ) |
|
766 { |
|
767 FUNC_LOG; |
|
768 iSmtpSettings->SetEmailAddressL( aEmailAddress ); |
|
769 iExtendedSettings->SetEmailAddress( aEmailAddress ); |
|
770 } |
|
771 |
|
772 // --------------------------------------------------------------------------- |
|
773 // CIpsSetData::SetReplyToAddressL() |
|
774 // --------------------------------------------------------------------------- |
|
775 // |
|
776 void CIpsSetData::SetReplyToAddressL( const TDesC& aReplyToAddress ) |
|
777 { |
|
778 FUNC_LOG; |
|
779 iSmtpSettings->SetReplyToAddressL( aReplyToAddress ); |
|
780 } |
|
781 |
|
782 // --------------------------------------------------------------------------- |
|
783 // CIpsSetData::SetMailboxName() |
|
784 // --------------------------------------------------------------------------- |
|
785 // |
|
786 void CIpsSetData::SetMailboxName( const TDesC& aMailboxName ) |
|
787 { |
|
788 FUNC_LOG; |
|
789 if ( iProtocol == KSenduiMtmImap4Uid ) |
|
790 { |
|
791 iImap4AccountId.iImapAccountName.Copy( aMailboxName ); |
|
792 } |
|
793 else |
|
794 { |
|
795 iPop3AccountId.iPopAccountName.Copy( aMailboxName ); |
|
796 } |
|
797 |
|
798 iSmtpAccountId.iSmtpAccountName.Copy( aMailboxName ); |
|
799 } |
|
800 |
|
801 // --------------------------------------------------------------------------- |
|
802 // CIpsSetData::SetMyNameL() |
|
803 // --------------------------------------------------------------------------- |
|
804 // |
|
805 void CIpsSetData::SetMyNameL( const TDesC& aMyName ) |
|
806 { |
|
807 FUNC_LOG; |
|
808 iSmtpSettings->SetEmailAliasL( aMyName ); |
|
809 } |
|
810 |
|
811 // --------------------------------------------------------------------------- |
|
812 // CIpsSetData::SetIncludeSignature() |
|
813 // --------------------------------------------------------------------------- |
|
814 // |
|
815 void CIpsSetData::SetIncludeSignature( TBool aIncludeSignature ) |
|
816 { |
|
817 FUNC_LOG; |
|
818 iSmtpSettings->SetAddSignatureToEmail( aIncludeSignature == EIpsSetUiOn ); |
|
819 } |
|
820 |
|
821 // --------------------------------------------------------------------------- |
|
822 // CIpsSetData::SetSignatureL() |
|
823 // --------------------------------------------------------------------------- |
|
824 // |
|
825 void CIpsSetData::SetSignatureL( const TDesC& aSignature ) |
|
826 { |
|
827 FUNC_LOG; |
|
828 iSignature->iRichText->Reset(); |
|
829 iSignature->iRichText->InsertL( 0, aSignature ); |
|
830 } |
|
831 |
|
832 // --------------------------------------------------------------------------- |
|
833 // CIpsSetData::SetUserNameL() |
|
834 // --------------------------------------------------------------------------- |
|
835 // |
|
836 void CIpsSetData::SetUserNameL( |
|
837 const TDesC& aIncomingName, |
|
838 const TDesC& aOutgoingName ) |
|
839 { |
|
840 FUNC_LOG; |
|
841 TBuf8<KIPsSetUiMaxSettingsUsrNameLength> temp; |
|
842 if ( iProtocol == KSenduiMtmImap4Uid ) |
|
843 { |
|
844 temp.Copy( aIncomingName ); |
|
845 iImap4Settings->SetLoginNameL( temp ); |
|
846 } |
|
847 else |
|
848 { |
|
849 temp.Copy( aIncomingName ); |
|
850 iPop3Settings->SetLoginNameL( temp ); |
|
851 } |
|
852 |
|
853 temp.Copy( aOutgoingName ); |
|
854 iSmtpSettings->SetLoginNameL( temp ); |
|
855 } |
|
856 |
|
857 // --------------------------------------------------------------------------- |
|
858 // CIpsSetData::SetUserPwdL() |
|
859 // --------------------------------------------------------------------------- |
|
860 // |
|
861 void CIpsSetData::SetUserPwdL( |
|
862 const TDesC& aIncomingPassword, |
|
863 const TDesC& aOutgoingPassword ) |
|
864 { |
|
865 FUNC_LOG; |
|
866 TBuf8<KIpsSetUiMaxSettingsTextLength> temp; |
|
867 if ( iProtocol == KSenduiMtmImap4Uid ) |
|
868 { |
|
869 temp.Copy( aIncomingPassword ); |
|
870 iImap4Settings->SetPasswordL( temp ); |
|
871 } |
|
872 else |
|
873 { |
|
874 temp.Copy( aIncomingPassword ); |
|
875 iPop3Settings->SetPasswordL( temp ); |
|
876 } |
|
877 |
|
878 temp.Copy( aOutgoingPassword ); |
|
879 iSmtpSettings->SetPasswordL( temp ); |
|
880 } |
|
881 |
|
882 // --------------------------------------------------------------------------- |
|
883 // CIpsSetData::SetMailServerL() |
|
884 // --------------------------------------------------------------------------- |
|
885 // |
|
886 void CIpsSetData::SetMailServerL( |
|
887 const TDesC& aIncomingServer, |
|
888 const TDesC& aOutgoingServer ) |
|
889 { |
|
890 FUNC_LOG; |
|
891 if ( iProtocol == KSenduiMtmImap4Uid ) |
|
892 { |
|
893 iImap4Settings->SetServerAddressL( aIncomingServer ); |
|
894 } |
|
895 else |
|
896 { |
|
897 iPop3Settings->SetServerAddressL( aIncomingServer ); |
|
898 } |
|
899 |
|
900 iSmtpSettings->SetServerAddressL( aOutgoingServer ); |
|
901 } |
|
902 |
|
903 // --------------------------------------------------------------------------- |
|
904 // CIpsSetData::SetIapL() |
|
905 // --------------------------------------------------------------------------- |
|
906 // |
|
907 void CIpsSetData::SetIapL( |
|
908 const TImIAPChoice aIncomingIap, |
|
909 const TImIAPChoice aOutgoingIap ) |
|
910 { |
|
911 FUNC_LOG; |
|
912 // This is not ideal choice, but current situation forces to do this, |
|
913 // until Reset() funcion is exported from class CImIAPPreferences |
|
914 delete iIncomingIapPref; |
|
915 iIncomingIapPref = NULL; |
|
916 delete iOutgoingIapPref; |
|
917 iOutgoingIapPref = NULL; |
|
918 |
|
919 iIncomingIapPref = CImIAPPreferences::NewLC(); |
|
920 CleanupStack::Pop( iIncomingIapPref ); |
|
921 iOutgoingIapPref = CImIAPPreferences::NewLC(); |
|
922 CleanupStack::Pop( iOutgoingIapPref ); |
|
923 iIncomingIapPref->AddIAPL( aIncomingIap ); |
|
924 iOutgoingIapPref->AddIAPL( aOutgoingIap ); |
|
925 } |
|
926 // --------------------------------------------------------------------------- |
|
927 // CIpsSetData::SetIapL() |
|
928 // --------------------------------------------------------------------------- |
|
929 // |
|
930 void CIpsSetData::SetIapL( |
|
931 const CImIAPPreferences& aIncomingIap, |
|
932 const CImIAPPreferences& aOutgoingIap ) |
|
933 { |
|
934 FUNC_LOG; |
|
935 // This is not ideal choice, but current situation forces to do this, |
|
936 // until Reset() funcion is exported from class CImIAPPreferences |
|
937 delete iIncomingIapPref; |
|
938 iIncomingIapPref = NULL; |
|
939 delete iOutgoingIapPref; |
|
940 iOutgoingIapPref = NULL; |
|
941 |
|
942 iIncomingIapPref = CImIAPPreferences::NewLC(); |
|
943 CleanupStack::Pop( iIncomingIapPref ); |
|
944 iOutgoingIapPref = CImIAPPreferences::NewLC(); |
|
945 CleanupStack::Pop( iOutgoingIapPref ); |
|
946 |
|
947 if (aIncomingIap.SNAPDefined()) |
|
948 { |
|
949 iIncomingIapPref->SetSNAPL(aIncomingIap.SNAPPreference()); |
|
950 } |
|
951 else |
|
952 { |
|
953 iIncomingIapPref->AddIAPL( aIncomingIap.IAPPreference(0) ); |
|
954 } |
|
955 |
|
956 if (aOutgoingIap.SNAPDefined()) |
|
957 { |
|
958 iOutgoingIapPref->SetSNAPL(aOutgoingIap.SNAPPreference()); |
|
959 } |
|
960 else |
|
961 { |
|
962 iOutgoingIapPref->AddIAPL( aOutgoingIap.IAPPreference(0) ); |
|
963 } |
|
964 |
|
965 } |
|
966 |
|
967 |
|
968 // --------------------------------------------------------------------------- |
|
969 // CIpsSetData::SetSecurity() |
|
970 // --------------------------------------------------------------------------- |
|
971 // |
|
972 void CIpsSetData::SetSecurity( |
|
973 const TInt aIncomingSecurity, |
|
974 const TInt aOutgoingSecurity ) |
|
975 { |
|
976 FUNC_LOG; |
|
977 CImBaseEmailSettings& settings = ( iProtocol == KSenduiMtmImap4Uid ) ? |
|
978 *static_cast<CImBaseEmailSettings*>( iImap4Settings ): |
|
979 *static_cast<CImBaseEmailSettings*>( iPop3Settings ); |
|
980 |
|
981 DoSetSecurity( aIncomingSecurity, settings ); |
|
982 DoSetSecurity( aOutgoingSecurity, *iSmtpSettings ); |
|
983 } |
|
984 |
|
985 // --------------------------------------------------------------------------- |
|
986 // CIpsSetData::DoSetSecurity() |
|
987 // --------------------------------------------------------------------------- |
|
988 // |
|
989 void CIpsSetData::DoSetSecurity( |
|
990 const TInt aSecurity, |
|
991 CImBaseEmailSettings& aSettings ) |
|
992 { |
|
993 FUNC_LOG; |
|
994 switch( aSecurity ) |
|
995 { |
|
996 case EStartTls: |
|
997 aSettings.SetSecureSockets( ETrue ); |
|
998 aSettings.SetSSLWrapper( EFalse ); |
|
999 break; |
|
1000 |
|
1001 case ESslTls: |
|
1002 aSettings.SetSecureSockets( EFalse ); |
|
1003 aSettings.SetSSLWrapper( ETrue ); |
|
1004 break; |
|
1005 |
|
1006 case ESecurityOff: |
|
1007 aSettings.SetSecureSockets( EFalse ); |
|
1008 aSettings.SetSSLWrapper( EFalse ); |
|
1009 break; |
|
1010 |
|
1011 default: |
|
1012 break; |
|
1013 } |
|
1014 } |
|
1015 |
|
1016 // --------------------------------------------------------------------------- |
|
1017 // CIpsSetData::SetPort() |
|
1018 // --------------------------------------------------------------------------- |
|
1019 // |
|
1020 void CIpsSetData::SetPort( |
|
1021 const TInt aIncomingPort, |
|
1022 const TInt aOutgoingPort ) |
|
1023 { |
|
1024 FUNC_LOG; |
|
1025 if ( iProtocol == KSenduiMtmImap4Uid ) |
|
1026 { |
|
1027 iImap4Settings->SetPort( aIncomingPort ); |
|
1028 } |
|
1029 else |
|
1030 { |
|
1031 iPop3Settings->SetPort( aIncomingPort ); |
|
1032 } |
|
1033 |
|
1034 iSmtpSettings->SetPort( aOutgoingPort ); |
|
1035 } |
|
1036 |
|
1037 // --------------------------------------------------------------------------- |
|
1038 // CIpsSetData::SetAPop() |
|
1039 // --------------------------------------------------------------------------- |
|
1040 // |
|
1041 void CIpsSetData::SetAPop( TInt aAPop ) |
|
1042 { |
|
1043 FUNC_LOG; |
|
1044 if ( iProtocol == KSenduiMtmImap4Uid ) |
|
1045 { |
|
1046 // Do nothing |
|
1047 } |
|
1048 else |
|
1049 { |
|
1050 iPop3Settings->SetApop( aAPop == EIpsSetUiOn ); |
|
1051 } |
|
1052 } |
|
1053 |
|
1054 // --------------------------------------------------------------------------- |
|
1055 // CIpsSetData::SetUserAuthentication() |
|
1056 // --------------------------------------------------------------------------- |
|
1057 // |
|
1058 void CIpsSetData::SetUserAuthentication( TInt aUserAuthentication ) |
|
1059 { |
|
1060 FUNC_LOG; |
|
1061 iExtendedSettings->SetOutgoingLogin( aUserAuthentication ); |
|
1062 } |
|
1063 |
|
1064 // --------------------------------------------------------------------------- |
|
1065 // CIpsSetData::SetImapPathL() |
|
1066 // --------------------------------------------------------------------------- |
|
1067 // |
|
1068 void CIpsSetData::SetImapPathL( const TDesC& aImapPath ) |
|
1069 { |
|
1070 FUNC_LOG; |
|
1071 if ( iProtocol == KSenduiMtmImap4Uid ) |
|
1072 { |
|
1073 TBuf8<KIpsSetUiMaxSettingsTextLength> temp; |
|
1074 |
|
1075 HBufC* text = StringLoader::LoadL( R_FSE_SETTINGS_MAIL_FOLDER_PATH ); |
|
1076 |
|
1077 if( !text->Compare( aImapPath ) ) |
|
1078 { |
|
1079 //If the text matches with the default text, clean the text field |
|
1080 temp.Zero(); |
|
1081 } |
|
1082 else |
|
1083 { |
|
1084 temp.Copy( aImapPath ); |
|
1085 } |
|
1086 |
|
1087 delete text; |
|
1088 text = NULL; |
|
1089 iImap4Settings->SetFolderPathL( temp ); |
|
1090 } |
|
1091 } |
|
1092 |
|
1093 // --------------------------------------------------------------------------- |
|
1094 // CIpsSetData::SetDownloadSizeL() |
|
1095 // --------------------------------------------------------------------------- |
|
1096 // |
|
1097 void CIpsSetData::SetDownloadSizeL( |
|
1098 const TInt aDownloadControl, |
|
1099 const TInt aDownloadSize ) |
|
1100 { |
|
1101 FUNC_LOG; |
|
1102 TInt size = 0; |
|
1103 if ( aDownloadControl == CIpsSetData::EHeaders ) |
|
1104 { |
|
1105 size = KIpsSetDataHeadersOnly; |
|
1106 } |
|
1107 else if ( aDownloadControl == CIpsSetData::EWholeBody ) |
|
1108 { |
|
1109 size = KIpsSetDataFullBodyAndAttas; |
|
1110 } |
|
1111 //<cmail> |
|
1112 else if ( iProtocol == KSenduiMtmPop3Uid && aDownloadControl == CIpsSetData::EHeadersPlus ) |
|
1113 { |
|
1114 // fix for POP that has only 2 radio (IMAP has 3) |
|
1115 // and the second should have value of EWholeBody instead of EHeadersPlus |
|
1116 size = KIpsSetDataFullBodyAndAttas; |
|
1117 } |
|
1118 //</cmail> |
|
1119 else |
|
1120 { |
|
1121 size = aDownloadSize; |
|
1122 } |
|
1123 |
|
1124 if ( iProtocol == KSenduiMtmImap4Uid ) |
|
1125 { |
|
1126 iImap4Settings->SetBodyTextSizeLimitL( size ); |
|
1127 } |
|
1128 else |
|
1129 { |
|
1130 iPop3Settings->SetPopulationLimitL( size ); |
|
1131 } |
|
1132 } |
|
1133 |
|
1134 // --------------------------------------------------------------------------- |
|
1135 // CIpsSetData::SetRetrieveLimit() |
|
1136 // --------------------------------------------------------------------------- |
|
1137 // |
|
1138 void CIpsSetData::SetRetrieveLimit( |
|
1139 TInt aRetrieveLimitPop, |
|
1140 TInt aRetrieveLimitImapInbox, |
|
1141 TInt aRetrieveLimitImapFolders ) |
|
1142 { |
|
1143 FUNC_LOG; |
|
1144 if ( iProtocol == KSenduiMtmImap4Uid ) |
|
1145 { |
|
1146 iImap4Settings->SetInboxSynchronisationLimit( |
|
1147 aRetrieveLimitImapInbox ); |
|
1148 iImap4Settings->SetMailboxSynchronisationLimit( |
|
1149 aRetrieveLimitImapFolders ); |
|
1150 } |
|
1151 else |
|
1152 { |
|
1153 iPop3Settings->SetInboxSynchronisationLimit( aRetrieveLimitPop ); |
|
1154 } |
|
1155 } |
|
1156 |
|
1157 // --------------------------------------------------------------------------- |
|
1158 // CIpsSetData::SetSchedule() |
|
1159 // --------------------------------------------------------------------------- |
|
1160 // |
|
1161 void CIpsSetData::SetSchedule( |
|
1162 const TInt aSchedule, |
|
1163 const TBool /*aRoaming*/ ) |
|
1164 { |
|
1165 FUNC_LOG; |
|
1166 TInt time = 0; |
|
1167 switch ( aSchedule ) |
|
1168 { |
|
1169 case E5Mins: time = KIpsSetDataFiveMinutes; break; |
|
1170 case E10Mins: time = KIpsSetDataTenMinutes; break; |
|
1171 case E15Mins: time = KIpsSetDataFifteenMinutes; break; |
|
1172 case E30Mins: time = KIpsSetDataThirtyMinutes; break; |
|
1173 case E1Hour: time = KIpsSetDataMinutesInHour; break; |
|
1174 case E4Hours: time = KIpsSetDataMinutesInFourHours; break; |
|
1175 case E12Hours: time = KIpsSetDataMinutesInTwelveHours; break; |
|
1176 case E1Day: time = KIpsSetDataMinutesInOneDay; break; |
|
1177 default: break; |
|
1178 }; |
|
1179 |
|
1180 // Always Online in use |
|
1181 if ( aSchedule >= E5Mins && aSchedule <= E1Day ) |
|
1182 { |
|
1183 iExtendedSettings->SetAlwaysOnlineState( EMailAoAlways ); |
|
1184 iExtendedSettings->SetInboxRefreshTime( time ); |
|
1185 iExtendedSettings->SetEmailNotificationState( EMailEmnOff ); |
|
1186 } |
|
1187 // Set EMN |
|
1188 else if ( aSchedule == ENotification ) |
|
1189 { |
|
1190 // set always online state off when emn is on |
|
1191 iExtendedSettings->SetAlwaysOnlineState( EMailAoOff ); |
|
1192 iExtendedSettings->SetEmailNotificationState( EMailEmnAutomatic ); |
|
1193 iExtendedSettings->SetInboxRefreshTime( KErrNotFound ); |
|
1194 } |
|
1195 // Manual connection mode |
|
1196 else |
|
1197 { |
|
1198 iExtendedSettings->SetAlwaysOnlineState( EMailAoOff ); |
|
1199 iExtendedSettings->SetEmailNotificationState( EMailEmnOff ); |
|
1200 iExtendedSettings->SetInboxRefreshTime( KErrNotFound ); |
|
1201 } |
|
1202 } |
|
1203 |
|
1204 // --------------------------------------------------------------------------- |
|
1205 // CIpsSetData::SetDays() |
|
1206 // --------------------------------------------------------------------------- |
|
1207 // |
|
1208 void CIpsSetData::SetDays( TInt aDays ) |
|
1209 { |
|
1210 FUNC_LOG; |
|
1211 iExtendedSettings->SetSelectedWeekDays( aDays ); |
|
1212 } |
|
1213 |
|
1214 // --------------------------------------------------------------------------- |
|
1215 // CIpsSetData::SetHours() |
|
1216 // --------------------------------------------------------------------------- |
|
1217 // |
|
1218 void CIpsSetData::SetHours( |
|
1219 const TInt64 aStartHour, |
|
1220 const TInt64 aStopHour ) |
|
1221 { |
|
1222 FUNC_LOG; |
|
1223 iExtendedSettings->SetSelectedTimeStart( TTime( aStartHour ) ); |
|
1224 iExtendedSettings->SetSelectedTimeStop( TTime( aStopHour ) ); |
|
1225 } |
|
1226 |
|
1227 //<cmail> |
|
1228 // --------------------------------------------------------------------------- |
|
1229 // CIpsSetData::SetDataHide() |
|
1230 // --------------------------------------------------------------------------- |
|
1231 // |
|
1232 void CIpsSetData::SetDataHide( TBool aHideData ) |
|
1233 { |
|
1234 iExtendedSettings->SetDataHidden( aHideData ); |
|
1235 } |
|
1236 //</cmail> |
|
1237 |
|
1238 // End of File |
|
1239 |