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