139 // Constructs and returns type mailbox id of internal data type TFSMailMsgId |
143 // Constructs and returns type mailbox id of internal data type TFSMailMsgId |
140 // ----------------------------------------------------------------------------- |
144 // ----------------------------------------------------------------------------- |
141 TFSMailMsgId CEmailMailbox::FsMailboxId() const |
145 TFSMailMsgId CEmailMailbox::FsMailboxId() const |
142 { |
146 { |
143 return FsMsgId( iPluginData, iMailboxId ); |
147 return FsMsgId( iPluginData, iMailboxId ); |
144 } |
148 } |
145 |
149 |
146 // ----------------------------------------------------------------------------- |
150 // ----------------------------------------------------------------------------- |
147 // |
151 // |
148 // ----------------------------------------------------------------------------- |
152 // ----------------------------------------------------------------------------- |
149 TInt CEmailMailbox::GetFoldersL( RFolderArray& aFolders ) const |
153 TInt CEmailMailbox::GetFoldersL( RFolderArray& aFolders ) const |
150 { |
154 { |
151 TFSMailMsgId rootId = TFSMailMsgId(); |
155 TFSMailMsgId rootId = TFSMailMsgId(); |
152 RPointerArray<CFSMailFolder> folders; |
156 RPointerArray<CFSMailFolder> folders; |
153 CleanupResetAndDestroyPushL( folders ); |
157 CleanupResetAndDestroyPushL( folders ); |
154 iPlugin->ListFoldersL( FsMailboxId(), rootId, folders ); |
158 iPlugin->ListFoldersL( FsMailboxId(), rootId, folders ); |
155 TInt res( folders.Count() ); |
159 TInt res( folders.Count() ); |
156 for ( TInt i = 0; i < res; i++ ) |
160 for ( TInt i = 0; i < res; i++ ) |
157 { |
161 { |
158 const CFSMailFolder* fsfolder = folders[i]; |
162 const CFSMailFolder* fsfolder = folders[i]; |
159 const TEntryId id = fsfolder->GetFolderId().Id(); |
163 const TEntryId id = fsfolder->GetFolderId().Id(); |
160 const TFolderId folderId( id, iMailboxId ); |
164 const TFolderId folderId( id, iMailboxId ); |
161 CEmailFolder* folder = CEmailFolder::NewLC( iPluginData, folderId, folders[i] ); |
165 CEmailFolder* folder = CEmailFolder::NewLC( iPluginData, folderId, folders[i] ); |
162 aFolders.AppendL( folder ); |
166 aFolders.AppendL( folder ); |
163 CleanupStack::Pop(); // folder |
167 CleanupStack::Pop(); // folder |
164 } |
168 } |
165 CleanupStack::Pop(); // folders |
169 CleanupStack::Pop(); // folders |
166 folders.Close(); // close but don't delete folders because they are |
170 folders.Close(); // close but don't delete folders because they are |
167 // owned by CEmailFolder |
171 // owned by CEmailFolder |
168 return res; |
172 return res; |
169 } |
173 } |
170 |
174 |
171 // ----------------------------------------------------------------------------- |
175 // ----------------------------------------------------------------------------- |
172 // |
176 // |
173 // ----------------------------------------------------------------------------- |
177 // ----------------------------------------------------------------------------- |
174 MEmailFolder* CEmailMailbox::FolderL( const TFolderId& aFolderId ) const |
178 MEmailFolder* CEmailMailbox::FolderL( const TFolderId& aFolderId ) const |
175 { |
179 { |
176 CFSMailFolder* fsFolder = iPlugin->GetFolderByUidL( |
180 CFSMailFolder* fsFolder = iPlugin->GetFolderByUidL( |
177 FsMsgId( iPluginData, iMailboxId ), |
181 FsMsgId( iPluginData, iMailboxId ), |
178 FsMsgId( iPluginData, aFolderId ) ); |
182 FsMsgId( iPluginData, aFolderId ) ); |
179 CleanupStack::PushL( fsFolder ); |
183 CleanupStack::PushL( fsFolder ); |
180 |
184 |
181 CEmailFolder* folder = CEmailFolder::NewL( iPluginData, |
185 CEmailFolder* folder = CEmailFolder::NewL( iPluginData, |
182 aFolderId, fsFolder); |
186 aFolderId, fsFolder); |
183 CleanupStack::Pop(); // folder |
187 CleanupStack::Pop(); // folder |
184 |
188 |
185 return folder; |
189 return folder; |
186 } |
190 } |
187 |
191 |
188 // ----------------------------------------------------------------------------- |
192 // ----------------------------------------------------------------------------- |
189 // |
193 // |
190 // ----------------------------------------------------------------------------- |
194 // ----------------------------------------------------------------------------- |
191 MEmailFolder* CEmailMailbox::FolderByTypeL( |
195 MEmailFolder* CEmailMailbox::FolderByTypeL( |
192 const TFolderType aFolderType ) const |
196 const TFolderType aFolderType ) const |
193 { |
197 { |
194 TFSMailMsgId fsFolderId; |
198 TFSMailMsgId fsFolderId; |
195 |
199 |
196 switch ( aFolderType ) |
200 switch ( aFolderType ) |
197 { |
201 { |
198 case EInbox: |
202 case EInbox: |
199 fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSInbox ); |
203 fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSInbox ); |
200 case EOutbox: |
204 case EOutbox: |
201 fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSOutbox ); |
205 fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSOutbox ); |
202 case EDrafts: |
206 case EDrafts: |
203 fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSDraftsFolder ); |
207 fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSDraftsFolder ); |
204 case EDeleted: |
208 case EDeleted: |
205 fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSDeleted ); |
209 fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSDeleted ); |
206 case ESent: |
210 case ESent: |
207 fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSSentFolder ); |
211 fsFolderId = iPlugin->GetStandardFolderIdL( FsMailboxId(), EFSSentFolder ); |
208 case EOther: |
212 case EOther: |
209 default: |
213 default: |
210 User::Leave( KErrNotFound ); |
214 User::Leave( KErrNotFound ); |
211 break; |
215 break; |
212 } |
216 } |
213 |
217 |
214 const TFolderId folderId( fsFolderId.Id(), iMailboxId ); |
218 const TFolderId folderId( fsFolderId.Id(), iMailboxId ); |
215 |
219 |
216 CFSMailFolder* fsFolder = iPlugin->GetFolderByUidL( |
220 CFSMailFolder* fsFolder = iPlugin->GetFolderByUidL( |
217 FsMsgId( iPluginData, iMailboxId ), |
221 FsMsgId( iPluginData, iMailboxId ), |
218 fsFolderId ); |
222 fsFolderId ); |
219 CleanupStack::PushL( fsFolder ); |
223 CleanupStack::PushL( fsFolder ); |
220 |
224 |
221 CEmailFolder* folder = CEmailFolder::NewL( iPluginData, |
225 CEmailFolder* folder = CEmailFolder::NewL( iPluginData, |
222 folderId, |
226 folderId, |
223 fsFolder ); |
227 fsFolder ); |
224 |
228 |
225 CleanupStack::Pop(); |
229 CleanupStack::Pop(); |
226 |
230 |
227 return folder; |
231 return folder; |
228 } |
232 } |
229 |
233 |
230 // ----------------------------------------------------------------------------- |
234 // ----------------------------------------------------------------------------- |
231 // |
235 // |
232 // ----------------------------------------------------------------------------- |
236 // ----------------------------------------------------------------------------- |
233 MEmailMessage* CEmailMailbox::MessageL( const TMessageId& aMessageId ) |
237 MEmailMessage* CEmailMailbox::MessageL( const TMessageId& aMessageId ) |
234 { |
238 { |
235 CFSMailMessage *fsMessage = iPlugin->GetMessageByUidL( |
239 CFSMailMessage *fsMessage = iPlugin->GetMessageByUidL( |
236 FsMsgId( iPluginData, aMessageId.iFolderId.iMailboxId ), |
240 FsMsgId( iPluginData, aMessageId.iFolderId.iMailboxId ), |
237 FsMsgId( iPluginData, aMessageId.iFolderId ), |
241 FsMsgId( iPluginData, aMessageId.iFolderId ), |
238 FsMsgId( iPluginData, aMessageId ), |
242 FsMsgId( iPluginData, aMessageId ), |
239 EFSMsgDataEnvelope); |
243 EFSMsgDataEnvelope); |
240 |
244 |
241 CleanupStack::PushL( fsMessage ); |
245 CleanupStack::PushL( fsMessage ); |
242 CEmailMessage* message = CEmailMessage::NewL( iPluginData, fsMessage, EClientOwns ); |
246 CEmailMessage* message = CEmailMessage::NewL( iPluginData, fsMessage, EClientOwns ); |
243 CleanupStack::Pop(); // fsMessage |
247 CleanupStack::Pop(); // fsMessage |
244 |
248 |
245 return message; |
249 return message; |
246 } |
250 } |
247 |
251 |
248 // ----------------------------------------------------------------------------- |
252 // ----------------------------------------------------------------------------- |
249 // |
253 // |
250 // ----------------------------------------------------------------------------- |
254 // ----------------------------------------------------------------------------- |
251 MEmailMessage* CEmailMailbox::CreateDraftMessageL() const |
255 MEmailMessage* CEmailMailbox::CreateDraftMessageL() const |
252 { |
256 { |
253 CFSMailMessage* fsMessage = iFsMailbox->CreateMessageToSend(); |
257 CFSMailMessage* fsMessage = iFsMailbox->CreateMessageToSend(); |
254 CleanupStack::PushL( fsMessage ); |
258 User::LeaveIfNull( fsMessage ); |
|
259 CleanupStack::PushL( fsMessage ); |
255 MEmailMessage* message = CEmailMessage::NewL( iPluginData, fsMessage, EClientOwns ); |
260 MEmailMessage* message = CEmailMessage::NewL( iPluginData, fsMessage, EClientOwns ); |
256 CleanupStack::Pop(); // fsMessage |
261 CleanupStack::Pop(); // fsMessage |
257 |
262 |
258 return message; |
263 return message; |
259 } |
264 } |
260 |
265 |
261 // ----------------------------------------------------------------------------- |
266 // ----------------------------------------------------------------------------- |
262 // |
267 // |
263 // ----------------------------------------------------------------------------- |
268 // ----------------------------------------------------------------------------- |
264 MEmailMessage* CEmailMailbox::CreateReplyMessageL( const TMessageId& aMessageId, const TBool aReplyToAll ) const |
269 MEmailMessage* CEmailMailbox::CreateReplyMessageL( const TMessageId& aMessageId, const TBool aReplyToAll ) const |
265 { |
270 { |
266 CFSMailMessage* fsMessage = iFsMailbox->CreateReplyMessage( FsMsgId( iPluginData, aMessageId ), aReplyToAll ); |
271 CFSMailMessage* fsMessage = iFsMailbox->CreateReplyMessage( FsMsgId( iPluginData, aMessageId ), aReplyToAll ); |
267 CleanupStack::PushL( fsMessage ); |
272 User::LeaveIfNull( fsMessage ); |
|
273 CleanupStack::PushL( fsMessage ); |
268 MEmailMessage* message = CEmailMessage::NewL( iPluginData, fsMessage, EClientOwns ); |
274 MEmailMessage* message = CEmailMessage::NewL( iPluginData, fsMessage, EClientOwns ); |
269 CleanupStack::Pop(); // fsMessage |
275 CleanupStack::Pop(); // fsMessage |
270 |
276 |
271 return message; |
277 return message; |
272 } |
278 } |
273 |
279 |
274 // ----------------------------------------------------------------------------- |
280 // ----------------------------------------------------------------------------- |
275 // |
281 // |
276 // ----------------------------------------------------------------------------- |
282 // ----------------------------------------------------------------------------- |
277 MEmailMessage* CEmailMailbox::CreateForwardMessageL( const TMessageId& aMessageId ) const |
283 MEmailMessage* CEmailMailbox::CreateForwardMessageL( const TMessageId& aMessageId ) const |
278 { |
284 { |
279 CFSMailMessage* fsMessage = iFsMailbox->CreateForwardMessage( FsMsgId( iPluginData, aMessageId ) ); |
285 CFSMailMessage* fsMessage = iFsMailbox->CreateForwardMessage( |
280 CleanupStack::PushL( fsMessage ); |
286 FsMsgId( iPluginData, aMessageId ), KNewLine() ); |
|
287 User::LeaveIfNull( fsMessage ); |
|
288 CleanupStack::PushL( fsMessage ); |
281 MEmailMessage* message = CEmailMessage::NewL( iPluginData, fsMessage, EClientOwns ); |
289 MEmailMessage* message = CEmailMessage::NewL( iPluginData, fsMessage, EClientOwns ); |
282 CleanupStack::Pop(); // fsMessage |
290 CleanupStack::Pop(); // fsMessage |
283 |
291 |
284 return message; |
292 return message; |
285 } |
293 } |
286 |
294 |
287 // ----------------------------------------------------------------------------- |
295 // ----------------------------------------------------------------------------- |
288 // |
296 // |
289 // ----------------------------------------------------------------------------- |
297 // ----------------------------------------------------------------------------- |
290 void CEmailMailbox::SynchroniseL( MMailboxSyncObserver& aObserver ) |
298 void CEmailMailbox::SynchroniseL( MMailboxSyncObserver& aObserver ) |
291 { |
299 { |
292 iSyncObserver->SetObserverL( &aObserver ); |
300 iSyncObserver->SetObserverL( &aObserver ); |
293 iRequestId = iFsMailbox->RefreshNowL( *iSyncObserver ); |
301 iRequestId = iFsMailbox->RefreshNowL( *iSyncObserver ); |
294 } |
302 } |
295 |
303 |
296 // ----------------------------------------------------------------------------- |
304 // ----------------------------------------------------------------------------- |
297 // |
305 // |
298 // ----------------------------------------------------------------------------- |
306 // ----------------------------------------------------------------------------- |
299 void CEmailMailbox::CancelSynchronise() |
307 void CEmailMailbox::CancelSynchronise() |
300 { |
308 { |
301 iFsMailbox->CancelSearch(); |
309 iFsMailbox->CancelSearch(); |
302 } |
310 } |
303 |
311 |
304 // ----------------------------------------------------------------------------- |
312 // ----------------------------------------------------------------------------- |
305 // |
313 // |
306 // ----------------------------------------------------------------------------- |
314 // ----------------------------------------------------------------------------- |
307 void CEmailMailbox::RegisterObserverL( MMailboxContentObserver& aObserver ) |
315 void CEmailMailbox::RegisterObserverL( MMailboxContentObserver& aObserver ) |
308 { |
316 { |
309 iEventMapper->AddObserverL( aObserver ); |
317 iEventMapper->AddObserverL( aObserver ); |
310 } |
318 } |
311 |
319 |
312 // ----------------------------------------------------------------------------- |
320 // ----------------------------------------------------------------------------- |
313 // |
321 // |
314 // ----------------------------------------------------------------------------- |
322 // ----------------------------------------------------------------------------- |
315 void CEmailMailbox::UnregisterObserver( MMailboxContentObserver& aObserver ) |
323 void CEmailMailbox::UnregisterObserver( MMailboxContentObserver& aObserver ) |
316 { |
324 { |
317 iEventMapper->RemoveObserver( aObserver ); |
325 iEventMapper->RemoveObserver( aObserver ); |
318 } |
326 } |
319 |
327 |
320 // ----------------------------------------------------------------------------- |
328 // ----------------------------------------------------------------------------- |
321 // |
329 // |
322 // ----------------------------------------------------------------------------- |
330 // ----------------------------------------------------------------------------- |
323 MEmailMessageSearchAsync* CEmailMailbox::MessageSearchL() |
331 MEmailMessageSearchAsync* CEmailMailbox::MessageSearchL() |
324 { |
332 { |
325 MEmailMessageSearchAsync* searchAPI = CEmailMessageSearchAsync::NewL( iPluginData, iMailboxId ); |
333 MEmailMessageSearchAsync* searchAPI = CEmailMessageSearchAsync::NewL( iPluginData, iMailboxId ); |
326 return searchAPI; |
334 return searchAPI; |
327 } |
335 } |
328 |
336 |
329 void CEmailMailbox::ShowInboxL() |
337 void CEmailMailbox::ShowInboxL() |
330 { |
338 { |
331 TMailListActivationData mailListData; |
339 TMailListActivationData mailListData; |
332 |
340 |
333 mailListData.iMailBoxId = FsMsgId(iPluginData, iMailboxId); |
341 mailListData.iMailBoxId = FsMsgId(iPluginData, iMailboxId); |
334 |
342 |
335 TPckgBuf<TMailListActivationData> pkgOut( mailListData ); |
343 TPckgBuf<TMailListActivationData> pkgOut( mailListData ); |
336 CVwsSessionWrapper* viewSrvSession = CVwsSessionWrapper::NewLC(); |
344 CVwsSessionWrapper* viewSrvSession = CVwsSessionWrapper::NewLC(); |
337 viewSrvSession->ActivateView(TVwsViewId(KFSEmailUiUid, MailListId), KStartListWithFolderId, pkgOut); |
345 viewSrvSession->ActivateView(TVwsViewId(KFSEmailUiUid, MailListId), KStartListWithFolderId, pkgOut); |
338 CleanupStack::PopAndDestroy(); |
346 CleanupStack::PopAndDestroy(); |
339 } |
347 } |
340 |
348 |
341 void CEmailMailbox::EditNewMessageL() |
349 void CEmailMailbox::EditNewMessageL() |
342 { |
350 { |
343 TEditorLaunchParams editorLaunchData; |
351 TEditorLaunchParams editorLaunchData; |
344 editorLaunchData.iMailboxId = FsMsgId(iPluginData, iMailboxId); |
352 editorLaunchData.iMailboxId = FsMsgId(iPluginData, iMailboxId); |
345 editorLaunchData.iActivatedExternally = ETrue; |
353 editorLaunchData.iActivatedExternally = ETrue; |
346 |
354 |
347 TPckgBuf<TEditorLaunchParams> pckgData( editorLaunchData ); |
355 TPckgBuf<TEditorLaunchParams> pckgData( editorLaunchData ); |
348 CVwsSessionWrapper* viewSrvSession = CVwsSessionWrapper::NewLC(); |
356 CVwsSessionWrapper* viewSrvSession = CVwsSessionWrapper::NewLC(); |
349 TUid command = TUid::Uid(KEditorCmdCreateNew); |
357 TUid command = TUid::Uid(KEditorCmdCreateNew); |
350 viewSrvSession->ActivateView(TVwsViewId(KFSEmailUiUid, MailEditorId), command, pckgData); |
358 viewSrvSession->ActivateView(TVwsViewId(KFSEmailUiUid, MailEditorId), command, pckgData); |
351 CleanupStack::PopAndDestroy( viewSrvSession ); |
359 CleanupStack::PopAndDestroy( viewSrvSession ); |
416 |
424 |
417 // ----------------------------------------------------------------------------- |
425 // ----------------------------------------------------------------------------- |
418 // Maps protocol a plugin event to client event |
426 // Maps protocol a plugin event to client event |
419 // ----------------------------------------------------------------------------- |
427 // ----------------------------------------------------------------------------- |
420 void CEmailMailbox::TObserverEventMapper::EventL( |
428 void CEmailMailbox::TObserverEventMapper::EventL( |
421 TFSMailEvent aEvent, |
429 TFSMailEvent aEvent, |
422 TFSMailMsgId aMailbox, |
430 TFSMailMsgId aMailbox, |
423 TAny* aParam1, |
431 TAny* aParam1, |
424 TAny* aParam2, |
432 TAny* aParam2, |
425 TAny* aParam3 ) |
433 TAny* aParam3 ) |
426 { |
434 { |
427 const TEventMapFunc KMailboxEventHandlers[] = { |
435 const TEventMapFunc KMailboxEventHandlers[] = { |
428 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
436 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
429 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
437 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
430 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
438 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
431 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
439 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
432 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
440 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
433 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
441 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
434 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
442 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
435 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
443 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
436 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
444 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
437 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
445 CEmailMailbox::TObserverEventMapper::IgnoreEventL, |
438 CEmailMailbox::TObserverEventMapper::NewMessageL, |
446 CEmailMailbox::TObserverEventMapper::NewMessageL, |
439 CEmailMailbox::TObserverEventMapper::MessageChangedL, |
447 CEmailMailbox::TObserverEventMapper::MessageChangedL, |
440 CEmailMailbox::TObserverEventMapper::MessageDeletedL, |
448 CEmailMailbox::TObserverEventMapper::MessageDeletedL, |
441 CEmailMailbox::TObserverEventMapper::MessageMoved, |
449 CEmailMailbox::TObserverEventMapper::MessageMoved, |
442 CEmailMailbox::TObserverEventMapper::MessageCopiedL, |
450 CEmailMailbox::TObserverEventMapper::MessageCopiedL, |
443 CEmailMailbox::TObserverEventMapper::NewFolderL, |
451 CEmailMailbox::TObserverEventMapper::NewFolderL, |
444 CEmailMailbox::TObserverEventMapper::FolderChangeL, |
452 CEmailMailbox::TObserverEventMapper::FolderChangeL, |
445 CEmailMailbox::TObserverEventMapper::FoldersDeletedL, |
453 CEmailMailbox::TObserverEventMapper::FoldersDeletedL, |
446 CEmailMailbox::TObserverEventMapper::FoldersMovedL, |
454 CEmailMailbox::TObserverEventMapper::FoldersMovedL, |
447 CEmailMailbox::TObserverEventMapper::ExceptionL |
455 CEmailMailbox::TObserverEventMapper::ExceptionL |
448 }; |
456 }; |
451 // boundary check |
459 // boundary check |
452 const TInt index( aEvent ); |
460 const TInt index( aEvent ); |
453 if ( index < sizeof( KMailboxEventHandlers ) / sizeof( KMailboxEventHandlers[ index ] ) ) |
461 if ( index < sizeof( KMailboxEventHandlers ) / sizeof( KMailboxEventHandlers[ index ] ) ) |
454 { |
462 { |
455 // call event handler function |
463 // call event handler function |
456 TEventMapFunc method = KMailboxEventHandlers[ index ]; |
464 TEventMapFunc method = KMailboxEventHandlers[ index ]; |
457 (this->*method)(id, aParam1,aParam2,aParam3 ); |
465 (this->*method)(id, aParam1,aParam2,aParam3 ); |
458 } |
466 } |
459 } |
467 } |
460 |
468 |
461 void CEmailMailbox::TObserverEventMapper::IgnoreEventL( |
469 void CEmailMailbox::TObserverEventMapper::IgnoreEventL( |
462 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
470 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
463 { |
471 { |
464 } |
472 } |
465 |
473 |
466 void CEmailMailbox::TObserverEventMapper::NewMessageL( |
474 void CEmailMailbox::TObserverEventMapper::NewMessageL( |
467 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
475 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
468 { |
476 { |
469 } |
477 } |
470 |
478 |
471 void CEmailMailbox::TObserverEventMapper::MessageChangedL( |
479 void CEmailMailbox::TObserverEventMapper::MessageChangedL( |
472 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
480 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
473 { |
481 { |
474 } |
482 } |
475 |
483 |
476 void CEmailMailbox::TObserverEventMapper::MessageDeletedL( |
484 void CEmailMailbox::TObserverEventMapper::MessageDeletedL( |
477 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
485 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
478 { |
486 { |
479 } |
487 } |
480 |
488 |
481 void CEmailMailbox::TObserverEventMapper::MessageMoved( |
489 void CEmailMailbox::TObserverEventMapper::MessageMoved( |
482 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
490 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
483 { |
491 { |
484 } |
492 } |
485 |
493 |
486 void CEmailMailbox::TObserverEventMapper::MessageCopiedL( |
494 void CEmailMailbox::TObserverEventMapper::MessageCopiedL( |
487 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
495 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
488 { |
496 { |
489 } |
497 } |
490 |
498 |
491 void CEmailMailbox::TObserverEventMapper::NewFolderL( |
499 void CEmailMailbox::TObserverEventMapper::NewFolderL( |
492 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
500 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
493 { |
501 { |
494 } |
502 } |
495 |
503 |
496 void CEmailMailbox::TObserverEventMapper::FolderChangeL( |
504 void CEmailMailbox::TObserverEventMapper::FolderChangeL( |
497 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
505 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
498 { |
506 { |
499 } |
507 } |
500 |
508 |
501 void CEmailMailbox::TObserverEventMapper::FoldersDeletedL( |
509 void CEmailMailbox::TObserverEventMapper::FoldersDeletedL( |
502 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
510 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
503 { |
511 { |
504 } |
512 } |
505 |
513 |
506 void CEmailMailbox::TObserverEventMapper::FoldersMovedL( |
514 void CEmailMailbox::TObserverEventMapper::FoldersMovedL( |
507 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
515 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
508 { |
516 { |
509 } |
517 } |
510 |
518 |
511 void CEmailMailbox::TObserverEventMapper::ExceptionL( |
519 void CEmailMailbox::TObserverEventMapper::ExceptionL( |
512 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
520 TMailboxId /*aMailbox*/, TAny* /*aParam1*/, TAny* /*aParam2*/, TAny* /*aParam3*/ ) |
513 { |
521 { |
514 } |
522 } |
515 |
523 |
516 |
524 |
517 // ----------------------------------------------------------------------------- |
525 // ----------------------------------------------------------------------------- |
518 // |
526 // |
519 // ----------------------------------------------------------------------------- |
527 // ----------------------------------------------------------------------------- |
520 TBool CEmailMailbox::TObserverEventMapper::Equals( const MMailboxContentObserver& a1, const MMailboxContentObserver& a2 ) |
528 TBool CEmailMailbox::TObserverEventMapper::Equals( const MMailboxContentObserver& a1, const MMailboxContentObserver& a2 ) |
521 { |
529 { |
522 return ( &a1 == &a2 ); |
530 return ( &a1 == &a2 ); |
523 } |
531 } |
524 |
532 |
525 |
533 |
526 CEmailMailbox::CEmailRequestObserver::CEmailRequestObserver() : iObserver( NULL ) |
534 CEmailMailbox::CEmailRequestObserver::CEmailRequestObserver() : iObserver( NULL ) |
527 { |
535 { |
528 } |
536 } |
529 |
537 |
530 |
538 |
531 void CEmailMailbox::CEmailRequestObserver::RequestResponseL( TFSProgress aEvent, TInt /* aRequestId */ ) |
539 void CEmailMailbox::CEmailRequestObserver::RequestResponseL( TFSProgress aEvent, TInt /* aRequestId */ ) |
532 { |
540 { |
533 if (aEvent.iProgressStatus == TFSProgress::EFSStatus_RequestComplete) |
541 if (aEvent.iProgressStatus == TFSProgress::EFSStatus_RequestComplete) |
534 { |
542 { |
535 iObserver->MailboxSynchronisedL(aEvent.iError); |
543 iObserver->MailboxSynchronisedL(aEvent.iError); |
536 } |
544 } |
537 } |
545 } |
538 |
546 |
539 void CEmailMailbox::CEmailRequestObserver::SetObserverL( MMailboxSyncObserver* aObserver ) |
547 void CEmailMailbox::CEmailRequestObserver::SetObserverL( MMailboxSyncObserver* aObserver ) |
540 { |
548 { |