39 public: |
49 public: |
40 |
50 |
41 /* |
51 /* |
42 * NewL |
52 * NewL |
43 */ |
53 */ |
44 static CIpsSosAOSettingsHandler* NewL( TUid aProtocol ); |
54 static CIpsSosAOSettingsHandler* NewL( |
|
55 CMsvSession& aSession, TMsvId aMailboxId ); |
45 |
56 |
46 /* |
57 /* |
47 * Destructor |
58 * Destructor |
48 */ |
59 */ |
49 virtual ~CIpsSosAOSettingsHandler(); |
60 virtual ~CIpsSosAOSettingsHandler(); |
50 |
61 |
51 /** |
62 /** |
52 * List folders subscribed to be synced. |
63 * List folders subscribed to be synced. |
|
64 * Not supported. |
53 */ |
65 */ |
54 void GetSubscribedImapFoldersL( |
66 void GetSubscribedImapFoldersL( |
55 TMsvId aServiceId, |
67 TMsvId aServiceId, |
56 RArray<TMsvId>& aFoldersArray ); |
68 RArray<TMsvId>& aFoldersArray ); |
57 |
69 |
58 /** |
70 /** |
59 * |
71 * Reads TImImap4GetPartialMailInfo data from settings |
|
72 * @param aInfo return parameter |
|
73 * @param aImap4Settings reference to settings |
60 */ |
74 */ |
61 void ConstructImapPartialFetchInfo( |
75 void ConstructImapPartialFetchInfo( |
62 TImImap4GetPartialMailInfo& aInfo, |
76 TImImap4GetPartialMailInfo& aInfo, |
63 CImImap4Settings& aImap4Settings ); |
77 CImImap4Settings& aImap4Settings ); |
64 |
78 |
93 TBool FirstEmnReceived() const; |
106 TBool FirstEmnReceived() const; |
94 |
107 |
95 /** |
108 /** |
96 * Sets a flag when mailbox receives it's first OMA EMN. |
109 * Sets a flag when mailbox receives it's first OMA EMN. |
97 * (email notification) |
110 * (email notification) |
|
111 * @param flag value |
98 */ |
112 */ |
99 void SetFirstEmnReceived( TBool aValue ); |
113 void SetFirstEmnReceived( TBool aValue ); |
100 |
114 |
101 /** |
115 /** |
102 * |
116 * returns value of this flag |
|
117 * @return is flag set |
103 */ |
118 */ |
104 TBool EmnReceivedButNotSyncedFlag() const; |
119 TBool EmnReceivedButNotSyncedFlag() const; |
105 |
120 |
106 /** |
121 /** |
107 * |
122 * sets flag value |
|
123 * @param flag value |
108 */ |
124 */ |
109 void SetEmnReceivedButNotSyncedFlag( TBool aFlag ); |
125 void SetEmnReceivedButNotSyncedFlag( TBool aFlag ); |
110 |
126 |
111 /** |
127 /** |
112 * @return week days selected when sync is active |
128 * @return week days selected when sync is active |
113 */ |
129 */ |
114 TUint SelectedWeekDays() const; |
130 TUint SelectedWeekDays() const; |
115 |
131 |
116 /** |
132 /** |
117 * @return |
133 * @return start time |
118 */ |
134 */ |
119 TTime SelectedTimeStart() const; |
135 TTime SelectedTimeStart() const; |
120 |
136 |
121 /** |
137 /** |
122 * @return |
138 * @return stop time |
123 */ |
139 */ |
124 TTime SelectedTimeStop() const; |
140 TTime SelectedTimeStop() const; |
125 |
141 |
126 /** |
142 /** |
127 * @param aLastUpdateInfo |
143 * @param aLastUpdateInfo |
128 */ |
144 */ |
129 void SetLastUpdateInfo( const IpsServices::TAOInfo& aLastUpdateInfo ); |
145 void SetLastUpdateInfo( const IpsServices::TAOInfo& aLastUpdateInfo ); |
130 |
146 |
131 /** |
147 /** |
132 * @return |
148 * @return info about last update |
133 */ |
149 */ |
134 IpsServices::TAOInfo LastUpdateInfo() const; |
150 IpsServices::TAOInfo LastUpdateInfo() const; |
135 |
151 |
136 /** |
152 /** |
137 * @return |
153 * @return refresh interval |
138 */ |
154 */ |
139 TInt InboxRefreshTime() const; |
155 TInt InboxRefreshTime() const; |
140 |
156 |
141 /** |
157 |
142 * Are we allowed to sync only in home network |
158 /** |
143 * @return true, if home only is selected |
159 * Gets email address from smtp settings. |
144 */ |
160 * @return pointer to emailaddress. ownership is transferred. |
145 TBool RoamHomeOnlyFlag(); |
161 */ |
146 |
162 HBufC* EmailAddressL(); |
147 protected: |
163 |
|
164 private: |
148 |
165 |
149 /* |
166 /* |
150 * Constructor |
167 * Constructor |
151 */ |
168 */ |
152 CIpsSosAOSettingsHandler(); |
169 CIpsSosAOSettingsHandler(CMsvSession& aSession); |
153 |
170 |
154 |
|
155 private: |
171 private: |
156 |
172 |
157 /* |
173 /* |
158 * 2nd phase constructor |
174 * 2nd phase constructor |
159 */ |
175 */ |
160 void ConstructL( TUid aProtocol ); |
176 void ConstructL( TMsvId aMailboxId ); |
161 |
177 |
162 |
178 |
163 /** |
179 /** |
164 * Gets FS plugin id related to protocol |
180 * Gets FS plugin id related to protocol |
165 * @return FS plugin id |
181 * @return FS plugin id |
166 */ |
182 */ |
167 TInt GetFSPluginId() const; |
183 TInt GetFSPluginId() const; |
168 |
184 |
|
185 /** |
|
186 * Constructs NmId type mailbox id from TMsvId and plugin's id. |
|
187 */ |
|
188 NmId MboxId() const; |
|
189 |
|
190 /** |
|
191 * Reads values from extended settings |
|
192 * @param aItem wanted item id |
|
193 * @param aValue return parameter |
|
194 * @return did succeed |
|
195 */ |
|
196 TBool GetSettingValue(IpsServices::SettingItem aItem, QVariant& aValue) const; |
|
197 |
|
198 /** |
|
199 * Sets setting value into extended settings |
|
200 * @param aItem item which to set |
|
201 * @param items data |
|
202 * @return did succeed |
|
203 */ |
|
204 TBool SetSettingValue( |
|
205 const IpsServices::SettingItem aItem, |
|
206 const QVariant& aData); |
|
207 |
|
208 /** |
|
209 * Creates a new key-value pair into cenrep |
|
210 * @param aKey key to be created |
|
211 * @aValue initial value for the key |
|
212 * @return did succeed |
|
213 */ |
|
214 TBool CreateKeyValuePair( |
|
215 const IpsServices::SettingItem aKey, |
|
216 const QVariant& aValue); |
|
217 |
|
218 /** |
|
219 * method to determine daytime and "other" time |
|
220 */ |
|
221 TBool IsDaytime() const; |
|
222 |
|
223 /** |
|
224 * Maps TIPsSetProfiles into TIpsSetDataAoStates |
|
225 */ |
|
226 IpsServices::TIpsSetDataAoStates ProfileIntoAOState( |
|
227 const TInt aProfile) const; |
|
228 |
|
229 |
169 private: |
230 private: |
170 |
231 NmIpsSosAoExtendedSettingsManager* iExtMgr;//owned |
171 TPckgBuf<TIpsPlgPropertyEvent> iPropertyBuf; |
232 TPckgBuf<TIpsPlgPropertyEvent> iPropertyBuf; |
172 TUid iMtmType; |
233 TMsvEntry iEntry; |
173 |
234 CMsvSession& iSession; |
174 }; |
235 }; |
175 |
236 |
176 #endif /*IPSSOSAOSETTINGSHANDLER_H_*/ |
237 #endif /*IPSSOSAOSETTINGSHANDLER_H_*/ |