|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // CImapSettings header |
|
15 // |
|
16 // |
|
17 |
|
18 #if !defined(__CIMAPSETTINGS_H__) |
|
19 #define __CIMAPSETTINGS_H__ |
|
20 |
|
21 #include <msventry.h> |
|
22 #include <imapset.h> |
|
23 #include <cimapsyncdownloadrules.h> |
|
24 |
|
25 class CImIAPPreferences; |
|
26 class CImapSyncDownloadRules; |
|
27 class CImapTransportBufferSizes; |
|
28 |
|
29 |
|
30 /** |
|
31 @internalComponent |
|
32 @prototype |
|
33 */ |
|
34 class CImapSettings : public CBase |
|
35 { |
|
36 public: |
|
37 IMPORT_C static CImapSettings* NewL(CMsvServerEntry& aServerEntry); |
|
38 ~CImapSettings(); |
|
39 |
|
40 // Indicates if account settings have been loaded |
|
41 IMPORT_C TBool SettingsLoaded() const; |
|
42 |
|
43 // Loads the settings from CenRep |
|
44 IMPORT_C void LoadSettingsL(const TMsvId aId); |
|
45 |
|
46 // Access to the service ID |
|
47 IMPORT_C TMsvId ServiceId() const; |
|
48 |
|
49 // Access to CImBaseEmailSettings |
|
50 IMPORT_C const TPtrC ServerAddress() const; |
|
51 IMPORT_C TUint Port() const; |
|
52 IMPORT_C TBool SecureSockets() const; |
|
53 IMPORT_C TBool SSLWrapper() const; |
|
54 IMPORT_C TBool BearerMobility() const; |
|
55 |
|
56 // Access to CImImap4Settings |
|
57 IMPORT_C const TPtrC8 LoginName() const; |
|
58 IMPORT_C const TPtrC8 Password() const; |
|
59 IMPORT_C const TPtrC8 FolderPath() const; |
|
60 IMPORT_C const TPtrC8 SearchString() const; |
|
61 IMPORT_C const TDesC& PathSeparator() const; |
|
62 IMPORT_C TBool DisconnectedUserMode() const; |
|
63 IMPORT_C TFolderSyncType Synchronise() const; |
|
64 IMPORT_C TFolderSubscribeType Subscribe() const; |
|
65 IMPORT_C TBool DeleteEmailsWhenDisconnecting() const; |
|
66 IMPORT_C TImap4GetMailOptions GetMailOptions() const; |
|
67 IMPORT_C TInt32 InboxSynchronisationLimit() const; |
|
68 IMPORT_C TInt32 MailboxSynchronisationLimit() const; |
|
69 IMPORT_C TBool UpdatingSeenFlags() const; |
|
70 IMPORT_C TUint FetchSize() const; |
|
71 IMPORT_C TBool ImapIdle() const; |
|
72 IMPORT_C TInt ImapIdleTimeout() const; |
|
73 IMPORT_C TBool UseExpunge() const; |
|
74 IMPORT_C TPtrC8 TlsSslDomain() const; |
|
75 IMPORT_C TBool UseSyncDownloadRules() const; |
|
76 IMPORT_C TBool FolderSyncDisabled() const; |
|
77 |
|
78 //Access to SASL authenticate login methods |
|
79 #if (defined SYMBIAN_EMAIL_CAPABILITY_SUPPORT) |
|
80 IMPORT_C TBool FallBack() const; |
|
81 IMPORT_C TBool IMAP4Auth() const; |
|
82 #endif |
|
83 // Access to CImIAPPreferences |
|
84 IMPORT_C const CImIAPPreferences& IAPPreferences() const; |
|
85 |
|
86 IMPORT_C TInt GetSyncDownloadRuleL(CImapSyncDownloadRules::TRulesType aType, TImImap4GetPartialMailInfo& aMailInfo) const; |
|
87 IMPORT_C void GetTransportBufferSizesL(TUint& aFetchRequestSize, TUint& aMaxOutstandingFetchResponses) const; |
|
88 |
|
89 // Access to Resource File data |
|
90 IMPORT_C TInt Store8BitData() const; |
|
91 IMPORT_C const TDesC& DefaultAttachmentName() const; |
|
92 IMPORT_C const HBufC8* DefaultPartialMessageFooter() const; |
|
93 |
|
94 // Setters for settings that can be updated by the Server MTM |
|
95 IMPORT_C void SetPathSeparatorL(const TText8 aPathSeparator); |
|
96 IMPORT_C TInt StorePlainText() const; |
|
97 IMPORT_C void SetCurrentBearerType(TUint32 aBearerType); |
|
98 |
|
99 private: |
|
100 CImapSettings(CMsvServerEntry& aServerEntry); |
|
101 void ConstructL(); |
|
102 |
|
103 void ReadResourceFileL(); |
|
104 // stores the settings to CenRep |
|
105 void SaveSettingsL(); |
|
106 |
|
107 private: |
|
108 |
|
109 /** The CMsvServerEntry to use for accessing the server entry */ |
|
110 CMsvServerEntry& iServerEntry; |
|
111 |
|
112 /** ETrue if settings have been loaded */ |
|
113 TBool iSettingsLoaded; |
|
114 |
|
115 /** The Service ID for the IMAP Service */ |
|
116 TMsvId iServiceId; |
|
117 |
|
118 /** The IMAP Service's settings */ |
|
119 CImImap4Settings* iServiceSettings; |
|
120 |
|
121 /** The IAP preferences relating to IAPs for email*/ |
|
122 CImIAPPreferences* iIapPrefs; |
|
123 |
|
124 /** The path separator is defined by the remote IMAP server and retrieved when the |
|
125 connection is established */ |
|
126 TBufC16<1> iPathSeparator; |
|
127 |
|
128 /** The buffer for Store8BitData flag. The flag value is read from a resource file */ |
|
129 TInt iStore8BitData; |
|
130 |
|
131 /** The buffer for the default atachment name. The value is read from a resource file */ |
|
132 HBufC* iDefaultAttachmentName; |
|
133 |
|
134 /** The default message footer that is appended when an email is only partially fetched. |
|
135 The default partial message footer is defined in IMCM.rss */ |
|
136 HBufC8* iDefaultPartialMessageFooter; |
|
137 |
|
138 /** The StorePlainBodyText flag. The flag value is read from a resource file */ |
|
139 TInt iStorePlainBodyText; |
|
140 |
|
141 /** Download rules for sync phase */ |
|
142 CImapSyncDownloadRules* iSyncDownloadRules; |
|
143 |
|
144 /** Transport buffer sizes for fetch operations */ |
|
145 CImapTransportBufferSizes* iTransportBufferSizes; |
|
146 |
|
147 /** Stores the currently connected brearer type */ |
|
148 TUint32 iCurrentBearerType; |
|
149 }; |
|
150 |
|
151 #endif // __CIMAPSETTINGS_H__ |