calendarui/controller/inc/calencmdlinelauncher.h
changeset 0 f979ecb2b13e
child 36 9c5b1510919f
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2007 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:   Calendar cmd line launch manager
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CALENCMDLINELAUNCHER_H
       
    21 #define CALENCMDLINELAUNCHER_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <calennotificationhandler.h> // MCalenNotificationHandler
       
    26 #include "calencmdlineparser.h"        // TCalenCmdParameters
       
    27 #include <apadef.h>                     // TApaCommand
       
    28 
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CCalenController;
       
    32 class CCalenGlobalData;
       
    33 class CAknViewAppUi;
       
    34 
       
    35 // CLASS DEFINITIONS
       
    36 
       
    37 /**
       
    38  * The action ui handles events passed from the controller and delegates
       
    39  * them to the appropriate place (i.e. the specific action ui classes).
       
    40  */
       
    41 class CCalenCmdLineLauncher : public CBase,
       
    42                                            public MCalenNotificationHandler
       
    43     {
       
    44     public:  // Construction and destruction
       
    45         /**
       
    46          * Symbian 1st phase constructor
       
    47          * @param aController Reference to CCalenController
       
    48          * @param aAppUi Reference to CAknViewAppUi
       
    49          * @return Self pointer to CCalenCmdLineLauncher
       
    50          */
       
    51         static CCalenCmdLineLauncher* NewL( CCalenController& aController, 
       
    52                                                             CAknViewAppUi& aAppUi );
       
    53         
       
    54         /**
       
    55          * Destructor
       
    56          */
       
    57         virtual ~CCalenCmdLineLauncher();
       
    58     
       
    59     public:
       
    60         /**
       
    61          * From CEikAppUi
       
    62          * Handles command line launch options
       
    63          * @param aCommand EApaCommandOpen | EApaCommandCreate | etc...
       
    64          * @param aDocumentName A document file name
       
    65          * @param aTail command line parameter
       
    66          */
       
    67         TBool ProcessCommandParametersL( TApaCommand aCommand,
       
    68                                          TFileName& aDocumentName, 
       
    69                                          const TDesC8& aTail );
       
    70 
       
    71     public:  // from MCalenNotificationHandler
       
    72         /**
       
    73          * Handle registered notifications
       
    74          * @param aNotification Notification to be handled
       
    75          */
       
    76         void HandleNotification( const TCalenNotification aNotification );
       
    77         
       
    78         /**
       
    79          * Set the dialog close status.
       
    80          * @param aIsExitOnDlgClose To set the status.
       
    81          */
       
    82         void SetExitOnDialogclose( TBool aIsExitOnDlgClose );
       
    83         
       
    84         /**
       
    85          * Get the dialog close status.
       
    86          * @return TBool, Etrue if the dialog is open
       
    87          */
       
    88         TBool GetExitOnDialogStatus();
       
    89 
       
    90     private: // Constructors
       
    91         /**
       
    92          * C++ constructor
       
    93          * @param aController Reference to the CCalenController
       
    94          * @param aAppUi Reference to the CAknViewAppUi
       
    95          */
       
    96         CCalenCmdLineLauncher( CCalenController& aController, CAknViewAppUi& aAppUi ); 
       
    97         
       
    98         /**
       
    99          * Symbian 2nd phase constructor
       
   100          */
       
   101          void ConstructL();
       
   102     
       
   103     private:
       
   104         /**
       
   105          * Static Callback function to handle Calendar launch. 
       
   106          * This is run as CAsynCallback
       
   107          * @param aObject an object passed by callback
       
   108          */
       
   109         static TInt StaticCalendarLaunchCallBack( TAny* aObject );
       
   110         
       
   111         /**
       
   112          * Non-Static Callback function to handle Calendar launch.
       
   113          */
       
   114         TInt CalendarLaunchCallBackL();
       
   115         
       
   116         /**
       
   117          * Non-leaving function that handles Calendar launch. 
       
   118          */
       
   119         TInt CalendarLaunchCallBack();
       
   120         
       
   121         /**
       
   122          * Leaving function that handles ECalenNotifyViewCreated
       
   123          */
       
   124         void HandleECalenNotifyViewCreatedL(); 
       
   125         
       
   126         /**
       
   127          * Get reference to CAknViewAppUi
       
   128          * @return reference to CAknViewAppUi
       
   129          */
       
   130         CAknViewAppUi& AppUi();
       
   131         
       
   132 		/**
       
   133 		 *Set context using local uid before lauching Event view or Editor.
       
   134 		 */
       
   135         void SetContextBeforeLaunchL();
       
   136 
       
   137     private:  // Member data
       
   138 
       
   139         TBool iIsExitOnDlgClose;
       
   140         TBool iForceUseViewer;
       
   141         CAsyncCallBack* iCalendarLaunchCallBack;
       
   142         TCalenCmdParameters iCmdParameters;
       
   143         CCalenGlobalData* iGlobalData;
       
   144         CCalenController& iController;
       
   145         
       
   146         TBool iDelayCallBack;
       
   147         CAknViewAppUi& iAppUi;
       
   148     };
       
   149 
       
   150 #endif // CALENCMDLINELAUNCHER_H
       
   151 
       
   152 // End of file