email/imum/Mtms/Inc/SmtpCreateNewOp.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2006 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: 
       
    15 *       SMTP Create New Email operation
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef __SMTPCREATENEWOP_H__
       
    20 #define __SMTPCREATENEWOP_H__
       
    21 
       
    22 #include <MuiuMsgEditorLauncher.h>
       
    23 #include "SmtpPreCreationOpBase.h"
       
    24 
       
    25 class CMsvEmailConnectionProgressProvider;
       
    26 class CMtmStore;
       
    27 
       
    28 
       
    29 /**
       
    30 * SMTP Create New Email operation
       
    31 */
       
    32 class CSmtpCreateNewOp : public CSmtpPreCreationOpBase
       
    33     {
       
    34     public:
       
    35 
       
    36         /**
       
    37         *
       
    38         */
       
    39         static CSmtpCreateNewOp* NewL(
       
    40             CImumInternalApi& aMailboxApi,
       
    41             TRequestStatus& aObserverRequestStatus,
       
    42             const TEditorParameters& aParams,
       
    43             const TDesC& aAppName,
       
    44             const TDesC8& aEditorProgress );
       
    45 
       
    46         /**
       
    47         *
       
    48         */
       
    49         virtual ~CSmtpCreateNewOp();
       
    50 
       
    51     protected:
       
    52 
       
    53         /**
       
    54         * From CActive
       
    55         */
       
    56         virtual void RunL();
       
    57 
       
    58         /**
       
    59         * From CActive
       
    60         */
       
    61         void DoRunL();
       
    62 
       
    63         /**
       
    64         * From CActive
       
    65         */        
       
    66         virtual TInt RunError(TInt aError);
       
    67 
       
    68     private:
       
    69 
       
    70         /**
       
    71         *
       
    72         */
       
    73         CSmtpCreateNewOp(
       
    74             CImumInternalApi& aMailboxApi,
       
    75             TRequestStatus& aObserverRequestStatus,
       
    76             const TEditorParameters& aParams,
       
    77             const TDesC& aAppName );
       
    78 
       
    79         /**
       
    80         *
       
    81         */
       
    82         void ConstructL( const TDesC8& aEditorProgress );
       
    83 
       
    84         /**
       
    85         *
       
    86         */
       
    87         void LaunchEditorL();
       
    88 
       
    89         /**
       
    90         *
       
    91         */
       
    92         void WaitL();
       
    93 
       
    94         /**
       
    95         *
       
    96         */
       
    97         void CreateMessageL( TBool aLaunchEditorAfterCreate = EFalse);
       
    98 
       
    99     private: // Data
       
   100         enum TState {
       
   101             EStateIdle,
       
   102             EStateDeleteAll,
       
   103             EStateCreateNew,
       
   104             EStateLaunch,
       
   105             EStateWait,
       
   106             EStateCreate };
       
   107         
       
   108         TState iState;
       
   109         TEditorParameters iParams;
       
   110         TFileName iAppName;
       
   111         HBufC8* iEditorProgress;
       
   112         TMsvId iService;
       
   113     };
       
   114 
       
   115 
       
   116 #endif