ipsservices/ipssosplugin/src/ipsplgpop3fetchoperation.cpp
changeset 43 99bcbff212ad
parent 23 2dc6caa42ec3
child 68 83cc6bae1de8
equal deleted inserted replaced
42:139d4b7b2938 43:99bcbff212ad
   143     FUNC_LOG;
   143     FUNC_LOG;
   144     
   144     
   145 
   145 
   146     iState = EStateConnecting;
   146     iState = EStateConnecting;
   147     iStatus = KRequestPending;
   147     iStatus = KRequestPending;
   148     
   148     // <qmail>
   149     // when connecting for the fetch operation, don't let connect operation to do fetch,
       
   150     // because we do it by ourself. That's why give 0 to connect operation.    
       
   151     CIpsPlgPop3ConnectOp* connOp = CIpsPlgPop3ConnectOp::NewL(
   149     CIpsPlgPop3ConnectOp* connOp = CIpsPlgPop3ConnectOp::NewL(
   152         iMsvSession,
   150         iMsvSession,
   153         iStatus, 
   151         iStatus, 
   154         iService, 
   152         iService, 
   155         EFalse, 
   153         EFalse, // We do fetch by ourselves
   156         *iActivityTimer,
   154         *iActivityTimer,
   157         iFSMailboxId, 
   155         iFSMailboxId, 
   158         iFSOperationObserver, 
   156         iFSOperationObserver, 
   159         iFSRequestId, 
   157         iFSRequestId, 
   160         NULL );
   158         NULL,
       
   159         EFalse, // Signalling not allowed
       
   160         ETrue ); // Fetch will follow, let connection be open
   161         
   161         
       
   162     // </qmail>    
   162     delete iSubOperation;
   163     delete iSubOperation;
   163     iSubOperation = connOp;
   164     iSubOperation = connOp;
   164 
   165 
   165     SetActive();
   166     SetActive();
   166     }
   167     }
   342                     }
   343                     }
   343                 TPop3Progress& progress = paramPack();
   344                 TPop3Progress& progress = paramPack();
   344                 progress.iErrorCode = err;
   345                 progress.iErrorCode = err;
   345                 iFetchErrorProgress = paramPack.AllocL();
   346                 iFetchErrorProgress = paramPack.AllocL();
   346                 }
   347                 }
   347             
   348             DoDisconnectL();
   348             iState = EStateIdle;
   349             
   349             CompleteObserver( err );
       
   350             if ( iEventHandler )
   350             if ( iEventHandler )
   351                 {
   351                 {
   352 				// <qmail>
   352 				// <qmail>
   353                 iEventHandler->SetNewPropertyEvent( iService, KIpsSosEmailSyncCompleted, err );
   353                 iEventHandler->SetNewPropertyEvent( iService, KIpsSosEmailSyncCompleted, err );
   354 				// </qmail>
   354 				// </qmail>
   355                 }
   355                 }
   356             }
   356             }
   357             break;
   357             break;
       
   358         case EStateDisconnecting:
       
   359             {
       
   360             CompleteObserver( iStatus.Int() );
       
   361             }
       
   362             break;
   358             
   363             
   359         default:
   364         default:
   360             break;
   365             break;
   361         }        
   366         }        
   362     }
   367     }
   407     FUNC_LOG;
   412     FUNC_LOG;
   408     return EIpsOpTypePop3FetchOp;
   413     return EIpsOpTypePop3FetchOp;
   409     }
   414     }
   410 // </qmail>
   415 // </qmail>
   411 
   416 
       
   417 //<qmail> new function
       
   418 // ----------------------------------------------------------------------------
       
   419 // ----------------------------------------------------------------------------
       
   420 void CIpsPlgPop3FetchOperation::DoDisconnectL()
       
   421     {
       
   422     FUNC_LOG;
       
   423     iState = EStateDisconnecting;
       
   424     InvokeClientMtmAsyncFunctionL( KPOP3MTMDisconnect, iService ); // <qmail> 1 param removed
       
   425     SetActive();
       
   426     }
       
   427 // </qmail>
       
   428 
       
   429