meetingrequest/mricalviewer/inc/cesmricalvieweropenmrcmd.h
changeset 0 8466d47a6819
child 16 4ce476e64c59
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:  Open meeting request command definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRICALVIEWEROPENMRCMD_H
       
    20 #define CESMRICALVIEWEROPENMRCMD_H
       
    21 
       
    22 #include "cesmricalviewerasynccommand.h"
       
    23 #include "tesmrinputparams.h"
       
    24 //<cmail>
       
    25 #include "mesmricalviewerobserver.h"
       
    26 #include "mesmricalviewercallback.h"
       
    27 //</cmail>
       
    28 #include <MAgnEntryUi.h>
       
    29 
       
    30 
       
    31 class CESMRUiLauncher;
       
    32 class CFSMailClient;
       
    33 class CESMRIcalViewerLoadMRDataCmd;
       
    34 class MESMRIcalViewerCommand;
       
    35 
       
    36 /**
       
    37  * Command for opening meeting request
       
    38  */
       
    39 NONSHARABLE_CLASS( CESMRIcalViewerOpenMRCmd ) :
       
    40     public CESMRIcalViewerAsyncCommand,
       
    41     public MESMRIcalViewerObserver,
       
    42     public MAgnEntryUiCallback
       
    43     {
       
    44 public: // Construction and destruction
       
    45     /**
       
    46      *  Creates and initializes new CESMRIcalViewerOpenMRCmd object.
       
    47      * @param aCallback Reference to ESMRIcalViewer callback.
       
    48      * @param aMailClient Reference to mail client object.
       
    49      * @param aCalSession Reference to calendar db session.
       
    50      */
       
    51     static CESMRIcalViewerOpenMRCmd* NewL(
       
    52             MESMRIcalViewerCallback& aCallback,
       
    53             CFSMailClient& aMailClient,
       
    54             CCalSession& aCalSession );
       
    55 
       
    56     /**
       
    57      * C++ destructor.
       
    58      */
       
    59     ~CESMRIcalViewerOpenMRCmd();
       
    60 
       
    61 public: // From MESMRIcalViewerAsyncCommand
       
    62     void ExecuteAsyncCommandL();
       
    63     void CancelAsyncCommand();
       
    64 
       
    65 public: // From MESMRIcalViewerObserver
       
    66     void OperationCompleted(
       
    67              MESMRIcalViewerObserver::TIcalViewerOperationResult aResult );
       
    68     void OperationError(
       
    69             MESMRIcalViewerObserver::TIcalViewerOperationResult aResult );
       
    70 
       
    71 public: // From MAgnEntryUiCallback
       
    72     void ProcessCommandL(TInt aCommandId);
       
    73     TInt ProcessCommandWithResultL( TInt aCommandId );
       
    74     TBool IsCommandAvailable( TInt aCommandId );
       
    75 
       
    76 private: // Implementation
       
    77     CESMRIcalViewerOpenMRCmd(
       
    78             MESMRIcalViewerCallback& aCallback,
       
    79             CFSMailClient& aMailClient,
       
    80             CCalSession& aCalSession );
       
    81     void ConstructL();
       
    82     void HandleOperationCompeletedL(
       
    83             MESMRIcalViewerObserver::TIcalViewerOperationResult aResult );
       
    84     void HandleError( TInt aError );
       
    85     void LaunchUIL();
       
    86 
       
    87 private: // Data
       
    88     /// Ref: Reference to ESMRICalViewer callback
       
    89     MESMRIcalViewerCallback& iCallback;
       
    90     /// Own: Input parameters
       
    91     TESMRInputParams iInputParameters;
       
    92     /// Ref: Reference to FS Email mail client object
       
    93     CFSMailClient& iMailClient;
       
    94     /// Own: Load MR Data command
       
    95     CESMRIcalViewerLoadMRDataCmd* iLoadMRDataCmd;
       
    96     /// Own: UI launcher
       
    97     CESMRUiLauncher* iUILauncher;
       
    98     /// Own: Operation result
       
    99     MESMRIcalViewerObserver::TIcalViewerOperationResult iResult;
       
   100     /// Own: Current callback command
       
   101     TESMRIcalViewerOperationType iCurrentCbCommand;
       
   102     /// Own: Asynchronous email command
       
   103     MESMRIcalViewerCommand* iEmailCommand;
       
   104     /// Own: Command received via callback
       
   105     TInt iMRViewerCommand;
       
   106     };
       
   107 
       
   108 #endif // CESMRICALVIEWEROPENMRCMD_H
       
   109 
       
   110 // EOF