1 /* |
|
2 * Copyright (c) 2006 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: Definition of the implementation class for the |
|
15 * application controller interface |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __CVCAPPLICATIONCONTROLLERIMPL_H__ |
|
21 #define __CVCAPPLICATIONCONTROLLERIMPL_H__ |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include "appcontrollerconstants.h" |
|
26 #include "appcontroller.hrh" |
|
27 #include <e32base.h> |
|
28 #include <e32std.h> |
|
29 #include <barsread.h> |
|
30 #include <apgcli.h> |
|
31 #include <eikenv.h> |
|
32 #include <coecntrl.h> |
|
33 #include <eikappui.h> |
|
34 #include <AiwCommon.h> |
|
35 |
|
36 // Phone |
|
37 #include <PhCltTypes.h> |
|
38 |
|
39 |
|
40 // Bluetooth engine API |
|
41 #include <btengsettings.h> |
|
42 |
|
43 |
|
44 // Vmbx Engine API |
|
45 #include <vmnumber.h> |
|
46 #include <w32std.h> |
|
47 #include <PbkFields.hrh> |
|
48 #include <vmbx.rsg> |
|
49 |
|
50 #include <e32property.h> // RProperty |
|
51 #include <PSVariables.h> // Property values |
|
52 #include <MProfileEngine.h> |
|
53 |
|
54 // FORWARD DECLARATIONS |
|
55 class CAknPopupList; |
|
56 class CAppControllerPropertyHandler; |
|
57 class CUidNameArray; |
|
58 class CSendUi; |
|
59 class CAppControllerActiveObject; |
|
60 class CAknGlobalConfirmationQuery; |
|
61 |
|
62 // CLASS DECLARATION |
|
63 |
|
64 /** |
|
65 * This is the implementation class for launching applications and initiating profiles. |
|
66 * @lib AppController.lib |
|
67 * @since 2.0 |
|
68 */ |
|
69 |
|
70 class CVCApplicationControllerImpl : public CCoeControl, |
|
71 public MAiwNotifyCallback |
|
72 { |
|
73 public: // Constructors and destructor |
|
74 |
|
75 enum TState |
|
76 { |
|
77 EVoiceMail, |
|
78 ENewMessage, |
|
79 EQueryDialog |
|
80 }; |
|
81 |
|
82 /** |
|
83 * Two-phased constructor. |
|
84 */ |
|
85 static CVCApplicationControllerImpl* NewL(); |
|
86 |
|
87 /** |
|
88 * Destructor. |
|
89 */ |
|
90 virtual ~CVCApplicationControllerImpl(); |
|
91 |
|
92 public: // New functions |
|
93 |
|
94 /** |
|
95 * Generic function used to execute a voice command |
|
96 * @param aCommandId ID of command to be executed. |
|
97 * @param aParameters The name of the application of profile. |
|
98 * @return TInt KErrNone if OK, else value indicating error situation. |
|
99 */ |
|
100 TInt ExecuteCommandL( TUint aCommandId, const TDesC& aParameters ); |
|
101 |
|
102 /** |
|
103 * Generic function to be used to execute voice command |
|
104 * @since Averell 2.0 |
|
105 * @param aCommandId ID of command to be executed. |
|
106 * @param aParameters The name of the application of profile. |
|
107 * @return TInt KErrNone if OK, else value indicating error situation. |
|
108 */ |
|
109 TInt DoExecuteCommandL( TUint aCommandId, const TDesC& aParameters ); |
|
110 |
|
111 public: // Functions from base classes |
|
112 |
|
113 /* |
|
114 * From CCoeControl |
|
115 * @see CCoeControl |
|
116 */ |
|
117 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
118 |
|
119 /* |
|
120 * From MAiwNotifyCallback |
|
121 * @see MAiwNotifyCallback For more detailed information |
|
122 */ |
|
123 TInt HandleNotifyL( TInt aCmdId, TInt aEventId, |
|
124 CAiwGenericParamList& aEventParamList, |
|
125 const CAiwGenericParamList& aInParamList ); |
|
126 |
|
127 public: // New functions |
|
128 |
|
129 /** |
|
130 * Handles the incoming call |
|
131 * @since 2.8 |
|
132 * @return void |
|
133 */ |
|
134 void HandleCurrentCallStatusChange(); |
|
135 |
|
136 /** |
|
137 * Receives active object events and acts according to them |
|
138 * @since 2.8 |
|
139 * @param aStatus active object status |
|
140 * @return void |
|
141 */ |
|
142 void HandleActiveObjectStatus(TInt aStatus); |
|
143 |
|
144 private: // Constructors |
|
145 |
|
146 /** |
|
147 * C++ default constructor. |
|
148 */ |
|
149 CVCApplicationControllerImpl(); |
|
150 |
|
151 /** |
|
152 * By default Symbian 2nd phase constructor is private. |
|
153 */ |
|
154 void ConstructL(); |
|
155 |
|
156 private: // New functions |
|
157 |
|
158 /** |
|
159 * Initiates profiles |
|
160 * @since 2.0 |
|
161 * @param aCommandId The Profile Id |
|
162 * @return void |
|
163 */ |
|
164 void ProfileEngL(TUint aCommandId); |
|
165 |
|
166 /** |
|
167 * Call to the Voice mailbox number and if no number is defined |
|
168 * it asks user to enter it and thern makes the call. |
|
169 * @since 2.0 |
|
170 * @return TInt Standard Symbian error code |
|
171 */ |
|
172 TInt VmbxEngL(); |
|
173 |
|
174 /** |
|
175 * Activates/deactivates the Bluetooth power mode |
|
176 * @since 2.0 |
|
177 * @return TInt Standard Symbian error code |
|
178 */ |
|
179 #ifdef __BT |
|
180 TInt BTEngL(); |
|
181 #endif |
|
182 |
|
183 /** |
|
184 * Cancels the NewMessage Dialog |
|
185 * @since 2.0 |
|
186 * @return void |
|
187 */ |
|
188 void Cancel(); |
|
189 |
|
190 /** |
|
191 * Gets the flags associated with offline mode. |
|
192 * @param aOfflineModeOff Offline mode flag |
|
193 * @param aBTActivationEnabled BT activation flag |
|
194 * @return None. |
|
195 */ |
|
196 void GetOfflineModeFlagsL( TInt& aOfflineModeOff, |
|
197 TInt& aBTActivationEnabled ) const; |
|
198 |
|
199 /** |
|
200 * Returns CSendUi object |
|
201 * @since 3.0 |
|
202 * @return CSendUi |
|
203 */ |
|
204 CSendUi& MHandlesSendAppUi(); |
|
205 |
|
206 /** |
|
207 * Activates the user selected message editor |
|
208 * @since 2.6 |
|
209 * @param aType a message type (sms, mms, email). |
|
210 * @return TInt an error code |
|
211 */ |
|
212 TInt ActivateMessageL( TEditorType aType ); |
|
213 |
|
214 /** |
|
215 * Gets the flags associated with SIM card. |
|
216 * @param aSIMCardMode, SIM card mode flag |
|
217 * @return None. |
|
218 */ |
|
219 void GetSIMCardMode( TInt& aSIMCardMode ) const; |
|
220 |
|
221 /** |
|
222 * Connects to RApaLsSession. |
|
223 * @since 3.0 |
|
224 * @return void |
|
225 */ |
|
226 void CreateApaConnectionL(); |
|
227 |
|
228 /* Activates an instance of an application. |
|
229 * @since 3.0 |
|
230 * @param aUid Application UID |
|
231 * @param aCommandLine Command line parameters. |
|
232 * @return void |
|
233 */ |
|
234 void ActivateAppInstanceL( const TUid aUid ); |
|
235 |
|
236 /** |
|
237 * Used to launch applications. Checks whether an instance of the launched |
|
238 * application is already running. |
|
239 * @since 3.0 |
|
240 * @param aUid The Uid of the specific application. |
|
241 * @param aCommandLine Command line parameters. |
|
242 * @param aMultipleInstances If true, the application is activated |
|
243 * in multiple instances. |
|
244 * @return void |
|
245 */ |
|
246 void ActivateAppL( const TUid aUid, |
|
247 TBool aMultipleInstances = EFalse ); |
|
248 |
|
249 /** |
|
250 * Does voice call to voicemailbox number |
|
251 * |
|
252 * @param aNumber Phone number to be called |
|
253 */ |
|
254 void DialVmbxL( const TDesC& aNumber ); |
|
255 |
|
256 /* |
|
257 * Closes query dialog |
|
258 */ |
|
259 void DismissQueryDialog(); |
|
260 |
|
261 private: // Data |
|
262 |
|
263 //for the new message menu |
|
264 CAknPopupList* iPopupList; // Not owned |
|
265 RApaLsSession* iApaLsSession; |
|
266 TInt iResourceFileOffset; |
|
267 CAppControllerPropertyHandler* iPropertyHandler; |
|
268 TBool iPSEventCheckStatus; |
|
269 |
|
270 CVCApplicationControllerImpl::TState iState; |
|
271 RVmbxNumber iVmbx; |
|
272 TBool iCallStatus; |
|
273 // array for supported message types |
|
274 CUidNameArray* iMsgTypes; |
|
275 // send ui for launching message editors |
|
276 CSendUi* iSendUi; |
|
277 CAppControllerActiveObject* iActiveObject; |
|
278 CAknGlobalConfirmationQuery* iGlobalConfQuery; |
|
279 MProfileEngine* iProfileEngine; |
|
280 TInt iProfileId; |
|
281 CAknQueryDialog* iQueryDialog; |
|
282 CActiveSchedulerWait iWait; |
|
283 }; |
|
284 |
|
285 #endif // CVCAPPLICATIONCONTROLLERIMPL_H |
|
286 |
|
287 // End of File |
|