ipsservices/ipssosplugin/inc/ipsplgcreatemessageoperation.h
branchRCL_3
changeset 63 d189ee25cf9d
equal deleted inserted replaced
61:dcf0eedfc1a3 63:d189ee25cf9d
       
     1 /*
       
     2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  New message creation operation
       
    15 *
       
    16 */
       
    17 
       
    18 // <qmail>
       
    19 #ifndef IPSPLGCREATEMESSAGEOPERATION_H
       
    20 #define IPSPLGCREATEMESSAGEOPERATION_H
       
    21 
       
    22 
       
    23 class TFSMailMsgId;
       
    24 class MFSMailRequestObserver;
       
    25 
       
    26 /**
       
    27 * class 
       
    28 *
       
    29 * Email operation to create a new message asynchronously.
       
    30 */
       
    31 NONSHARABLE_CLASS ( CIpsPlgCreateMessageOperation ) : public CIpsPlgBaseOperation
       
    32     {
       
    33 public:
       
    34     //<qmail> comments added
       
    35 	//<qmail> para to refe
       
    36 	//<qmail> aSmtpServiceId removed
       
    37     /**
       
    38     * Two-phased constructor
       
    39     * 
       
    40     * @param aSmtpService               contains SMTP message services
       
    41     * @param aMsvSession                client/server session to MsvServer
       
    42     * @param aObserverRequestStatus     operations observer status
       
    43     * @param aPartList                  specifies one or more parts of a message
       
    44     * @param aMailBoxId                 id's for mailbox and plugin
       
    45     * @param aOperationObserver         observes the progress of this operation
       
    46     * @param aRequestId                 identifier for this instance of operation, 
       
    47     *                                   assigned by the client
       
    48     * @return CIpsPlgCreateMessageOperation* self pointer                                  
       
    49     */
       
    50     static CIpsPlgCreateMessageOperation* NewL(
       
    51         CIpsPlgSmtpService& aSmtpService,
       
    52         CMsvSession& aMsvSession,
       
    53         TRequestStatus& aObserverRequestStatus,
       
    54         TMsvPartList aPartList,
       
    55         TFSMailMsgId aMailBoxId,
       
    56         MFSMailRequestObserver& aOperationObserver,
       
    57         TInt aRequestId );
       
    58 //</qmail>        
       
    59     /**
       
    60     * Destructor.
       
    61     */
       
    62     virtual ~CIpsPlgCreateMessageOperation();
       
    63     
       
    64     /**
       
    65     * From CMsvoperation
       
    66     */
       
    67     virtual const TDesC8& ProgressL();
       
    68 
       
    69     /**
       
    70     * From CIpsPlgBaseOperation
       
    71     */
       
    72     virtual const TDesC8& GetErrorProgressL(TInt aError);
       
    73 
       
    74     /**
       
    75     * From CIpsPlgBaseOperation
       
    76     */
       
    77     virtual TFSProgress GetFSProgressL() const;
       
    78 
       
    79     /**
       
    80      * From CIpsPlgBaseOperation
       
    81      * Returns operation type
       
    82      */
       
    83     TIpsOpType IpsOpType() const;    
       
    84 
       
    85 protected:
       
    86 
       
    87     /**
       
    88     * Constructor.
       
    89     */
       
    90 		//<qmail> para to refe
       
    91 	//<qmail> aSmtpServiceId removed
       
    92     CIpsPlgCreateMessageOperation(
       
    93         CIpsPlgSmtpService& aSmtpService,
       
    94         CMsvSession& aMsvSession,
       
    95         TRequestStatus& aObserverRequestStatus,
       
    96         TMsvPartList aPartList,
       
    97         TFSMailMsgId aMailBoxId,
       
    98         MFSMailRequestObserver& aOperationObserver,
       
    99         TInt aRequestId );
       
   100     //</qmail>
       
   101     /**
       
   102     * Constructor.
       
   103     */
       
   104     void ConstructL();
       
   105     
       
   106     void SignalFSObserver( TInt aStatus, CFSMailMessage* aMessage );
       
   107     
       
   108     TMsvId GetIdFromProgressL( const TDesC8& aProg );
       
   109 
       
   110     /**
       
   111     * From CActive
       
   112     */
       
   113     void DoCancel();
       
   114     
       
   115     /**
       
   116     * From CActive
       
   117     */
       
   118     void RunL();
       
   119     
       
   120     /**
       
   121     * From CActive
       
   122     */
       
   123     TInt RunError( TInt aError );
       
   124 
       
   125     void StartMessageCreation();
       
   126 
       
   127     virtual void StartMessageCreationL();
       
   128 
       
   129 protected:
       
   130 	//<qmail> para to refe
       
   131     CIpsPlgSmtpService& iSmtpService;   // not owned
       
   132     CMsvOperation* iOperation;   // owned 
       
   133 	//<qmail> iSmtpServiceId removed
       
   134     TMsvPartList iPartList;
       
   135 // <qmail> iBlank member removed
       
   136     MFSMailRequestObserver& iOperationObserver;  // not owned
       
   137     TFSProgress iFSProgress;
       
   138     };
       
   139 
       
   140 
       
   141 #endif//IPSPLGCREATEMESSAGEOPERATION_H
       
   142 
       
   143 // </qmail>