emailservices/emailstore/base_plugin/src/basepluginmisc.cpp
branchRCL_3
changeset 24 d189ee25cf9d
parent 23 dcf0eedfc1a3
child 25 3533d4323edc
--- a/emailservices/emailstore/base_plugin/src/basepluginmisc.cpp	Thu Aug 19 09:38:05 2010 +0300
+++ b/emailservices/emailstore/base_plugin/src/basepluginmisc.cpp	Tue Aug 31 15:04:17 2010 +0300
@@ -18,20 +18,20 @@
 
 
 //<cmail>
-#include "msgstore.h"
-#include "msgstoresearchcriteria.h"
-#include "mfsmailboxsearchobserver.h"
+#include "MsgStore.h"
+#include "MsgStoreSearchCriteria.h"
+#include "MFSMailBoxSearchObserver.h"
 //</cmail>
 
-#include "baseplugin.h"
-#include "basepluginpanic.h"
+#include "BasePlugin.h"
+#include "BasePluginPanic.h"
 #include "baseplugincommonutils.h"
 #include "baseplugindelayedopsprivate.h"
 
 /**
  * Base plugin has no particular id.
  */
-EXPORT_C TUint CBasePlugin::GetPluginId()
+TUint CBasePlugin::GetPluginId()
     {
     return 0;
     }
@@ -40,7 +40,7 @@
 /**
  *
  */
