meetingrequest/mricalviewer/inc/cesmruilauncher.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:  ESMR UI launcher object definition
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CESMRUILAUNCHER_H
       
    19 #define CESMRUILAUNCHER_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include "cesmricalviewerasynccommand.h"
       
    23 class TESMRInputParams;
       
    24 class MAgnEntryUiCallback;
       
    25 class CCalSession;
       
    26 class MAgnEntryUi;
       
    27 class CESMRViewerController;
       
    28 
       
    29 /**
       
    30  * CESMRUiLauncher is responsible for launching MR viewer using
       
    31  * Agn Entry UI API. Part of the ican viewer ecom plugin implementation.
       
    32  */
       
    33 NONSHARABLE_CLASS( CESMRUiLauncher ) :
       
    34         public CESMRIcalViewerAsyncCommand
       
    35     {
       
    36 public: // Construction and destruction
       
    37 
       
    38     /**
       
    39      * Creates and initialzes new CESMRUiLauncher component. Ownership
       
    40      * is transferred to caller.
       
    41      *
       
    42      * @param aCalSession Reference to calendar session.
       
    43      * @param aInputParameters Reference to input parameters structure.
       
    44      * @param aAgnCallback Reference AGN Entry UI callback parameters.
       
    45      * @return Pointer to CESMRUiLauncher object
       
    46      */
       
    47     static CESMRUiLauncher* NewL(
       
    48             CCalSession& aCalSession,
       
    49             TESMRInputParams& aInputParameters,
       
    50             MAgnEntryUiCallback& aAgnCallback );
       
    51 
       
    52     /**
       
    53      * Creates and initialzes new CESMRUiLauncher component. Ownership
       
    54      * is transferred to caller. Created object is left to cleanup stack.
       
    55      *
       
    56      * @param aCalSession Reference to calendar session.
       
    57      * @param aInputParameters Reference to input parameters structure.
       
    58      * @param aAgnCallback Reference AGN Entry UI callback parameters
       
    59      * @return Pointer to CESMRUiLauncher object
       
    60      */
       
    61     static CESMRUiLauncher* NewLC(
       
    62             CCalSession& aCalSession,
       
    63             TESMRInputParams& aInputParameters,
       
    64             MAgnEntryUiCallback& aAgnCallback );
       
    65 
       
    66     /**
       
    67      *  C++ destructor.
       
    68      */
       
    69     ~CESMRUiLauncher();
       
    70 
       
    71 
       
    72 public: // From CESMRIcalViewerAsyncCommand
       
    73     void ExecuteAsyncCommandL();
       
    74     void CancelAsyncCommand();
       
    75 
       
    76 private: // Implementation
       
    77     CESMRUiLauncher(
       
    78             CCalSession& aCalSession,
       
    79             TESMRInputParams& aInputParameters,
       
    80             MAgnEntryUiCallback& aAgnCallback );
       
    81     void ConstructL();
       
    82     void LaunchMRViewerL();
       
    83     void LaunchEmailViewerUiL();
       
    84     void ExecuteAsyncCommandInternalL();
       
    85 
       
    86 private: // Data
       
    87     /// Owm: ESMRViewer controller
       
    88     CESMRViewerController* iViewerController;
       
    89     /// Ref: Reference to input parameters
       
    90     TESMRInputParams& iInputParameters;
       
    91     // Ref: Reference to agn entryui callback
       
    92     MAgnEntryUiCallback& iAgnCallback;
       
    93     /// Own: Command result structure
       
    94     MESMRIcalViewerObserver::TIcalViewerOperationResult iResult;
       
    95     };
       
    96 
       
    97 #endif // CESMRUILAUNCHER_H