meetingrequest/mricalviewer/inc/cesmricalvieweremailasynccmd.h
changeset 0 8466d47a6819
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2007-2009 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:  Execuing email specific command asynchronously
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRICALVIEWEREMAILASYNCCMD_H
       
    20 #define CESMRICALVIEWEREMAILASYNCCMD_H
       
    21 
       
    22 #include "cesmricalviewerasynccommand.h"
       
    23 //<cmail>
       
    24 #include "mesmricalviewerobserver.h"
       
    25 #include "esmricalvieweropcodes.hrh"
       
    26 #include "mesmricalviewercallback.h"
       
    27 //</cmail>
       
    28 
       
    29 class CFSMailClient;
       
    30 
       
    31 
       
    32 /**
       
    33  * Command for triggering asynchronous fs_email command into execution.
       
    34  * FS_Email notifies after commad completion via MESMRIcalViewerObserver
       
    35  * interface.
       
    36  */
       
    37 NONSHARABLE_CLASS( CESMRIcalViewerEmailAsyncCmd ) :
       
    38     public CESMRIcalViewerAsyncCommand,
       
    39     public MESMRIcalViewerObserver
       
    40     {
       
    41 public: // Construction and destruction
       
    42 
       
    43     /**
       
    44      * Creates and initializes new CESMRIcalViewerEmailAsyncCmd command.
       
    45      * @param aOperation Operation to be executed.
       
    46      * @param aCalSession Reference to calendar session.
       
    47      * @param aCallback Reference to ESMRIcalViewer callback
       
    48      */
       
    49     static CESMRIcalViewerEmailAsyncCmd* NewL(
       
    50             TESMRIcalViewerOperationType aOperation,
       
    51             CCalSession& aCalSession,
       
    52             MESMRIcalViewerCallback& aCallback );
       
    53     
       
    54     /**
       
    55      * C++ Destructor
       
    56      */
       
    57     ~CESMRIcalViewerEmailAsyncCmd();
       
    58 
       
    59 public: // From MESMRIcalViewerObserver
       
    60     void OperationCompleted(
       
    61             MESMRIcalViewerObserver::TIcalViewerOperationResult aResult );
       
    62     void OperationError(
       
    63             MESMRIcalViewerObserver::TIcalViewerOperationResult aResult );
       
    64 
       
    65 public: // From MAgnEntryUiCallback
       
    66     void ProcessCommandL(TInt aCommandId);
       
    67     TInt ProcessCommandWithResultL( TInt aCommandId );
       
    68     TBool IsCommandAvailable( TInt aCommandId );
       
    69 
       
    70 private: // From MESMRIcalViewerAsyncCommand
       
    71     void ExecuteAsyncCommandL();
       
    72     void CancelAsyncCommand();
       
    73 
       
    74 private: // Implementation
       
    75     CESMRIcalViewerEmailAsyncCmd(
       
    76             TESMRIcalViewerOperationType aOperation,
       
    77             CCalSession& aCalSession,
       
    78             MESMRIcalViewerCallback& aCallback );
       
    79     void ConstructL();
       
    80 
       
    81 private: // Data
       
    82     /// Own: Email operation to be executed
       
    83     TESMRIcalViewerOperationType iOperation;
       
    84     /// Ref: Reference to ESMRIcalViewer callback
       
    85     MESMRIcalViewerCallback& iCallback;
       
    86     };
       
    87 
       
    88 #endif // CESMRICALVIEWEREMAILASYNCCMD_H
       
    89 
       
    90 // EOF
       
    91