-EXPORT_C TFSMailBoxStatus CBasePlugin::GetMailBoxStatus(
+TFSMailBoxStatus CBasePlugin::GetMailBoxStatus(
     const TFSMailMsgId& /*aMailBoxId*/ )
     {
     return EFSMailBoxOnline;
@@ -50,7 +50,7 @@
 /**
  *
  */
-EXPORT_C TBool CBasePlugin::MailboxHasCapabilityL(
+TBool CBasePlugin::MailboxHasCapabilityL(
     TFSMailBoxCapabilities /*aCapability*/,
     TFSMailMsgId /*aMailBoxId*/ )
     {
@@ -61,7 +61,7 @@
 /**
  *
  */
-EXPORT_C TInt CBasePlugin::WizardDataAvailableL()
+TInt CBasePlugin::WizardDataAvailableL()
     {
     return KErrNotSupported;
     }
@@ -70,7 +70,7 @@
 /**
  *
  */
-EXPORT_C void CBasePlugin::AuthenticateL(
+void CBasePlugin::AuthenticateL(
     MFSMailRequestObserver& /*aOperationObserver*/,
     TInt /*aRequestId*/ )
     {
@@ -80,7 +80,7 @@
 
 /**
  */
-EXPORT_C void CBasePlugin::SetCredentialsL(
+void CBasePlugin::SetCredentialsL(
     const TFSMailMsgId& /* aMailBoxId */,
     const TDesC& /* aUsername */,
     const TDesC& /* aPassword */ )
@@ -92,7 +92,7 @@
 /**
  *
  */
-EXPORT_C TDesC& CBasePlugin::GetBrandingIdL( const TFSMailMsgId& aMailboxId )
+TDesC& CBasePlugin::GetBrandingIdL( const TFSMailMsgId& aMailboxId )
     {
     CMailboxInfo& mailbox = GetMailboxInfoL( aMailboxId.Id() );
     return *mailbox.iBrandingId;
@@ -102,7 +102,7 @@
 /**
  *
  */
-EXPORT_C TInt CBasePlugin::CancelSyncL( const TFSMailMsgId& /*aMailBoxId*/ )
+TInt CBasePlugin::CancelSyncL( const TFSMailMsgId& /*aMailBoxId*/ )
 	{
 	return KErrNotSupported;
 	}
@@ -171,7 +171,7 @@
 /**
  *
  */
-EXPORT_C void CBasePlugin::SearchL(
+void CBasePlugin::SearchL(
     const TFSMailMsgId& aMailBoxId,
     const RArray<TFSMailMsgId>& aFolderIds,
     const RPointerArray<TDesC>& aSearchStrings,
@@ -223,7 +223,7 @@
 /**
  *
  */
-EXPORT_C void CBasePlugin::CancelSearch(
+void CBasePlugin::CancelSearch(
     const TFSMailMsgId& aMailBoxId )
 
     {
@@ -234,7 +234,7 @@
 /**
  *
  */
-EXPORT_C void CBasePlugin::ClearSearchResultCache(
+void CBasePlugin::ClearSearchResultCache(
     const TFSMailMsgId& aMailBoxId )
 
     {
@@ -248,7 +248,7 @@
 /**
  *
  */
-EXPORT_C void CBasePlugin::GoOfflineL(
+void CBasePlugin::GoOfflineL(
     const TFSMailMsgId& /*aMailBoxId*/ )
     {
     }
@@ -257,7 +257,7 @@
 /**
  *
  */
-EXPORT_C void CBasePlugin::GoOnlineL(
+void CBasePlugin::GoOnlineL(
     const TFSMailMsgId& /*aMailBoxId*/ )
     {
     }
@@ -266,10 +266,11 @@
 /**
  *
  */
-EXPORT_C void CBasePlugin::RefreshNowL(
+void CBasePlugin::RefreshNowL(
     const TFSMailMsgId& /*aMailBoxId*/,
  	MFSMailRequestObserver& /*aOperationObserver*/,
- 	TInt /*aRequestId*/ )
+ 	TInt /*aRequestId*/,
+ 	const TBool /*aSilentConnection=EFalse*/ )
     {
 
     }
@@ -282,7 +283,7 @@
 /**
  *
  */
-EXPORT_C MDesCArray* CBasePlugin::GetMrusL(
+MDesCArray* CBasePlugin::GetMrusL(
     const TFSMailMsgId& aMailBoxId )
 
     {
@@ -316,7 +317,7 @@
 /**
  *
  */
-EXPORT_C void CBasePlugin::SetMrusL(
+void CBasePlugin::SetMrusL(
     const TFSMailMsgId& aMailBoxId,
     MDesCArray* aNewMruList )
 
@@ -353,7 +354,7 @@
 /**
  *
  */
-EXPORT_C TFSProgress CBasePlugin::StatusL( TInt /*aRequestId*/ )
+TFSProgress CBasePlugin::StatusL( TInt /*aRequestId*/ )
     {
     TFSProgress result = { TFSProgress::EFSStatus_Waiting, 0, 0, 0 };
     return result;
@@ -364,7 +365,7 @@
  * Concrete plugins need to call the base plugin's implementation.
  * @param aRequestId
  */
-EXPORT_C void CBasePlugin::CancelL( TInt aRequestId )
+void CBasePlugin::CancelL( TInt aRequestId )
     {
     //find the fetch request and notify the observer.
     TInt count = iReqs.Count();
@@ -373,8 +374,9 @@
     	if ( iReqs[i]->iRequestId == aRequestId )
     		{
     		CFetchRequester* request = iReqs[i];
-
-    		TFSProgress progress;
+//<qmail>
+    		TFSProgress progress = TFSProgress();
+//</qmail>
     		progress.iProgressStatus = TFSProgress::EFSStatus_RequestCancelled;
     		progress.iCounter = progress.iMaxCount = 1;
     		progress.iError = KErrNone;
@@ -385,13 +387,32 @@
     		break;
     		}
     	}
+//<qmail>		
+    count = iDelayedOpReqs.Count();
+    for ( TInt i = 0; i < count; i++ )
+        {
+        if ( iDelayedOpReqs[i]->iRequestId == aRequestId )
+            {
+            CDelayedOp* request = iDelayedOpReqs[i];
+            TFSProgress progress = TFSProgress();
+            progress.iProgressStatus = TFSProgress::EFSStatus_RequestCancelled;
+            progress.iCounter = progress.iMaxCount = 1;
+            progress.iError = KErrNone;
+            request->iOperationObserver->RequestResponseL( progress, aRequestId );
+            iDelayedOpsManager->DequeueOp(*request);
+            iDelayedOpReqs.Remove( i );
+            delete request;
+            break;
+            }
+        }
+//</qmail>		
     }
 
 
 /**
  *
  */
-EXPORT_C const TFSProgress CBasePlugin::GetLastSyncStatusL(
+const TFSProgress CBasePlugin::GetLastSyncStatusL(
     const TFSMailMsgId& /*aMailBoxId*/ )
 
     {
@@ -405,17 +426,18 @@
 /**
  *
  */
-EXPORT_C TSSMailSyncState CBasePlugin::CurrentSyncState(
+//<qmail>
+TSSMailSyncState CBasePlugin::CurrentSyncState(
             const TFSMailMsgId& /*aMailboxId*/ )
     {
     return Idle;
     }
-
+//</qmail>
 
 /**
  *
  */
-EXPORT_C CMsgStoreAccount* CBasePlugin::GetAccountForMsgBoxL(
+CMsgStoreAccount* CBasePlugin::GetAccountForMsgBoxL(
     const TFSMailMsgId& aMailboxId )
 
     {
@@ -472,7 +494,7 @@
 /**
  *
  */
-EXPORT_C /*virtual*/ void CBasePlugin::SetMailboxName(
+/*virtual*/ void CBasePlugin::SetMailboxName(
     const TFSMailMsgId& /*aMailboxId*/,
     const TDesC& /*aMailboxName*/ )
     {
@@ -481,7 +503,7 @@
 /**
  *
  */
-/*protected*/ EXPORT_C void CBasePlugin::ResetCache()
+/*protected*/ void CBasePlugin::ResetCache()
     {
     __LOG_ENTER_SUPPRESS( "ResetCache" );
 
@@ -499,7 +521,7 @@
 /**
  *
  */
-/*protected*/ EXPORT_C void CBasePlugin::ResetBodyCache()
+/*protected*/ void CBasePlugin::ResetBodyCache()
     {
     __LOG_ENTER_SUPPRESS( "ResetCache" );
     iCacheLine.iBodyChildren.ResetAndDestroy();
@@ -514,7 +536,7 @@
 /**
  *
  */
-/*protected*/ EXPORT_C CMsgStoreMessage* CBasePlugin::GetCachedMsgL(
+/*protected*/ CMsgStoreMessage* CBasePlugin::GetCachedMsgL(
     TMsgStoreId aMailBoxId,
     TMsgStoreId aMsgId )
     {
@@ -549,7 +571,7 @@
  *
  */
 /*protected*/
-EXPORT_C CMsgStoreMessagePart* CBasePlugin::GetCachedBodyL(
+CMsgStoreMessagePart* CBasePlugin::GetCachedBodyL(
     TMsgStoreId aPartId )
     {
     __LOG_ENTER_SUPPRESS( "GetCachedBodyL" );
@@ -577,7 +599,7 @@
  *
  */
 /*protected*/
-EXPORT_C RPointerArray<CMsgStoreMessagePart>& CBasePlugin::GetCachedMsgChildrenL()
+RPointerArray<CMsgStoreMessagePart>& CBasePlugin::GetCachedMsgChildrenL()
     {
     __LOG_ENTER_SUPPRESS( "GetCachedMsgChildrenL" );
 
@@ -601,7 +623,7 @@
  *
  */
 /*protected*/
-EXPORT_C RPointerArray<CMsgStoreMessagePart>& CBasePlugin::GetCachedBodyChildrenL()
+RPointerArray<CMsgStoreMessagePart>& CBasePlugin::GetCachedBodyChildrenL()
     {
     __LOG_ENTER_SUPPRESS( "GetCachedBodyChildrenL" );
 
@@ -624,7 +646,7 @@
 /**
  *
  */
-/*protected*/ EXPORT_C void CBasePlugin::InvalidateCacheIfNecessary(
+/*protected*/ void CBasePlugin::InvalidateCacheIfNecessary(
     TMsgStoreId aId,
     TMsgStoreId aParentId,
     TMsgStoreId aOtherId )
@@ -643,12 +665,12 @@
 /**
  *
  */
-/*public*/ EXPORT_C MDelayedOpsManager& CBasePlugin::GetDelayedOpsManager()
+/*public*/ MDelayedOpsManager& CBasePlugin::GetDelayedOpsManager()
     {
     return *iDelayedOpsManager;
     }
 
-/*protected*/ EXPORT_C const TDesC& CBasePlugin::CalendarFileName() const
+/*protected*/ const TDesC& CBasePlugin::CalendarFileName() const
     {
     return KNullDesC();
     }