ipsservices/ipssosplugin/inc/ipsplgconnectandrefreshfolderlist.h
branchRCL_3
changeset 63 d189ee25cf9d
parent 13 0396474f30f5
child 64 3533d4323edc
equal deleted inserted replaced
61:dcf0eedfc1a3 63:d189ee25cf9d
    13 *
    13 *
    14 * Description: 
    14 * Description: 
    15 *       folder refresh operation
    15 *       folder refresh operation
    16 *
    16 *
    17 */
    17 */
       
    18 #ifndef IPSPLGCONNECTANDREFRESHFOLDERLIST_H
       
    19 #define IPSPLGCONNECTANDREFRESHFOLDERLIST_H
    18 
    20 
    19 
    21 // <qmail> AknWaitNoteWrapper include has been removed
    20 #if !defined(__IPSPLGCONNECTANDREFRESHFOLDERLIST_H__)
       
    21 #define __IPSPLGCONNECTANDREFRESHFOLDERLIST_H__
       
    22 
       
    23 #include <AknWaitNoteWrapper.h>
       
    24 // <cmail>
       
    25 #include <imapset.h>
    22 #include <imapset.h>
    26 // </cmail>
       
    27 
    23 
    28 // Specific includes
    24 // Specific includes
    29 #include "ipsplgonlineoperation.h"
    25 #include "ipsplgonlineoperation.h"
    30 
    26 
    31 
       
    32 /**
    27 /**
    33 * Superoperation which wraps a UI around going online, updating
    28 * Operation that 1) goes online, 2) updates mailbox's folder list, and 3) disconnects again
    34 * an IMAP service's folder list and disconnecting again.
       
    35 */
    29 */
    36 class CIpsPlgConnectAndRefreshFolderList : public CIpsPlgOnlineOperation,
    30 // <qmail> MAknBackgroundProcess base class has been removed
    37                                            public MAknBackgroundProcess
    31 NONSHARABLE_CLASS ( CIpsPlgConnectAndRefreshFolderList ) : public CIpsPlgOnlineOperation
    38     {
    32     {
    39     
    33 // <qmail> removed 3 functions from MAknBackgroundProcess
    40 public: // from MAknBackgroundProcess
       
    41 
       
    42     /**
       
    43      * Completes one cycle of the process.
       
    44      */
       
    45     virtual void StepL();
       
    46 
       
    47     /**
       
    48      * Return true when the process is done.
       
    49      */
       
    50     virtual TBool IsProcessDone() const;
       
    51     
       
    52     virtual void DialogDismissedL( TInt aButtonId );
       
    53     
       
    54 public:
    34 public:
    55 
    35 
    56     /**
    36     /**
    57     * NewL()
    37     * Construction
    58     * @param CMsvSession&
    38     * @param aSession session to the MsvServer
    59     * @param TInt
    39     * @param aObserverRequestStatus caller's status
    60     * @param TRequestStatus&
    40     * @param aService service entry in use (related to mailbox)
    61     * @param TMsvId
    41     * @param aMailboxId identifies the mailbox
    62     * @return CImapConnectAndRefreshFolderList*
    42     * @param aSelection specifies selection (array) of entries that this op operates on
       
    43     *        ownership is moved to the operation
       
    44     * @param aFSObserver operation's observer
       
    45     * @param aActivityTimer mailbox specific activity timer
       
    46     * @return operation instance
    63     */
    47     */
    64     IMPORT_C static CIpsPlgConnectAndRefreshFolderList* NewL(
    48     // <qmail> priority parameter has been removed
    65         CMsvSession& aSession, TInt aPriority, TRequestStatus& aObserverRequestStatus,
    49     // <qmail> rename selection parameter, and changed it to pointer
    66         TMsvId aService, TFSMailMsgId& aMailboxId, CMsvEntrySelection& aMsvEntry,
    50     // <qmail> removed EXPORT from this function
    67         MFSMailRequestObserver& aFSObserver, CIpsPlgTimerOperation& aTimer );
    51     static CIpsPlgConnectAndRefreshFolderList* NewL(
       
    52         CMsvSession& aSession,
       
    53         TRequestStatus& aObserverRequestStatus,
       
    54         TMsvId aService, 
       
    55         TFSMailMsgId& aMailboxId, 
       
    56         CMsvEntrySelection* aSelection,
       
    57         MFSMailRequestObserver* aFSObserver, 
       
    58         CIpsPlgTimerOperation& aActivityTimer );
    68 
    59 
    69     /**
    60     /**
    70     * Destructor
    61     * Destructor
    71     * ~CIpsPlgConnectAndRefreshFolderList()
    62     * ~CIpsPlgConnectAndRefreshFolderList()
    72     */
    63     */
    73     virtual ~CIpsPlgConnectAndRefreshFolderList();
    64     virtual ~CIpsPlgConnectAndRefreshFolderList();
    74     
    65     
    75     /**
    66     /**
    76     *
    67     * From MsvOperation
       
    68     * Gets information on the progress of the operation
       
    69     * (see MsvOperation header)
    77     */
    70     */
    78     const TDesC8& ProgressL();
    71     const TDesC8& ProgressL();
    79 
    72 
    80     /**
    73     /**
    81     *
    74     * From CIpsPlgBaseOperation
       
    75     * For reporting if DoRunL leaves
    82     */
    76     */
    83     const TDesC8& GetErrorProgressL(TInt aError);
    77     const TDesC8& GetErrorProgressL(TInt aError);
    84     
    78     
    85     /**
       
    86     * 
       
    87     */
       
    88     TFSProgress GetFSProgressL() const;
    79     TFSProgress GetFSProgressL() const;
    89 
    80 
    90 protected:
    81 // <qmail> new func to this op
       
    82     /**
       
    83      * Returns operation type
       
    84      */
       
    85     TIpsOpType IpsOpType() const;
       
    86 // </qmail>
    91 
    87 
       
    88 protected: // From CActive
    92 
    89 
    93     /**
       
    94     * From 
       
    95     * DoRunL()
       
    96     */
       
    97     virtual void DoRunL();
    90     virtual void DoRunL();
    98 
       
    99     virtual void DoCancel();
    91     virtual void DoCancel();
   100     
    92     
   101 private:
    93 private:
   102 
    94     // internal states of this operation
   103     enum TIpsSetFolderRefreshStates
    95     enum TIpsSetFolderRefreshStates
   104         {
    96         {
   105         EIdle,
    97         EIdle,
   106         EStartConnect,
    98         EStartConnect,
   107         EConnecting,
    99         EConnecting,
   108         ERefreshing,
   100         ERefreshing,
   109         EDisconnecting,
   101         EDisconnecting,
   110         ECompleted
   102         ECompleted
   111         };
   103         };
   112 
   104 
   113     /**
   105 	/**
   114     * C++ constructor
   106     * C++ constructor
   115     * CIpsPlgConnectAndRefreshFolderList()
   107     * CIpsPlgConnectAndRefreshFolderList()
   116     */
   108     */
   117     CIpsPlgConnectAndRefreshFolderList( CMsvSession& aSession, TInt aPriority,
   109     // <qmail> rename selection parameter
   118         TRequestStatus& aObserverRequestStatus, TMsvId aService, TFSMailMsgId& aMailboxId,
   110 	// <qmail> MFSMailRequestObserver& changed to pointer
   119         MFSMailRequestObserver& aFSObserver, CIpsPlgTimerOperation& aTimer );
   111 	CIpsPlgConnectAndRefreshFolderList( 
       
   112         CMsvSession& aSession,
       
   113         TRequestStatus& aObserverRequestStatus, 
       
   114         TMsvId aService, 
       
   115         TFSMailMsgId& aMailboxId,
       
   116         CMsvEntrySelection* aSelection,
       
   117         MFSMailRequestObserver* aFSObserver, 
       
   118         CIpsPlgTimerOperation& aTimer );
   120 
   119 
   121     /**
   120     /**
   122     * ConstructL()
   121     * ConstructL()
   123     */
   122     */
   124     void ConstructL( CMsvEntrySelection& aMsvEntry );
   123 	// <qmail> aMsvEntry parameter has been removed
       
   124     void ConstructL();
   125 
   125 
   126     void DisplayLoginFailedDialogL();
   126 	// <qmail> DisplayLoginFailedDialogL function has been removed
   127 
   127 
   128     //data
   128     //data
   129 private:
   129 private:
   130 
   130     // <qmail> changes in members: iTimer, iAsyncWaitNote removed, iMsvEntry -> iSelection
   131     TInt                                iState;
   131     TIpsSetFolderRefreshStates          iState;
   132     CIpsPlgTimerOperation*				iTimer;
   132     CMsvEntrySelection*					iSelection; // owned
   133     CMsvEntrySelection*					iMsvEntry;
       
   134     TPckgBuf<TImap4CompoundProgress>    iProgressBuf;
   133     TPckgBuf<TImap4CompoundProgress>    iProgressBuf;
   135     CAknWaitNoteWrapper*                iAsyncWaitNote;
   134     // </qmail>
   136     };
   135     };
   137 
   136 
   138 #endif
   137 #endif // IPSPLGCONNECTANDREFRESHFOLDERLIST_H