ipsservices/ipssosplugin/inc/ipsplgdisconnectop.h
branchRCL_3
changeset 63 d189ee25cf9d
parent 0 8466d47a6819
child 64 3533d4323edc
equal deleted inserted replaced
61:dcf0eedfc1a3 63:d189ee25cf9d
    16 */
    16 */
    17 
    17 
    18 #ifndef IPSPLGDISCONNECTOP_H
    18 #ifndef IPSPLGDISCONNECTOP_H
    19 #define IPSPLGDISCONNECTOP_H
    19 #define IPSPLGDISCONNECTOP_H
    20 
    20 
    21 
       
    22 #include "ipsplgonlineoperation.h"
    21 #include "ipsplgonlineoperation.h"
    23 
    22 
    24 
       
    25 /**
    23 /**
    26 * Disconnect operation.
    24 * Disconnect operation
    27 * 
    25 * Handles both POP and IMAP cases
    28 */
    26 */
    29 class CIpsPlgDisconnectOp :
    27 NONSHARABLE_CLASS ( CIpsPlgDisconnectOp ) :
    30     public CIpsPlgOnlineOperation
    28     public CIpsPlgOnlineOperation
    31     {
    29     {
    32     public:
    30 public:
       
    31     /**
       
    32     * Construction
       
    33     * @param aMsvSession client/server session to MsvServer
       
    34     * @param aObserverRequestStatus caller's status
       
    35     * @param aService serviceId of the mailbox
       
    36     * @param aActivityTimer mailbox specific activity timer
       
    37     * @param aFSMailBoxId specifies mailbox
       
    38     * @param aFSOperationObserver observer of the operation
       
    39     * @param aFSRequestId identifier for this request instance
       
    40     * @return instance of this operation class
       
    41     */
       
    42     // <qmail> aDoRemoveAfterDisconnect parameter removed
       
    43 	// <qmail> MFSMailRequestObserver& changed to pointer
       
    44     static CIpsPlgDisconnectOp* NewL(
       
    45         CMsvSession& aMsvSession,
       
    46         TRequestStatus& aObserverRequestStatus,
       
    47         TMsvId aService,
       
    48         CIpsPlgTimerOperation& aActivityTimer,
       
    49         TFSMailMsgId aFSMailBoxId,
       
    50         MFSMailRequestObserver* aFSOperationObserver,
       
    51         TInt aFSRequestId );
    33 
    52 
    34         /**
    53     virtual ~CIpsPlgDisconnectOp();
    35         *
       
    36         */
       
    37         static CIpsPlgDisconnectOp* NewL(
       
    38             CMsvSession& aMsvSession,
       
    39             TRequestStatus& aObserverRequestStatus,
       
    40             TMsvId aService,
       
    41             CIpsPlgTimerOperation& aActivityTimer,
       
    42             TFSMailMsgId aFSMailBoxId,
       
    43             MFSMailRequestObserver& aFSOperationObserver,
       
    44             TInt aFSRequestId,
       
    45             TBool aDoRemoveAfterDisconnect = EFalse );
       
    46 
    54 
    47         /**
    55     /**
    48         *
    56     * From MsvOperation
    49         */
    57     * Gets information on the progress of the operation
    50         virtual ~CIpsPlgDisconnectOp();
    58     * (see MsvOperation header)
       
    59     */
       
    60     const TDesC8& ProgressL();
    51 
    61 
    52         /**
    62     /**
    53         *
    63     * From CIpsPlgBaseOperation
    54         */
    64     * For reporting if DoRunL leaves
    55         const TDesC8& ProgressL();
    65     */
       
    66     const TDesC8& GetErrorProgressL( TInt aError );
       
    67     
       
    68    TFSProgress GetFSProgressL() const;
    56 
    69 
    57         /**
    70    // <qmail> Connected() used from baseclass
    58         *
    71    
    59         */
    72    // <qmail> new function in this op
    60         const TDesC8& GetErrorProgressL( TInt aError );
    73    TIpsOpType IpsOpType() const;
    61         
    74    // </qmail>
    62         /**
    75    
    63         * 
    76 protected: // From CActive
    64         */
    77     void DoRunL();
    65        TFSProgress GetFSProgressL() const;
    78     
       
    79 private:
    66 
    80 
    67         /**
    81 	// <qmail> aDoRemoveAfterDisconnect parameter removed
    68         *
    82 	// <qmail> MFSMailRequestObserver& changed to pointer
    69         */
    83     CIpsPlgDisconnectOp(
    70         TBool Connected() const;
    84         CMsvSession& aMsvSession,
       
    85         TRequestStatus& aObserverRequestStatus,
       
    86         TMsvId aServiceId,
       
    87         CIpsPlgTimerOperation& aActivityTimer,
       
    88         TFSMailMsgId aFSMailBoxId,
       
    89         MFSMailRequestObserver* aFSOperationObserver,
       
    90         TInt aFSRequestId );
    71 
    91 
    72     protected:
    92     void ConstructL();
    73 
    93 
       
    94     /**
       
    95     * Sends the disconnect command to MsvServer
       
    96     */
       
    97     void DoDisconnectL();
    74 
    98 
    75         /**
    99 private: // Data
    76         * From CActive
   100     TPckgBuf<TPop3Progress>          iPopProgress;
    77         */
   101     TPckgBuf<TImap4CompoundProgress> iImapProgress;
    78         void DoRunL();
   102     TMsvEntry                        iTEntry;
    79         
   103     // <qmail> iDisconnected; removed; using baseclass's Connected() instead
    80     private:
   104     // <qmail> iDoRemoveAfterDisconnect removed; not a task for disconnect op
    81 
       
    82         /**
       
    83         *
       
    84         */
       
    85         CIpsPlgDisconnectOp(
       
    86             CMsvSession& aMsvSession,
       
    87             TRequestStatus& aObserverRequestStatus,
       
    88             TMsvId aServiceId,
       
    89             CIpsPlgTimerOperation& aActivityTimer,
       
    90             TFSMailMsgId aFSMailBoxId,
       
    91             MFSMailRequestObserver& aFSOperationObserver,
       
    92             TInt aFSRequestId,
       
    93             TBool aDoRemoveAfterDisconnect );
       
    94 
       
    95         /**
       
    96         *
       
    97         */
       
    98         void ConstructL();
       
    99 
       
   100         /**
       
   101         *
       
   102         */
       
   103         void DoDisconnectL();
       
   104 
       
   105         
       
   106     private: // Data
       
   107         
       
   108         TPckgBuf<TPop3Progress> iPopProgress;
       
   109         TPckgBuf<TImap4CompoundProgress> iImapProgress;
       
   110         TMsvEntry               iTEntry;
       
   111         TBool                   iDisconnected;
       
   112         TBool                   iDoRemoveAfterDisconnect;
       
   113         
       
   114     };
   105     };
   115 
   106 
   116 #endif //IPSPLGDISCONNECTOP_H
   107 #endif //IPSPLGDISCONNECTOP_H