ipsservices/ipssosplugin/inc/ipsplgdisconnectop.h
changeset 20 ecc8def7944a
parent 18 578830873419
child 23 2dc6caa42ec3
equal deleted inserted replaced
18:578830873419 20:ecc8def7944a
    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 NONSHARABLE_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     * @param aDoRemoveAfterDisconnect
       
    41     * @return instance of this operation class
       
    42     */
       
    43     // <qmail> parameter removed
       
    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    
    62         /**
    75 protected: // From CActive
    63         * 
    76     void DoRunL();
    64         */
    77     
    65        TFSProgress GetFSProgressL() const;
    78 private:
    66 
    79 
    67 // <qmail> Connected() used from baseclass
    80     CIpsPlgDisconnectOp(
    68     protected:
    81         CMsvSession& aMsvSession,
       
    82         TRequestStatus& aObserverRequestStatus,
       
    83         TMsvId aServiceId,
       
    84         CIpsPlgTimerOperation& aActivityTimer,
       
    85         TFSMailMsgId aFSMailBoxId,
       
    86         MFSMailRequestObserver* aFSOperationObserver,
       
    87         TInt aFSRequestId );
    69 
    88 
    70         /**
    89     void ConstructL();
    71         * From CActive
       
    72         */
       
    73         void DoRunL();
       
    74         
       
    75     private:
       
    76 
    90 
    77         /**
    91     /**
    78         *
    92     * Sends the disconnect command to MsvServer
    79         */
    93     */
    80         CIpsPlgDisconnectOp(
    94     void DoDisconnectL();
    81             CMsvSession& aMsvSession,
       
    82             TRequestStatus& aObserverRequestStatus,
       
    83             TMsvId aServiceId,
       
    84             CIpsPlgTimerOperation& aActivityTimer,
       
    85             TFSMailMsgId aFSMailBoxId,
       
    86             MFSMailRequestObserver& aFSOperationObserver,
       
    87             TInt aFSRequestId,
       
    88             TBool aDoRemoveAfterDisconnect );
       
    89 
    95 
    90         /**
    96 private: // Data
    91         *
    97     TPckgBuf<TPop3Progress>          iPopProgress;
    92         */
    98     TPckgBuf<TImap4CompoundProgress> iImapProgress;
    93         void ConstructL();
    99     TMsvEntry                        iTEntry;
    94 
   100     // <qmail> iDisconnected; removed; using baseclass's Connected() instead
    95         /**
   101     // <qmail> iDoRemoveAfterDisconnect removed; not a task for disconnect op
    96         *
       
    97         */
       
    98         void DoDisconnectL();
       
    99 
       
   100         
       
   101     private: // Data
       
   102         
       
   103         TPckgBuf<TPop3Progress> iPopProgress;
       
   104         TPckgBuf<TImap4CompoundProgress> iImapProgress;
       
   105         TMsvEntry               iTEntry;
       
   106         TBool                   iDisconnected;
       
   107         TBool                   iDoRemoveAfterDisconnect;
       
   108         
       
   109     };
   102     };
   110 
   103 
   111 #endif //IPSPLGDISCONNECTOP_H
   104 #endif //IPSPLGDISCONNECTOP_H