ipsservices/ipssosplugin/src/ipsplgimap4populateop.cpp
branchRCL_3
changeset 24 d189ee25cf9d
parent 23 dcf0eedfc1a3
child 25 3533d4323edc
equal deleted inserted replaced
23:dcf0eedfc1a3 24:d189ee25cf9d
    16 */
    16 */
    17 
    17 
    18 #include "emailtrace.h"
    18 #include "emailtrace.h"
    19 #include "ipsplgheaders.h"
    19 #include "ipsplgheaders.h"
    20 
    20 
    21 // Constants and defines
    21 // <qmail> priority const has been removed
    22 const TInt KFetchOpPriority = CActive::EPriorityStandard;
    22 
    23 const TInt KIpsPlgSelectionGra = 16;
    23 // ----------------------------------------------------------------------------
    24 
    24 // ----------------------------------------------------------------------------
    25 // ----------------------------------------------------------------------------
    25 // <qmail> priority parameter has been removed
    26 // ----------------------------------------------------------------------------
    26 // <qmail> MFSMailRequestObserver& changed to pointer
    27 EXPORT_C CIpsPlgImap4PopulateOp* CIpsPlgImap4PopulateOp::NewL(
    27 EXPORT_C CIpsPlgImap4PopulateOp* CIpsPlgImap4PopulateOp::NewL(
    28     CMsvSession& aMsvSession,
    28     CMsvSession& aMsvSession,
    29     TRequestStatus& aObserverRequestStatus,
    29     TRequestStatus& aObserverRequestStatus,
    30     TInt aPriority,
       
    31     TMsvId aService,
    30     TMsvId aService,
    32     CIpsPlgTimerOperation& aActivityTimer,
    31     CIpsPlgTimerOperation& aActivityTimer,
    33     const TImImap4GetPartialMailInfo& aPartialMailInfo,
    32     const TImImap4GetPartialMailInfo& aPartialMailInfo,
    34     const CMsvEntrySelection& aSel,
    33     const CMsvEntrySelection& aSel,
    35     TFSMailMsgId aFSMailBoxId,
    34     TFSMailMsgId aFSMailBoxId,
    36     MFSMailRequestObserver& aFSOperationObserver,
    35     MFSMailRequestObserver* aFSOperationObserver,
    37     TInt aFSRequestId,
    36     TInt aFSRequestId,
    38     CIpsPlgEventHandler* aEventHandler,
    37     CIpsPlgEventHandler* aEventHandler,
    39     TBool aDoFilterSelection )
    38     TBool aDoFilterSelection )
    40     {
    39     {
    41     FUNC_LOG;
    40     FUNC_LOG;
    42     CIpsPlgImap4PopulateOp* op = new (ELeave) CIpsPlgImap4PopulateOp(
    41     CIpsPlgImap4PopulateOp* op = new (ELeave) CIpsPlgImap4PopulateOp(
    43         aMsvSession,
    42         aMsvSession,
    44         aObserverRequestStatus,
    43         aObserverRequestStatus,
    45         aPriority,
       
    46         aService,
    44         aService,
    47         aActivityTimer,
    45         aActivityTimer,
    48         aPartialMailInfo,
    46         aPartialMailInfo,
    49         aFSMailBoxId,
    47         aFSMailBoxId,
    50         aFSOperationObserver,
    48         aFSOperationObserver,
    57     return op;
    55     return op;
    58     }
    56     }
    59 
    57 
    60 // ----------------------------------------------------------------------------
    58 // ----------------------------------------------------------------------------
    61 // ----------------------------------------------------------------------------
    59 // ----------------------------------------------------------------------------
       
    60 // <qmail> priority parameter has been removed
    62 CIpsPlgImap4PopulateOp::CIpsPlgImap4PopulateOp(
    61 CIpsPlgImap4PopulateOp::CIpsPlgImap4PopulateOp(
    63     CMsvSession& aMsvSession,
    62     CMsvSession& aMsvSession,
    64     TRequestStatus& aObserverRequestStatus,
    63     TRequestStatus& aObserverRequestStatus,
    65     TInt aPriority,
       
    66     TMsvId aService,
    64     TMsvId aService,
    67     CIpsPlgTimerOperation& aActivityTimer,
    65     CIpsPlgTimerOperation& aActivityTimer,
    68     const TImImap4GetPartialMailInfo& aPartialMailInfo,
    66     const TImImap4GetPartialMailInfo& aPartialMailInfo,
    69     TFSMailMsgId aFSMailBoxId,
    67     TFSMailMsgId aFSMailBoxId,
    70     MFSMailRequestObserver& aFSOperationObserver,
    68     MFSMailRequestObserver* aFSOperationObserver,
    71     TInt aFSRequestId,
    69     TInt aFSRequestId,
    72     CIpsPlgEventHandler* aEventHandler )
    70     CIpsPlgEventHandler* aEventHandler )
    73     :
    71     :
    74     CIpsPlgOnlineOperation(
    72     CIpsPlgOnlineOperation(
    75     aMsvSession,
    73         aMsvSession,
    76     aPriority,
    74         aObserverRequestStatus,
    77     aObserverRequestStatus,
    75         aActivityTimer,
    78     aActivityTimer,
    76         aFSMailBoxId,
    79     aFSMailBoxId,
    77         aFSOperationObserver,
    80     aFSOperationObserver,
    78         aFSRequestId ),
    81     aFSRequestId),
    79     iState( EStateIdle ),
    82     iPartialMailInfo(aPartialMailInfo),
    80     iPartialMailInfo(aPartialMailInfo),
    83     iSelection( KIpsPlgSelectionGra ),
    81     iSelection( NULL ),
    84     iEventHandler( aEventHandler )
    82     iTempSelection( NULL ),
       
    83     iEventHandler( aEventHandler ),
       
    84     iFetchErrorProgress( NULL )
    85     {
    85     {
    86     FUNC_LOG;
    86     FUNC_LOG;
    87     iService = aService;
    87     iService = aService;
    88     }
    88     }
    89 
    89 
    90 // ----------------------------------------------------------------------------
    90 // ----------------------------------------------------------------------------
    91 // ----------------------------------------------------------------------------
    91 // ----------------------------------------------------------------------------
    92 CIpsPlgImap4PopulateOp::~CIpsPlgImap4PopulateOp()
    92 CIpsPlgImap4PopulateOp::~CIpsPlgImap4PopulateOp()
    93     {
    93     {
    94     FUNC_LOG;
    94     FUNC_LOG;
    95     
    95     delete iSelection;
    96     Cancel();
       
    97     iSelection.Close();
       
    98 
    96 
    99     if ( iTempSelection )
    97     if ( iTempSelection )
   100     	{
    98     	{
   101     	iTempSelection->Reset();
    99     	iTempSelection->Reset();
   102    	delete iTempSelection;
   100    		delete iTempSelection;
   103     	}
   101     	}
   104     }
   102     }
   105 
   103 
   106 // ----------------------------------------------------------------------------
   104 // ----------------------------------------------------------------------------
   107 // ----------------------------------------------------------------------------
   105 // ----------------------------------------------------------------------------
   110         TBool aDoFilterSelection )
   108         TBool aDoFilterSelection )
   111     {
   109     {
   112     FUNC_LOG;
   110     FUNC_LOG;
   113     BaseConstructL( KUidMsgTypeIMAP4 );
   111     BaseConstructL( KUidMsgTypeIMAP4 );
   114     
   112     
       
   113     // <qmail> instantiation moved here
       
   114     iSelection = new ( ELeave ) CMsvEntrySelection();
       
   115     iTempSelection = new ( ELeave ) CMsvEntrySelection();
       
   116 
   115     if ( aDoFilterSelection )
   117     if ( aDoFilterSelection )
   116         {
   118         {
   117         FilterSelectionL( aSel );
   119         FilterSelectionL( aSel );
   118         }
   120         }
   119     else
   121     else // no filtering; populate all
   120         {
   122         {
       
   123         // first entry in selection is serviceId
   121         for ( TInt i = 1; i < aSel.Count(); i++ )
   124         for ( TInt i = 1; i < aSel.Count(); i++ )
   122             {
   125             {
   123             if ( aSel[i] != iService )
   126             if ( aSel[i] != iService )
   124                 {
   127                 {
   125                 iSelection.AppendL( aSel.At(i) );
   128                 iSelection->AppendL( aSel.At(i) );
   126                 }
   129                 }
   127             }
   130             }
   128         }
   131         }
   129     iTempSelection = new ( ELeave ) CMsvEntrySelection();
       
   130     DoConnectL();
   132     DoConnectL();
   131     }
   133     }
   132 
   134 
   133 // ----------------------------------------------------------------------------
   135 // ----------------------------------------------------------------------------
   134 // ----------------------------------------------------------------------------
   136 // ----------------------------------------------------------------------------
   135 TInt CIpsPlgImap4PopulateOp::IpsOpType() const
   137 // <qmail> return type changed: TInt -> TIpsOpType
       
   138 TIpsOpType CIpsPlgImap4PopulateOp::IpsOpType() const
   136     {
   139     {
   137     FUNC_LOG;
   140     FUNC_LOG;
   138     return EIpsOpTypeImap4PopulateOp;
   141     return EIpsOpTypeImap4PopulateOp;
   139     }
   142     }
   140 
   143 
   144     {
   147     {
   145     FUNC_LOG;
   148     FUNC_LOG;
   146     iState = EStateConnecting;
   149     iState = EStateConnecting;
   147     iStatus = KRequestPending;
   150     iStatus = KRequestPending;
   148 
   151 
       
   152     // <qmail> priority parameter has been removed
   149     CIpsPlgImap4ConnectOp* connOp = CIpsPlgImap4ConnectOp::NewL(
   153     CIpsPlgImap4ConnectOp* connOp = CIpsPlgImap4ConnectOp::NewL(
   150         iMsvSession,
   154         iMsvSession,
   151         KFetchOpPriority,
       
   152         iStatus, 
   155         iStatus, 
   153         iService,
   156         iService,
   154         *iActivityTimer,
   157         *iActivityTimer,
   155         iFSMailboxId,
   158         iFSMailboxId,
   156         iFSOperationObserver,
   159         NULL, // no observer for suboperations
   157         iFSRequestId,
   160         0,    // requestId not needed
   158         iEventHandler,
   161         iEventHandler,
   159         ETrue, // Do plain connect
   162         ETrue ); // Do plain connect
   160         EFalse );
       
   161         
   163         
   162     delete iOperation;
   164     delete iSubOperation;
   163     iOperation = connOp;
   165     iSubOperation = connOp;
   164 
   166 
   165     SetActive();
   167     SetActive();
   166     }
   168     }
   167     
   169     
   168 // ----------------------------------------------------------------------------
   170 // ----------------------------------------------------------------------------
   182 // ----------------------------------------------------------------------------
   184 // ----------------------------------------------------------------------------
   183 void CIpsPlgImap4PopulateOp::DoRunL()
   185 void CIpsPlgImap4PopulateOp::DoRunL()
   184     {
   186     {
   185     FUNC_LOG;
   187     FUNC_LOG;
   186     TInt err = iStatus.Int();
   188     TInt err = iStatus.Int();
   187     delete iOperation;
   189     delete iSubOperation;
   188     iOperation = NULL;
   190     iSubOperation = NULL;
   189     
   191     
   190     switch( iState )
   192     switch( iState )
   191         {
   193         {
   192         case EStateConnecting:
   194         case EStateConnecting:
   193             {
   195             {
   202             DoPopulateL();
   204             DoPopulateL();
   203             break;
   205             break;
   204             }
   206             }
   205         case EStateFetching:         
   207         case EStateFetching:         
   206             {
   208             {
   207             if( err != KErrNone && iOperation )
   209             if( err != KErrNone && iSubOperation )
   208                 {
   210                 {
   209                 iFetchErrorProgress = iOperation->ProgressL().AllocL();
   211                 iFetchErrorProgress = iSubOperation->ProgressL().AllocL();
   210                 iState = EStateIdle;
   212                 iState = EStateIdle;
   211                 Complete();
   213                 Complete();
   212                 }
   214                 }
   213             else
       
   214                 {
       
   215                 
       
   216                 }
       
   217             break;
   215             break;
   218             }
   216             }
   219         case EStateInfoEntryChange:
   217         case EStateInfoEntryChange:
   220             {
   218             {
   221             TMsvEntry tentry;
   219             DoPopulateL();
   222             TMsvId service;
       
   223             iMsvSession.GetEntry( iService, service, tentry );
       
   224           
       
   225             if( err == KErrNone && tentry.Connected() )
       
   226             	{
       
   227             	DoPopulateL();  
       
   228             	}  
       
   229             else
       
   230             	{
       
   231             	iState = EStateIdle;
       
   232             	CompleteObserver( err );
       
   233             	}            
       
   234             break;
   220             break;
   235             }
   221             }
   236         case EStateIdle:
   222         case EStateIdle:
   237         default:
   223         default:
   238             break;
   224             break;
   242 // ----------------------------------------------------------------------------
   228 // ----------------------------------------------------------------------------
   243 // ----------------------------------------------------------------------------
   229 // ----------------------------------------------------------------------------
   244 void CIpsPlgImap4PopulateOp::DoCancel()
   230 void CIpsPlgImap4PopulateOp::DoCancel()
   245     {
   231     {
   246     FUNC_LOG;
   232     FUNC_LOG;
   247     if( iOperation )
   233     if( iSubOperation )
   248         {
   234         {
   249         iOperation->Cancel();
   235         iSubOperation->Cancel();
   250         }
   236         }
   251     CompleteObserver( KErrCancel );
   237     CompleteObserver( KErrCancel );
   252     }
   238     }
   253 
   239 
   254 // ----------------------------------------------------------------------------
   240 // ----------------------------------------------------------------------------
   258     FUNC_LOG;
   244     FUNC_LOG;
   259     if(iFetchErrorProgress && (iState == EStateIdle))
   245     if(iFetchErrorProgress && (iState == EStateIdle))
   260         {
   246         {
   261         // Completed, but with an error during fetch.
   247         // Completed, but with an error during fetch.
   262         return *iFetchErrorProgress;
   248         return *iFetchErrorProgress;
   263         }        
   249         }
   264     TImap4SyncProgress progg;
   250     else
   265     progg.iFoldersNotFound = 0;
   251         {
   266     progg.iErrorCode = KErrNone;
   252         TImap4SyncProgress progg;
   267     TPckgBuf<TImap4SyncProgress> param(progg);
   253     	progg.iFoldersNotFound = 0;
   268     iSyncProgress.Copy(param);
   254         progg.iErrorCode = KErrNone;
   269     return iSyncProgress; 
   255         TPckgBuf<TImap4SyncProgress> param(progg);
       
   256         iSyncProgress.Copy(param);
       
   257         return iSyncProgress;
       
   258         }
   270     }
   259     }
   271 
   260 
   272 // ----------------------------------------------------------------------------
   261 // ----------------------------------------------------------------------------
   273 // ----------------------------------------------------------------------------
   262 // ----------------------------------------------------------------------------
   274 const TDesC8& CIpsPlgImap4PopulateOp::GetErrorProgressL(TInt /*aError*/ )
   263 const TDesC8& CIpsPlgImap4PopulateOp::GetErrorProgressL(TInt /*aError*/ )
   302         result.iError = KErrCancel;
   291         result.iError = KErrCancel;
   303         }
   292         }
   304     return result;
   293     return result;
   305     }
   294     }
   306 
   295 
   307 // ----------------------------------------------------------------------------
   296 // <qmail> removed CIpsPlgImap4PopulateOp::GetEngineProgress( const TDesC8& aProgress )
   308 // ----------------------------------------------------------------------------    
       
   309 TInt CIpsPlgImap4PopulateOp::GetEngineProgress( const TDesC8& aProgress )
       
   310     {
       
   311     FUNC_LOG;
       
   312     if( !aProgress.Length() )
       
   313         {
       
   314         return KErrNone;
       
   315         }
       
   316     else
       
   317         {
       
   318         TPckgBuf<TImap4CompoundProgress> paramPack;
       
   319         paramPack.Copy( aProgress );
       
   320         const TImap4GenericProgress& progress = paramPack().iGenericProgress;
       
   321         return progress.iErrorCode;        
       
   322         }    
       
   323     }    
       
   324 
   297 
   325 // ----------------------------------------------------------------------------
   298 // ----------------------------------------------------------------------------
   326 // ----------------------------------------------------------------------------
   299 // ----------------------------------------------------------------------------
   327 void CIpsPlgImap4PopulateOp::Complete()
   300 void CIpsPlgImap4PopulateOp::Complete()
   328     {
   301     {
   331     User::RequestComplete(observer, KErrNone);
   304     User::RequestComplete(observer, KErrNone);
   332     }
   305     }
   333 
   306 
   334 // ----------------------------------------------------------------------------
   307 // ----------------------------------------------------------------------------
   335 // ----------------------------------------------------------------------------
   308 // ----------------------------------------------------------------------------
   336 void CIpsPlgImap4PopulateOp::FilterSelectionL( 
   309 void CIpsPlgImap4PopulateOp::FilterSelectionL( const CMsvEntrySelection& aSelection )
   337         const CMsvEntrySelection& aSelection )
   310     {
   338     {
   311     FUNC_LOG;
   339     FUNC_LOG;
   312     iSelection->Reset();
   340     iSelection.Reset();
       
   341     TMsvId messageId;
   313     TMsvId messageId;
   342     // NOTE: this code is taken from symbian os source IMPCMTM.CPP
   314     // NOTE: this code is taken from symbian os source IMPCMTM.CPP
   343     // filter selection is in here because messages are
   315     // filter selection is in here because messages are
   344     // fetched separately then we dont have to make unneccessery imap 
   316     // fetched separately then we dont have to make unneccessery imap 
   345     // client mtm calls
   317     // client mtm calls
   347     for (TInt i=0; i<aSelection.Count(); i++)
   319     for (TInt i=0; i<aSelection.Count(); i++)
   348         {
   320         {
   349         messageId = (aSelection)[i];
   321         messageId = (aSelection)[i];
   350         if ( messageId == iService )
   322         if ( messageId == iService )
   351             {
   323             {
   352             continue;
   324             continue; // ignore serviceId
   353             }
   325             }
   354         TMsvEmailEntry entry;
   326         TMsvEmailEntry entry;
   355         TMsvId service = KMsvNullIndexEntryId;          
   327         TMsvId service = KMsvNullIndexEntryId;          
   356         User::LeaveIfError(iMsvSession.GetEntry(messageId, service, entry));
   328         User::LeaveIfError(iMsvSession.GetEntry(messageId, service, entry));
   357         
   329         
   367         
   339         
   368         if( IsPartialPopulate( )
   340         if( IsPartialPopulate( )
   369               && !isComplete
   341               && !isComplete
   370               && entry.iType == KUidMsvMessageEntry )
   342               && entry.iType == KUidMsvMessageEntry )
   371             {
   343             {
   372             iSelection.AppendL(messageId); 
   344             iSelection->AppendL( messageId ); 
   373             }
   345             }
   374         else if ( isMsgEntry && isSizeUnderMax && !isParentComp )
   346         else if ( isMsgEntry && isSizeUnderMax && !isParentComp )
   375             {
   347             {
   376             iSelection.AppendL(messageId);
   348             iSelection->AppendL( messageId );
   377             }
   349             }
   378         }
   350         }
   379     }
   351     }
   380 
   352 
   381 // ----------------------------------------------------------------------------
   353 // ----------------------------------------------------------------------------
   382 // ----------------------------------------------------------------------------
   354 // ----------------------------------------------------------------------------
   383 TBool CIpsPlgImap4PopulateOp::IsPartialPopulate( )
   355 TBool CIpsPlgImap4PopulateOp::IsPartialPopulate( )
   384     {
   356     {
       
   357     // <qmail> cleaned up code and took one "always true" condition out from the if statement
   385     FUNC_LOG;
   358     FUNC_LOG;
   386     // NOTE: this code is taken from symbian os source IMPCMTM.CPP
   359     // NOTE: this code is taken from symbian os source IMPCMTM.CPP
   387     // code is modified to this class purpose 
   360     // code is modified to this class purpose 
   388     
   361     TBool isPartialPopulate( EFalse );
   389     TBool isPartialPopulate = EFalse;
   362     if ( iPartialMailInfo.iPartialMailOptions == ENoSizeLimits &&
   390     if(iPartialMailInfo.iPartialMailOptions == ENoSizeLimits &&
   363          iPartialMailInfo.iTotalSizeLimit == KMaxTInt &&
   391        iPartialMailInfo.iTotalSizeLimit == KMaxTInt &&
   364          iPartialMailInfo.iBodyTextSizeLimit == KMaxTInt && 
   392        iPartialMailInfo.iBodyTextSizeLimit == KMaxTInt && 
   365          iPartialMailInfo.iAttachmentSizeLimit == KMaxTInt )
   393        iPartialMailInfo.iAttachmentSizeLimit == KMaxTInt && 
       
   394         (iPartialMailInfo.iGetMailBodyParts == EGetImap4EmailHeaders || 
       
   395          iPartialMailInfo.iGetMailBodyParts == EGetImap4EmailBodyText ||
       
   396          iPartialMailInfo.iGetMailBodyParts == EGetImap4EmailBodyTextAndAttachments ||
       
   397          iPartialMailInfo.iGetMailBodyParts == EGetImap4EmailAttachments ||
       
   398          iPartialMailInfo.iGetMailBodyParts == EGetImap4EmailBodyAlternativeText) )
       
   399         {
   366         {
   400         isPartialPopulate = EFalse;
   367         isPartialPopulate = EFalse;
   401         }
   368         }
   402     else
   369     else
   403         {
   370         {
   404         isPartialPopulate = ETrue;
   371         isPartialPopulate = ETrue;
   405         }
   372         }
   406 
       
   407     return isPartialPopulate;
   373     return isPartialPopulate;
   408     }
   374     }
   409 
   375 
   410 // ----------------------------------------------------------------------------
   376 // ----------------------------------------------------------------------------
   411 // ----------------------------------------------------------------------------
   377 // ----------------------------------------------------------------------------
   412 void CIpsPlgImap4PopulateOp::DoPopulateL( )
   378 void CIpsPlgImap4PopulateOp::DoPopulateL( )
   413     {
   379     {
   414     FUNC_LOG;
   380     FUNC_LOG;
   415     if ( iSelection.Count() > 0 )
   381     if ( iSelection->Count() > 0 )
   416         {
   382         {
   417         TMsvEmailEntry tEntry;
   383         TMsvEmailEntry tEntry;
   418         TMsvId dummy;
   384         TMsvId dummy;
   419         TInt lastIndex = iSelection.Count()-1;
   385         TInt lastIndex = iSelection->Count()-1;
   420         User::LeaveIfError( iMsvSession.GetEntry(
   386         User::LeaveIfError( iMsvSession.GetEntry( iSelection->At(lastIndex), dummy, tEntry ) );
   421                 iSelection[lastIndex], dummy, tEntry ) );
       
   422         
   387         
   423         iState = EStateFetching;
   388         iState = EStateFetching;
   424 
   389 
   425         iTempSelection->Reset();
   390         iTempSelection->Reset();
   426         iTempSelection->AppendL( iService );
   391         iTempSelection->AppendL( iService );
   427         iTempSelection->AppendL( iSelection[lastIndex] );
   392         iTempSelection->AppendL( iSelection->At( lastIndex ) );
   428         iSelection.Remove(lastIndex);
   393         iSelection->Delete( lastIndex );
   429         
   394             
   430         
       
   431         iStatus = KRequestPending;
       
   432     
       
   433         // Filters are not used when performing 'fetch'
   395         // Filters are not used when performing 'fetch'
   434         // operation, use normal getmail info instead
   396         // operation, use normal getmail info instead
   435         TPckg<TImImap4GetPartialMailInfo> param(iPartialMailInfo);
   397         TPckg<TImImap4GetPartialMailInfo> param( iPartialMailInfo );
   436         iBaseMtm->SwitchCurrentEntryL( iService );
   398         iBaseMtm->SwitchCurrentEntryL( iService );
   437         iOperation = iBaseMtm->InvokeAsyncFunctionL(
   399         iSubOperation = iBaseMtm->InvokeAsyncFunctionL(
   438                 KIMAP4MTMPopulateMailSelectionWhenAlreadyConnected, 
   400             KIMAP4MTMPopulateMailSelectionWhenAlreadyConnected, 
   439                 *iTempSelection, param, this->iStatus);
   401             *iTempSelection, param, iStatus );
   440         iState = EStateInfoEntryChange;
   402         iState = EStateInfoEntryChange;
   441         SetActive();
   403         SetActive();
   442         
       
   443         if ( iEventHandler )
       
   444               {
       
   445               iEventHandler->SetNewPropertyEvent( 
       
   446                       iService, KIpsSosEmailSyncStarted, KErrNone );
       
   447               } 
       
   448         }
   404         }
   449     else
   405     else
   450         {
   406         {
   451         iState = EStateIdle;
   407         iState = EStateIdle;
   452         CompleteObserver();
   408         CompleteObserver();
   453         
       
   454         if ( iEventHandler )
       
   455             {
       
   456             iEventHandler->SetNewPropertyEvent( 
       
   457                 iService, KIpsSosEmailSyncCompleted, KErrNone );
       
   458             }               
       
   459         }
   409         }
   460     }
   410     }
   461 
   411 
   462 // End of File
   412 // End of File