ipsservices/ipssosplugin/inc/ipsplgpop3fetchoperation.h
branchRCL_3
changeset 64 3533d4323edc
parent 63 d189ee25cf9d
equal deleted inserted replaced
63:d189ee25cf9d 64:3533d4323edc
    18 #ifndef IPSPLGPOP3FETCHOPERATION_H
    18 #ifndef IPSPLGPOP3FETCHOPERATION_H
    19 #define IPSPLGPOP3FETCHOPERATION_H
    19 #define IPSPLGPOP3FETCHOPERATION_H
    20 
    20 
    21 #include "ipsplgonlineoperation.h"
    21 #include "ipsplgonlineoperation.h"
    22 
    22 
       
    23 //class CMsvEmailConnectionProgressProvider;
       
    24 
    23 /**
    25 /**
    24 * CIpsPlgPop3FetchOperation
    26 * CIpsPlgPop3FetchOperation
    25 * Fetch message(s) operation, using client MTM Get Mail API.
    27 * Fetch message(s) operation, using client MTM Get Mail API.
    26 */
    28 */
    27 NONSHARABLE_CLASS ( CIpsPlgPop3FetchOperation ) :
    29 class CIpsPlgPop3FetchOperation :
    28     public CIpsPlgOnlineOperation
    30     public CIpsPlgOnlineOperation
    29     {
    31     {
    30     public:
    32     public:
    31 
    33 
    32 	    /**
    34         /**
    33 	    * NewL
    35         *
    34 	    * @param aMsvSession client/server session to MsvServer
    36         */
    35 	    * @param aObserverRequestStatus client status
    37         static CIpsPlgPop3FetchOperation* NewL(
    36 	    * @param aService serviceId of mailbox
    38             CMsvSession& aMsvSession,
    37 	    * @param aActivityTimer mailbox specific activity timer
    39             TRequestStatus& aObserverRequestStatus,
    38 	    * @param aGetMailInfo parameters set for actual MsvServer command
    40             TInt aFunctionId,
    39 	    * @param aSelection selection of entries to fetch
    41             TMsvId aService,
    40 	    * @param aFSMailBoxId mailbox identifier
    42             CIpsPlgTimerOperation& aActivityTimer,
    41 	    * @param aFSOperationObserver observer of this operation
    43             const TImPop3GetMailInfo& aGetMailInfo,
    42 	    * @param aFSRequestId client assigned identifier for this operation instance
    44             const CMsvEntrySelection& aSel,
    43 	    * @param aEventHandler event handler for sending sync status events
    45             TFSMailMsgId aFSMailBoxId,
    44 	    * @return operation instance
    46             MFSMailRequestObserver& aFSOperationObserver,
    45 	    */
    47             TInt aFSRequestId,
    46 		// <qmail> MFSMailRequestObserver& changed to pointer
    48             CIpsPlgEventHandler* aEventHandler );
    47 	    static CIpsPlgPop3FetchOperation* NewL(
       
    48 	        CMsvSession& aMsvSession,
       
    49 	        TRequestStatus& aObserverRequestStatus,
       
    50 	        TMsvId aService,
       
    51 	        CIpsPlgTimerOperation& aActivityTimer,
       
    52 	        const TImPop3GetMailInfo& aGetMailInfo,
       
    53 	        CMsvEntrySelection* aSelection,
       
    54 	        TFSMailMsgId aFSMailBoxId,
       
    55 	        MFSMailRequestObserver* aFSOperationObserver,
       
    56 	        TInt aFSRequestId,
       
    57 	        CIpsPlgEventHandler* aEventHandler );
       
    58 
    49 
    59        
    50        
    60         /**
    51         /**
    61         *
    52         *
    62         */
    53         */
    63         virtual ~CIpsPlgPop3FetchOperation();
    54         virtual ~CIpsPlgPop3FetchOperation();
    64 
    55 
    65         /**
    56         /**
    66 	    * From MsvOperation
    57         *
    67 	    * Gets information on the progress of the operation
       
    68 	    * (see MsvOperation header)
       
    69         */
    58         */
    70         virtual const TDesC8& ProgressL();
    59         virtual const TDesC8& ProgressL();
    71 
    60 
    72         /**
    61         /**
    73 	    * From CIpsPlgBaseOperation
    62         *
    74 	    * For reporting if DoRunL leaves
    63         */
    75 	    */
       
    76         virtual const TDesC8& GetErrorProgressL( TInt aError );
    64         virtual const TDesC8& GetErrorProgressL( TInt aError );
    77         
    65         
    78         /**
    66         /**
    79         *
    67         *
    80         */
    68         */
    81         virtual TFSProgress GetFSProgressL() const;
    69         virtual TFSProgress GetFSProgressL() const;
    82         
    70         
    83 // <qmail> new func to this op
       
    84         /**
    71         /**
    85          * Returns operation type
    72         *
    86          */
    73         */
    87         TIpsOpType IpsOpType() const;
    74         virtual TInt IpsOpType() const;
    88 // </qmail>
       
    89         
    75         
    90     protected:
    76     protected:
    91 
    77 
    92         /**
    78         /**
    93         *
    79         *
    94         */
    80         */
    95 		// <qmail> MFSMailRequestObserver& changed to pointer
    81         CIpsPlgPop3FetchOperation(
    96 	    CIpsPlgPop3FetchOperation(
    82             CMsvSession& aMsvSession,
    97 	        CMsvSession& aMsvSession,
    83             TRequestStatus& aObserverRequestStatus,
    98 	        TRequestStatus& aObserverRequestStatus,
    84             TInt aFunctionId,
    99 	        TMsvId aService,
    85             TMsvId aService,
   100 	        CIpsPlgTimerOperation& aActivityTimer,
    86             CIpsPlgTimerOperation& aActivityTimer,
   101 	        const TImPop3GetMailInfo& aGetMailInfo,
    87             const TImPop3GetMailInfo& aGetMailInfo,
   102 	        CMsvEntrySelection* aSelection,
    88             TFSMailMsgId aFSMailBoxId,
   103 	        TFSMailMsgId aFSMailBoxId,
    89             MFSMailRequestObserver& aFSOperationObserver,
   104 	        MFSMailRequestObserver* aFSOperationObserver,
    90             TInt aFSRequestId,
   105 	        TInt aFSRequestId,
    91             CIpsPlgEventHandler* aEventHandler);
   106 	        CIpsPlgEventHandler* aEventHandler);
       
   107 
    92 
   108             
    93             
   109         /**
    94         /**
   110         *
    95         *
   111         */
    96         */
   112         void ConstructL();
    97         void ConstructL( const CMsvEntrySelection& aSel );
   113 
    98 
   114         /**
    99         /**
   115         * From CActive
   100         * From CActive
   116         */
   101         */
   117         virtual void RunL();
   102         virtual void RunL();
   139         /**
   124         /**
   140         *
   125         *
   141         */
   126         */
   142         void DoDisconnectL();
   127         void DoDisconnectL();
   143 
   128 
   144 	// <qmail> protected to private
   129     protected:
   145 	private:
       
   146 
   130 
   147         enum TFetchState {
   131         enum TFetchState {
   148             EStateIdle,
   132             EStateIdle,
   149             EStateConnecting,
   133             EStateConnecting,
   150             EStateClearCompleteFlag,
   134             EStateClearCompleteFlag,
   151             EStateFetching,
   135             EStateFetching,
   152             EStateDisconnecting };
   136             EStateDisconnecting };
   153     	// internal state of the operation
       
   154         TFetchState iState;
   137         TFetchState iState;
   155         // <qmail> protected to private
   138 
       
   139     protected:
       
   140         
   156         TDesC8* iFetchErrorProgress;
   141         TDesC8* iFetchErrorProgress;
   157     	// <qmail> removed iFunctionId;
   142         TInt iFunctionId;
   158         TImPop3GetMailInfo iGetMailInfo;
   143         TImPop3GetMailInfo iGetMailInfo;
   159         TPckgBuf<TPop3Progress> iProgressBuf;
   144         TPckgBuf<TPop3Progress> iProgressBuf;
   160         CMsvEntrySelection* iSelection;
   145         CMsvEntrySelection* iSelection;
   161         CIpsPlgEventHandler* iEventHandler;
   146         CIpsPlgEventHandler* iEventHandler;
   162         // For clear complete flag operation
   147         // For clear complete flag operation