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