ipsservices/ipssosplugin/src/ipsplgconnectandrefreshfolderlist.cpp
branchRCL_3
changeset 8 e1b6206813b4
parent 3 a4d6f1ea0416
child 11 0396474f30f5
equal deleted inserted replaced
4:e7aa27f58ae1 8:e1b6206813b4
    15 *       folder refresh operation
    15 *       folder refresh operation
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 #include <AknMessageQueryDialog.h>
    20 #include <aknmessagequerydialog.h>
    21 
    21 
    22 #include "emailtrace.h"
    22 #include "emailtrace.h"
    23 #include "ipsplgheaders.h"
    23 #include "ipsplgheaders.h"
    24 
    24 
    25 #include <ipssossettings.rsg>
    25 #include <ipssossettings.rsg>
    62     TRequestStatus& aObserverRequestStatus,
    62     TRequestStatus& aObserverRequestStatus,
    63     TMsvId aService, 
    63     TMsvId aService, 
    64     TFSMailMsgId& aMailboxId, 
    64     TFSMailMsgId& aMailboxId, 
    65     MFSMailRequestObserver& aFSObserver,
    65     MFSMailRequestObserver& aFSObserver,
    66     CIpsPlgTimerOperation& aTimer )
    66     CIpsPlgTimerOperation& aTimer )
    67 	:
    67     :
    68 	CIpsPlgOnlineOperation(
    68     CIpsPlgOnlineOperation(
    69 	        aSession,
    69             aSession,
    70 	        aPriority,
    70             aPriority,
    71 	        aObserverRequestStatus,
    71             aObserverRequestStatus,
    72 	        aTimer,
    72             aTimer,
    73 	        aMailboxId,
    73             aMailboxId,
    74 	        aFSObserver,
    74             aFSObserver,
    75 	        0, // FSRequestId
    75             0, // FSRequestId
    76 	        EFalse), // SignallingAllowed
    76             EFalse), // SignallingAllowed
    77 	iState( EIdle ),
    77     iState( EIdle ),
    78 	iMailboxId( aMailboxId ),
    78     iMailboxId( aMailboxId ),
    79     iSession( aSession ),
    79     iSession( aSession ),
    80     iService( aService ),
    80     iService( aService ),
    81     iOperation( NULL ),
    81     iOperation( NULL ),
    82     iTimer( NULL ),
    82     iTimer( NULL ),
    83     iMsvEntry( NULL ),
    83     iMsvEntry( NULL ),
   195         {
   195         {
   196         case EStartConnect:
   196         case EStartConnect:
   197             delete iOperation;
   197             delete iOperation;
   198             iOperation = NULL;
   198             iOperation = NULL;
   199             InvokeClientMtmAsyncFunctionL( 
   199             InvokeClientMtmAsyncFunctionL( 
   200 							KIMAP4MTMConnect, 
   200                             KIMAP4MTMConnect, 
   201 							*iMsvEntry,
   201                             *iMsvEntry,
   202             	            iService,
   202                             iService,
   203             	            dummyParam );
   203                             dummyParam );
   204             iState = EConnecting;
   204             iState = EConnecting;
   205             SetActive();
   205             SetActive();
   206             break;
   206             break;
   207 	    case EConnecting:
   207         case EConnecting:
   208 	        {
   208             {
   209 	        //  We have successfully completed connecting
   209             //  We have successfully completed connecting
   210 	        
   210             
   211 	        delete iOperation;
   211             delete iOperation;
   212 	        iOperation = NULL;
   212             iOperation = NULL;
   213 	        InvokeClientMtmAsyncFunctionL( 
   213             InvokeClientMtmAsyncFunctionL( 
   214 	                    KIMAP4MTMSyncTree, 
   214                         KIMAP4MTMSyncTree, 
   215 	                    *iMsvEntry,
   215                         *iMsvEntry,
   216 	                    iService,
   216                         iService,
   217 	                    dummyParam ); 
   217                         dummyParam ); 
   218 	        iState = ERefreshing;
   218             iState = ERefreshing;
   219 	        SetActive();
   219             SetActive();
   220 	        }
   220             }
   221 	        break;
   221             break;
   222 	    case ERefreshing:
   222         case ERefreshing:
   223 	        //  We have successfully completed refreshing the folder list
   223             //  We have successfully completed refreshing the folder list
   224 	        delete iOperation;
   224             delete iOperation;
   225 	        iOperation = NULL;
   225             iOperation = NULL;
   226 	        iOperation = CIpsPlgDisconnectOp::NewL( 
   226             iOperation = CIpsPlgDisconnectOp::NewL( 
   227 	                        iSession, 
   227                             iSession, 
   228 	                        iStatus, 
   228                             iStatus, 
   229 	                        iService, 
   229                             iService, 
   230 	                        *iTimer,
   230                             *iTimer,
   231 	                        iMailboxId, 
   231                             iMailboxId, 
   232 	                        *observer, 
   232                             *observer, 
   233 	                        NULL );
   233                             NULL );
   234 	        iState = EDisconnecting;
   234             iState = EDisconnecting;
   235 	        SetActive();
   235             SetActive();
   236 	        break;
   236             break;
   237 	    case EDisconnecting:
   237         case EDisconnecting:
   238 	        iState = ECompleted;
   238             iState = ECompleted;
   239 	        CompleteObserver();
   239             CompleteObserver();
   240 	        break;
   240             break;
   241 	    default:
   241         default:
   242 	        User::Panic( KIpsPlgPanicCategory, EIpsPlgNoParameters );
   242             User::Panic( KIpsPlgPanicCategory, EIpsPlgNoParameters );
   243 	    	break;
   243             break;
   244         }
   244         }
   245     }
   245     }
   246 
   246 
   247 // ----------------------------------------------------------------------------
   247 // ----------------------------------------------------------------------------
   248 // CIpsPlgOnlineOperation::DoCancel()
   248 // CIpsPlgOnlineOperation::DoCancel()