ipsservices/ipssosplugin/src/ipsplgimap4connectop.cpp
changeset 59 16ed8d08d0b1
parent 54 997a02608b3a
child 76 38bf5461e270
equal deleted inserted replaced
54:997a02608b3a 59:16ed8d08d0b1
   337     // <qmail>
   337     // <qmail>
   338     iStatus = KRequestPending;
   338     iStatus = KRequestPending;
   339     if ( iDoPlainConnect && !Connected() )
   339     if ( iDoPlainConnect && !Connected() )
   340         {
   340         {
   341         TBuf8<1> parameter;
   341         TBuf8<1> parameter;
       
   342         NM_COMMENT("CIpsPlgImap4ConnectOp: do plain connect");
   342         // connect and synchronise starts background sync or idle
   343         // connect and synchronise starts background sync or idle
   343         iSubOperation = iBaseMtm->InvokeAsyncFunctionL(
   344         iSubOperation = iBaseMtm->InvokeAsyncFunctionL(
   344             KIMAP4MTMConnect, *iSelection, parameter, iStatus);
   345             KIMAP4MTMConnect, *iSelection, parameter, iStatus);
   345         }
   346         }
   346     else if ( Connected() )
   347     else if ( Connected() )
   347         {
   348         {
   348         // in this point cant use "connect and do something" commands,
   349         // in this point cant use "connect and do something" commands,
   349         // use regular sync, when new mails is populated elsewhere.
   350         // use regular sync, when new mails is populated elsewhere.
   350         TBuf8<1> parameter;
   351         TBuf8<1> parameter;
       
   352         NM_COMMENT("CIpsPlgImap4ConnectOp: full sync starting");
   351         iSubOperation = iBaseMtm->InvokeAsyncFunctionL(
   353         iSubOperation = iBaseMtm->InvokeAsyncFunctionL(
   352             KIMAP4MTMFullSync, *iSelection, parameter, iStatus);
   354             KIMAP4MTMFullSync, *iSelection, parameter, iStatus);
   353         }
   355         }
   354     else
   356     else
   355         {
   357         {
   356         // the used command requires an observer to be given even though we're not using it
   358         // the used command requires an observer to be given even though we're not using it
       
   359         NM_COMMENT("CIpsPlgImap4ConnectOp: connect and sync");
   357         TPckg<MMsvImapConnectionObserver*> parameter( NULL );
   360         TPckg<MMsvImapConnectionObserver*> parameter( NULL );
   358         iSubOperation = iBaseMtm->InvokeAsyncFunctionL(
   361         iSubOperation = iBaseMtm->InvokeAsyncFunctionL(
   359             KIMAP4MTMConnectAndSyncCompleteAfterFullSync, 
   362             KIMAP4MTMConnectAndSyncCompleteAfterFullSync, 
   360             *iSelection, parameter, iStatus );
   363             *iSelection, parameter, iStatus );
   361         }
   364         }
   370 // ---------------------------------------------------------------------------- 
   373 // ---------------------------------------------------------------------------- 
   371 void CIpsPlgImap4ConnectOp::DoPopulateAllL()
   374 void CIpsPlgImap4ConnectOp::DoPopulateAllL()
   372     {
   375     {
   373     FUNC_LOG;
   376     FUNC_LOG;
   374     
   377     
       
   378     NM_COMMENT("CIpsPlgImap4ConnectOp: populate all");
   375     // construct partial fetch info according to imap settings
   379     // construct partial fetch info according to imap settings
   376     // <qmail> new function to wrap settings loading
   380     // <qmail> new function to wrap settings loading
   377     CImImap4Settings* settings = GetImapSettingsLC();
   381     CImImap4Settings* settings = GetImapSettingsLC();
   378     TImImap4GetPartialMailInfo info;
   382     TImImap4GetPartialMailInfo info;
   379     ConstructImapPartialFetchInfo( info, *settings );
   383     ConstructImapPartialFetchInfo( info, *settings );