29 #include "baseplugindelayedopsprivate.h" |
29 #include "baseplugindelayedopsprivate.h" |
30 |
30 |
31 /** |
31 /** |
32 * Base plugin has no particular id. |
32 * Base plugin has no particular id. |
33 */ |
33 */ |
34 EXPORT_C TUint CBasePlugin::GetPluginId() |
34 TUint CBasePlugin::GetPluginId() |
35 { |
35 { |
36 return 0; |
36 return 0; |
37 } |
37 } |
38 |
38 |
39 |
39 |
40 /** |
40 /** |
41 * |
41 * |
42 */ |
42 */ |
43 EXPORT_C TFSMailBoxStatus CBasePlugin::GetMailBoxStatus( |
43 TFSMailBoxStatus CBasePlugin::GetMailBoxStatus( |
44 const TFSMailMsgId& /*aMailBoxId*/ ) |
44 const TFSMailMsgId& /*aMailBoxId*/ ) |
45 { |
45 { |
46 return EFSMailBoxOnline; |
46 return EFSMailBoxOnline; |
47 } |
47 } |
48 |
48 |
49 |
49 |
50 /** |
50 /** |
51 * |
51 * |
52 */ |
52 */ |
53 EXPORT_C TBool CBasePlugin::MailboxHasCapabilityL( |
53 TBool CBasePlugin::MailboxHasCapabilityL( |
54 TFSMailBoxCapabilities /*aCapability*/, |
54 TFSMailBoxCapabilities /*aCapability*/, |
55 TFSMailMsgId /*aMailBoxId*/ ) |
55 TFSMailMsgId /*aMailBoxId*/ ) |
56 { |
56 { |
57 return EFalse; |
57 return EFalse; |
58 } |
58 } |
59 |
59 |
60 |
60 |
61 /** |
61 /** |
62 * |
62 * |
63 */ |
63 */ |
64 EXPORT_C TInt CBasePlugin::WizardDataAvailableL() |
64 TInt CBasePlugin::WizardDataAvailableL() |
65 { |
65 { |
66 return KErrNotSupported; |
66 return KErrNotSupported; |
67 } |
67 } |
68 |
68 |
69 |
69 |
70 /** |
70 /** |
71 * |
71 * |
72 */ |
72 */ |
73 EXPORT_C void CBasePlugin::AuthenticateL( |
73 void CBasePlugin::AuthenticateL( |
74 MFSMailRequestObserver& /*aOperationObserver*/, |
74 MFSMailRequestObserver& /*aOperationObserver*/, |
75 TInt /*aRequestId*/ ) |
75 TInt /*aRequestId*/ ) |
76 { |
76 { |
77 |
77 |
78 } |
78 } |
79 |
79 |
80 |
80 |
81 /** |
81 /** |
82 */ |
82 */ |
83 EXPORT_C void CBasePlugin::SetCredentialsL( |
83 void CBasePlugin::SetCredentialsL( |
84 const TFSMailMsgId& /* aMailBoxId */, |
84 const TFSMailMsgId& /* aMailBoxId */, |
85 const TDesC& /* aUsername */, |
85 const TDesC& /* aUsername */, |
86 const TDesC& /* aPassword */ ) |
86 const TDesC& /* aPassword */ ) |
87 { |
87 { |
88 User::Leave( KErrNotSupported ); |
88 User::Leave( KErrNotSupported ); |
90 |
90 |
91 |
91 |
92 /** |
92 /** |
93 * |
93 * |
94 */ |
94 */ |
95 EXPORT_C TDesC& CBasePlugin::GetBrandingIdL( const TFSMailMsgId& aMailboxId ) |
95 TDesC& CBasePlugin::GetBrandingIdL( const TFSMailMsgId& aMailboxId ) |
96 { |
96 { |
97 CMailboxInfo& mailbox = GetMailboxInfoL( aMailboxId.Id() ); |
97 CMailboxInfo& mailbox = GetMailboxInfoL( aMailboxId.Id() ); |
98 return *mailbox.iBrandingId; |
98 return *mailbox.iBrandingId; |
99 } |
99 } |
100 |
100 |
101 |
101 |
102 /** |
102 /** |
103 * |
103 * |
104 */ |
104 */ |
105 EXPORT_C TInt CBasePlugin::CancelSyncL( const TFSMailMsgId& /*aMailBoxId*/ ) |
105 TInt CBasePlugin::CancelSyncL( const TFSMailMsgId& /*aMailBoxId*/ ) |
106 { |
106 { |
107 return KErrNotSupported; |
107 return KErrNotSupported; |
108 } |
108 } |
109 |
109 |
110 |
110 |
169 |
169 |
170 |
170 |
171 /** |
171 /** |
172 * |
172 * |
173 */ |
173 */ |
174 EXPORT_C void CBasePlugin::SearchL( |
174 void CBasePlugin::SearchL( |
175 const TFSMailMsgId& aMailBoxId, |
175 const TFSMailMsgId& aMailBoxId, |
176 const RArray<TFSMailMsgId>& aFolderIds, |
176 const RArray<TFSMailMsgId>& aFolderIds, |
177 const RPointerArray<TDesC>& aSearchStrings, |
177 const RPointerArray<TDesC>& aSearchStrings, |
178 const TFSMailSortCriteria& aSortCriteria, |
178 const TFSMailSortCriteria& aSortCriteria, |
179 MFSMailBoxSearchObserver& aSearchObserver ) |
179 MFSMailBoxSearchObserver& aSearchObserver ) |
218 |
218 |
219 |
219 |
220 /** |
220 /** |
221 * |
221 * |
222 */ |
222 */ |
223 EXPORT_C void CBasePlugin::CancelSearch( |
223 void CBasePlugin::CancelSearch( |
224 const TFSMailMsgId& aMailBoxId ) |
224 const TFSMailMsgId& aMailBoxId ) |
225 |
225 |
226 { |
226 { |
227 TRAP_IGNORE( DoCancelSearchL( aMailBoxId ) ); |
227 TRAP_IGNORE( DoCancelSearchL( aMailBoxId ) ); |
228 } |
228 } |
229 |
229 |
230 |
230 |
231 /** |
231 /** |
232 * |
232 * |
233 */ |
233 */ |
234 EXPORT_C void CBasePlugin::ClearSearchResultCache( |
234 void CBasePlugin::ClearSearchResultCache( |
235 const TFSMailMsgId& aMailBoxId ) |
235 const TFSMailMsgId& aMailBoxId ) |
236 |
236 |
237 { |
237 { |
238 TRAP_IGNORE( DoClearSearchResultCacheL( aMailBoxId ) ); |
238 TRAP_IGNORE( DoClearSearchResultCacheL( aMailBoxId ) ); |
239 } |
239 } |
243 |
243 |
244 |
244 |
245 /** |
245 /** |
246 * |
246 * |
247 */ |
247 */ |
248 EXPORT_C void CBasePlugin::GoOfflineL( |
248 void CBasePlugin::GoOfflineL( |
249 const TFSMailMsgId& /*aMailBoxId*/ ) |
249 const TFSMailMsgId& /*aMailBoxId*/ ) |
250 { |
250 { |
251 } |
251 } |
252 |
252 |
253 |
253 |
254 /** |
254 /** |
255 * |
255 * |
256 */ |
256 */ |
257 EXPORT_C void CBasePlugin::GoOnlineL( |
257 void CBasePlugin::GoOnlineL( |
258 const TFSMailMsgId& /*aMailBoxId*/ ) |
258 const TFSMailMsgId& /*aMailBoxId*/ ) |
259 { |
259 { |
260 } |
260 } |
261 |
261 |
262 |
262 |
263 /** |
263 /** |
264 * |
264 * |
265 */ |
265 */ |
266 EXPORT_C void CBasePlugin::RefreshNowL( |
266 void CBasePlugin::RefreshNowL( |
267 const TFSMailMsgId& /*aMailBoxId*/, |
267 const TFSMailMsgId& /*aMailBoxId*/, |
268 MFSMailRequestObserver& /*aOperationObserver*/, |
268 MFSMailRequestObserver& /*aOperationObserver*/, |
269 TInt /*aRequestId*/ ) |
269 TInt /*aRequestId*/ ) |
270 { |
270 { |
271 |
271 |
348 |
348 |
349 |
349 |
350 /** |
350 /** |
351 * |
351 * |
352 */ |
352 */ |
353 EXPORT_C TFSProgress CBasePlugin::StatusL( TInt /*aRequestId*/ ) |
353 TFSProgress CBasePlugin::StatusL( TInt /*aRequestId*/ ) |
354 { |
354 { |
355 TFSProgress result = { TFSProgress::EFSStatus_Waiting, 0, 0, 0 }; |
355 TFSProgress result = { TFSProgress::EFSStatus_Waiting, 0, 0, 0 }; |
356 return result; |
356 return result; |
357 } |
357 } |
358 |
358 |
359 |
359 |
360 /** |
360 /** |
361 * Concrete plugins need to call the base plugin's implementation. |
361 * Concrete plugins need to call the base plugin's implementation. |
362 * @param aRequestId |
362 * @param aRequestId |
363 */ |
363 */ |
364 EXPORT_C void CBasePlugin::CancelL( TInt aRequestId ) |
364 void CBasePlugin::CancelL( TInt aRequestId ) |
365 { |
365 { |
366 //find the fetch request and notify the observer. |
366 //find the fetch request and notify the observer. |
367 TInt count = iReqs.Count(); |
367 TInt count = iReqs.Count(); |
368 for ( TInt i = 0; i < count; i++ ) |
368 for ( TInt i = 0; i < count; i++ ) |
369 { |
369 { |
370 if ( iReqs[i]->iRequestId == aRequestId ) |
370 if ( iReqs[i]->iRequestId == aRequestId ) |
371 { |
371 { |
372 CFetchRequester* request = iReqs[i]; |
372 CFetchRequester* request = iReqs[i]; |
373 |
373 //<qmail> |
374 TFSProgress progress = TFSProgress(); |
374 TFSProgress progress = TFSProgress(); |
|
375 //</qmail> |
375 progress.iProgressStatus = TFSProgress::EFSStatus_RequestCancelled; |
376 progress.iProgressStatus = TFSProgress::EFSStatus_RequestCancelled; |
376 progress.iCounter = progress.iMaxCount = 1; |
377 progress.iCounter = progress.iMaxCount = 1; |
377 progress.iError = KErrNone; |
378 progress.iError = KErrNone; |
378 request->iObserver.RequestResponseL( progress, aRequestId ); |
379 request->iObserver.RequestResponseL( progress, aRequestId ); |
379 |
380 |
401 |
402 |
402 /** |
403 /** |
403 * |
404 * |
404 */ |
405 */ |
405 //<qmail> |
406 //<qmail> |
406 EXPORT_C TSSMailSyncState CBasePlugin::CurrentSyncState( |
407 TSSMailSyncState CBasePlugin::CurrentSyncState( |
407 const TFSMailMsgId& /*aMailboxId*/ ) |
408 const TFSMailMsgId& /*aMailboxId*/ ) |
408 { |
409 { |
409 return Idle; |
410 return Idle; |
410 } |
411 } |
411 //</qmail> |
412 //</qmail> |
412 |
413 |
413 /** |
414 /** |
414 * |
415 * |
415 */ |
416 */ |
416 EXPORT_C CMsgStoreAccount* CBasePlugin::GetAccountForMsgBoxL( |
417 CMsgStoreAccount* CBasePlugin::GetAccountForMsgBoxL( |
417 const TFSMailMsgId& aMailboxId ) |
418 const TFSMailMsgId& aMailboxId ) |
418 |
419 |
419 { |
420 { |
420 CMsgStoreAccount* result = NULL; |
421 CMsgStoreAccount* result = NULL; |
421 |
422 |
468 } |
469 } |
469 |
470 |
470 /** |
471 /** |
471 * |
472 * |
472 */ |
473 */ |
473 EXPORT_C /*virtual*/ void CBasePlugin::SetMailboxName( |
474 /*virtual*/ void CBasePlugin::SetMailboxName( |
474 const TFSMailMsgId& /*aMailboxId*/, |
475 const TFSMailMsgId& /*aMailboxId*/, |
475 const TDesC& /*aMailboxName*/ ) |
476 const TDesC& /*aMailboxName*/ ) |
476 { |
477 { |
477 } |
478 } |
478 |
479 |
479 /** |
480 /** |
480 * |
481 * |
481 */ |
482 */ |
482 /*protected*/ EXPORT_C void CBasePlugin::ResetCache() |
483 /*protected*/ void CBasePlugin::ResetCache() |
483 { |
484 { |
484 __LOG_ENTER_SUPPRESS( "ResetCache" ); |
485 __LOG_ENTER_SUPPRESS( "ResetCache" ); |
485 |
486 |
486 ResetBodyCache(); |
487 ResetBodyCache(); |
487 |
488 |
545 |
546 |
546 /** |
547 /** |
547 * |
548 * |
548 */ |
549 */ |
549 /*protected*/ |
550 /*protected*/ |
550 EXPORT_C CMsgStoreMessagePart* CBasePlugin::GetCachedBodyL( |
551 CMsgStoreMessagePart* CBasePlugin::GetCachedBodyL( |
551 TMsgStoreId aPartId ) |
552 TMsgStoreId aPartId ) |
552 { |
553 { |
553 __LOG_ENTER_SUPPRESS( "GetCachedBodyL" ); |
554 __LOG_ENTER_SUPPRESS( "GetCachedBodyL" ); |
554 __ASSERT_DEBUG( NULL != iCacheLine.iMsg, |
555 __ASSERT_DEBUG( NULL != iCacheLine.iMsg, |
555 BasePluginPanic( EInvalidMsgStoreCacheState ) ); |
556 BasePluginPanic( EInvalidMsgStoreCacheState ) ); |
597 |
598 |
598 /** |
599 /** |
599 * |
600 * |
600 */ |
601 */ |
601 /*protected*/ |
602 /*protected*/ |
602 EXPORT_C RPointerArray<CMsgStoreMessagePart>& CBasePlugin::GetCachedBodyChildrenL() |
603 RPointerArray<CMsgStoreMessagePart>& CBasePlugin::GetCachedBodyChildrenL() |
603 { |
604 { |
604 __LOG_ENTER_SUPPRESS( "GetCachedBodyChildrenL" ); |
605 __LOG_ENTER_SUPPRESS( "GetCachedBodyChildrenL" ); |
605 |
606 |
606 __ASSERT_DEBUG( NULL != iCacheLine.iBody, |
607 __ASSERT_DEBUG( NULL != iCacheLine.iBody, |
607 BasePluginPanic( EInvalidMsgStoreCacheState ) ); |
608 BasePluginPanic( EInvalidMsgStoreCacheState ) ); |