ipsservices/ipssosplugin/src/ipsplgconnectandrefreshfolderlist.cpp
changeset 23 2dc6caa42ec3
parent 20 ecc8def7944a
child 76 38bf5461e270
equal deleted inserted replaced
20:ecc8def7944a 23:2dc6caa42ec3
    14 * Description: 
    14 * Description: 
    15 *       folder refresh operation
    15 *       folder refresh operation
    16 *
    16 *
    17 */
    17 */
    18 
    18 
       
    19 
       
    20 // <qmail> aknmessagequerydialog include removed
       
    21 
    19 #include "emailtrace.h"
    22 #include "emailtrace.h"
    20 #include "ipsplgheaders.h"
    23 #include "ipsplgheaders.h"
    21 
    24 
    22 // ----------------------------------------------------------------------------
    25 // <qmail> ipssossettings rsg removed
    23 // ----------------------------------------------------------------------------
    26 // <qmail> fsmailserver rsg removed
    24 // <qmail> priority parameter has been removed
    27 
    25 // <qmail> rename selection parameter
    28 // ----------------------------------------------------------------------------
       
    29 // ----------------------------------------------------------------------------
       
    30 // <qmail> priority parameter removed, aSelection moved from ConstructL -> constructor
       
    31 // <qmail> MFSMailRequestObserver& changed to pointer
       
    32 // <qmail> renamed selection parameter
    26 CIpsPlgConnectAndRefreshFolderList* CIpsPlgConnectAndRefreshFolderList::NewL(
    33 CIpsPlgConnectAndRefreshFolderList* CIpsPlgConnectAndRefreshFolderList::NewL(
    27     CMsvSession& aSession, 
    34     CMsvSession& aSession, 
    28     TRequestStatus& aObserverRequestStatus,
    35     TRequestStatus& aObserverRequestStatus,
    29     TMsvId aService, 
    36     TMsvId aService, 
    30     TFSMailMsgId& aMailboxId, 
    37     TFSMailMsgId& aMailboxId, 
    47     return self;
    54     return self;
    48     }
    55     }
    49 
    56 
    50 // ----------------------------------------------------------------------------
    57 // ----------------------------------------------------------------------------
    51 // ----------------------------------------------------------------------------
    58 // ----------------------------------------------------------------------------
    52 // <qmail> priority parameter has been removed
    59 // <qmail> priority parameter removed, aSelection moved from ConstructL -> constructor
       
    60 // <qmail> MFSMailRequestObserver& changed to pointer
       
    61 // <qmail> renamed selection parameter
    53 CIpsPlgConnectAndRefreshFolderList::CIpsPlgConnectAndRefreshFolderList(
    62 CIpsPlgConnectAndRefreshFolderList::CIpsPlgConnectAndRefreshFolderList(
    54     CMsvSession& aSession, 
    63     CMsvSession& aSession, 
    55     TRequestStatus& aObserverRequestStatus,
    64     TRequestStatus& aObserverRequestStatus,
    56     TMsvId aService, 
    65     TMsvId aService, 
    57     TFSMailMsgId& aMailboxId, 
    66     TFSMailMsgId& aMailboxId, 
    67         aFSObserver,
    76         aFSObserver,
    68         0 ), // requestId
    77         0 ), // requestId
    69 	iState( EIdle ),
    78 	iState( EIdle ),
    70     iSelection( aSelection )
    79     iSelection( aSelection )
    71     {
    80     {
       
    81     FUNC_LOG;
    72     iService = aService;
    82     iService = aService;
    73     FUNC_LOG;
    83     }
    74     }
    84 
    75 
    85 // ----------------------------------------------------------------------------
    76 // ----------------------------------------------------------------------------
    86 // ----------------------------------------------------------------------------
    77 // ----------------------------------------------------------------------------
    87 // <qmail> aMsvEntry removed
    78 void CIpsPlgConnectAndRefreshFolderList::ConstructL()
    88 void CIpsPlgConnectAndRefreshFolderList::ConstructL()
    79     {
    89     {
    80     FUNC_LOG;
    90     FUNC_LOG;
    81     BaseConstructL( KSenduiMtmImap4Uid );
    91     BaseConstructL( KSenduiMtmImap4Uid );
    82     iState = EStartConnect;
    92     iState = EStartConnect;
   115 // ----------------------------------------------------------------------------
   125 // ----------------------------------------------------------------------------
   116 // ----------------------------------------------------------------------------
   126 // ----------------------------------------------------------------------------
   117 TFSProgress CIpsPlgConnectAndRefreshFolderList::GetFSProgressL() const
   127 TFSProgress CIpsPlgConnectAndRefreshFolderList::GetFSProgressL() const
   118     {
   128     {
   119     FUNC_LOG;
   129     FUNC_LOG;
       
   130     // Hardly ever called
   120     return TFSProgress();
   131     return TFSProgress();
   121     }
   132     }
   122     
   133     
   123 // ----------------------------------------------------------------------------
   134 // ----------------------------------------------------------------------------
   124 // ----------------------------------------------------------------------------
   135 // ----------------------------------------------------------------------------
   125 void CIpsPlgConnectAndRefreshFolderList::DoRunL()
   136 void CIpsPlgConnectAndRefreshFolderList::DoRunL()
   126     {
   137     {
   127     FUNC_LOG;
   138     FUNC_LOG;
   128     
   139     
   129     if( iStatus.Int() != KErrNone )
   140     if( iStatus.Int() != KErrNone )
       
   141 // </qmail>
   130         {
   142         {
   131         iState = ECompleted;
   143         iState = ECompleted;
       
   144 // <qmail> DisplayLoginFailedDialogL removed
   132         CompleteObserver();
   145         CompleteObserver();
   133         return;
   146         return;
   134         }
   147         }
   135     
   148     
   136     switch(iState)
   149     switch(iState)
   141             // <qmail> priority parameter has been removed
   154             // <qmail> priority parameter has been removed
   142             iSubOperation = CIpsPlgImap4ConnectOp::NewL(
   155             iSubOperation = CIpsPlgImap4ConnectOp::NewL(
   143                 iMsvSession,
   156                 iMsvSession,
   144                 iStatus,
   157                 iStatus,
   145                 iService,
   158                 iService,
   146                 iActivityTimer,
   159                 *iActivityTimer,
   147                 iFSMailboxId,
   160                 iFSMailboxId,
   148                 NULL, // no observer for suboperations
   161                 NULL, // no observer for suboperations
   149                 0, // no requestId needed
   162                 0, // no requestId needed
   150                 NULL, // Event handler
   163                 NULL, // Event handler
   151                 ETrue ); // Plain connect
   164                 ETrue ); // Plain connect
   169 	        iSubOperation = NULL;
   182 	        iSubOperation = NULL;
   170 	        iSubOperation = CIpsPlgDisconnectOp::NewL( 
   183 	        iSubOperation = CIpsPlgDisconnectOp::NewL( 
   171                 iMsvSession, 
   184                 iMsvSession, 
   172                 iStatus, 
   185                 iStatus, 
   173                 iService, 
   186                 iService, 
   174                 iActivityTimer,
   187                 *iActivityTimer,
   175                 iFSMailboxId, 
   188                 iFSMailboxId, 
   176                 NULL, // no observer for suboperations
   189                 NULL, // no observer for suboperations
   177                 0 ); // no requestId needed
   190                 0 ); // no requestId needed
   178 	        iState = EDisconnecting;
   191 	        iState = EDisconnecting;
   179 	        SetActive();
   192 	        SetActive();
   200         }
   213         }
   201     CompleteObserver( KErrCancel );
   214     CompleteObserver( KErrCancel );
   202     iState = ECompleted;
   215     iState = ECompleted;
   203     }
   216     }
   204 
   217 
       
   218 
       
   219 // <qmail> removed in Qmail
       
   220 //void CIpsPlgConnectAndRefreshFolderList::DisplayLoginFailedDialogL()
       
   221 // </qmail>
       
   222 
   205 // <qmail> new func to this op
   223 // <qmail> new func to this op
   206 // ----------------------------------------------------------------------------
   224 // ----------------------------------------------------------------------------
   207 // ----------------------------------------------------------------------------    
   225 // ----------------------------------------------------------------------------    
   208 TIpsOpType CIpsPlgConnectAndRefreshFolderList::IpsOpType() const
   226 TIpsOpType CIpsPlgConnectAndRefreshFolderList::IpsOpType() const
   209     {
   227     {