39 _LIT8( KAHInterface, "IDataAction"); |
39 _LIT8( KAHInterface, "IDataAction"); |
40 _LIT8( KAHService, "Service.ActionHandler"); |
40 _LIT8( KAHService, "Service.ActionHandler"); |
41 |
41 |
42 _LIT( KLaunchApplication, "launch_application" ); |
42 _LIT( KLaunchApplication, "launch_application" ); |
43 _LIT( KViewActivation, "view_activation" ); |
43 _LIT( KViewActivation, "view_activation" ); |
44 _LIT( KCmdLine, "cmd_line"); |
44 _LIT( KCmdLine, "cmd_line" ); |
45 |
45 |
46 _LIT8( KType, "type" ); |
46 _LIT8( KType, "type" ); |
47 _LIT8( KLaunchMethod, "launch_method" ); |
47 _LIT8( KLaunchMethod, "launch_method" ); |
48 _LIT8( KApplicationUid, "application_uid" ); |
48 _LIT8( KApplicationUid, "application_uid" ); |
49 _LIT8( KViewId, "view_id" ); |
49 _LIT8( KViewId, "view_id" ); |
105 // ---------------------------------------------------------------------------- |
105 // ---------------------------------------------------------------------------- |
106 // CAIXuikonEventHandler::CAIXuikonEventHandler() |
106 // CAIXuikonEventHandler::CAIXuikonEventHandler() |
107 // ---------------------------------------------------------------------------- |
107 // ---------------------------------------------------------------------------- |
108 // |
108 // |
109 CAIEventHandler::CAIEventHandler( CXmlUiController& aUiController ) |
109 CAIEventHandler::CAIEventHandler( CXmlUiController& aUiController ) |
110 : iUiController( aUiController ) |
110 : iUiController( aUiController ), iMsgInterface ( NULL ) |
111 { |
111 { |
112 } |
112 } |
113 |
113 |
114 // ---------------------------------------------------------------------------- |
114 // ---------------------------------------------------------------------------- |
115 // CAISystemEventHandler::ConstructL() |
115 // CAISystemEventHandler::ConstructL() |
137 // CAISystemEventHandler::~CAISystemEventHandler() |
137 // CAISystemEventHandler::~CAISystemEventHandler() |
138 // ---------------------------------------------------------------------------- |
138 // ---------------------------------------------------------------------------- |
139 // |
139 // |
140 CAIEventHandler::~CAIEventHandler() |
140 CAIEventHandler::~CAIEventHandler() |
141 { |
141 { |
|
142 if ( iMsgInterface ) |
|
143 { |
|
144 iMsgInterface->Close(); |
|
145 iMsgInterface = NULL; |
|
146 } |
|
147 |
142 if( iServiceHandler ) |
148 if( iServiceHandler ) |
143 { |
149 { |
144 iServiceHandler->Reset(); |
150 iServiceHandler->Reset(); |
145 } |
151 } |
146 delete iServiceHandler; |
152 delete iServiceHandler; |
204 TInt32 uid( 0 ); |
210 TInt32 uid( 0 ); |
205 User::LeaveIfError( AiUtility::ParseInt( uid, uidStr ) ); |
211 User::LeaveIfError( AiUtility::ParseInt( uid, uidStr ) ); |
206 |
212 |
207 CLiwDefaultMap* map = CLiwDefaultMap::NewL(); |
213 CLiwDefaultMap* map = CLiwDefaultMap::NewL(); |
208 map->PushL(); |
214 map->PushL(); |
|
215 |
209 map->InsertL( KType, TLiwVariant( KLaunchApplication )); |
216 map->InsertL( KType, TLiwVariant( KLaunchApplication )); |
210 map->InsertL( KLaunchMethod, TLiwVariant( KCmdLine )); |
217 map->InsertL( KLaunchMethod, TLiwVariant( KCmdLine )); |
211 map->InsertL( KApplicationUid, TLiwVariant( uid )); |
218 map->InsertL( KApplicationUid, TLiwVariant( uid )); |
212 |
219 |
213 ExecuteAppLauncherL( *map ); |
220 ExecuteAppLauncherL( *map ); |
255 // Calls the actual LIW interface |
262 // Calls the actual LIW interface |
256 // ---------------------------------------------------------------------------- |
263 // ---------------------------------------------------------------------------- |
257 // |
264 // |
258 void CAIEventHandler::ExecuteAppLauncherL( CLiwDefaultMap& aMap ) |
265 void CAIEventHandler::ExecuteAppLauncherL( CLiwDefaultMap& aMap ) |
259 { |
266 { |
260 MLiwInterface* msgInterface = ActionHandlerInterfaceL( ); |
267 if ( !iMsgInterface ) |
261 if( msgInterface && iServiceHandler ) |
268 { |
|
269 iMsgInterface = ActionHandlerInterfaceL(); |
|
270 } |
|
271 |
|
272 if( iMsgInterface && iServiceHandler ) |
262 { |
273 { |
263 CLiwGenericParamList& inparam = iServiceHandler->InParamListL(); |
274 CLiwGenericParamList& inparam = iServiceHandler->InParamListL(); |
264 CLiwGenericParamList& outparam = iServiceHandler->OutParamListL(); |
275 CLiwGenericParamList& outparam = iServiceHandler->OutParamListL(); |
265 |
276 |
266 TLiwGenericParam pluginUid( KPluginId, TLiwVariant( TUid::Uid( KCASpaAppLauncherPlugin ))); |
277 TLiwGenericParam pluginUid( KPluginId, TLiwVariant( TUid::Uid( KCASpaAppLauncherPlugin ))); |
267 inparam.AppendL( pluginUid ); |
278 inparam.AppendL( pluginUid ); |
268 |
279 |
269 TLiwGenericParam data( KData, TLiwVariant( &aMap )); |
280 TLiwGenericParam data( KData, TLiwVariant( &aMap )); |
270 inparam.AppendL( data ); |
281 inparam.AppendL( data ); |
271 |
282 |
272 msgInterface ->ExecuteCmdL(KExecute, inparam, outparam); |
283 iMsgInterface ->ExecuteCmdL(KExecute, inparam, outparam); |
273 msgInterface->Close(); |
|
274 |
284 |
275 outparam.Reset(); |
285 outparam.Reset(); |
276 inparam.Reset(); |
286 inparam.Reset(); |
277 } |
287 } |
278 } |
288 } |