srsf/vcommandhandler/src/vcommandrunnable.cpp
branchRCL_3
changeset 11 6347473a7bb2
parent 0 bf1d17376201
equal deleted inserted replaced
9:fc313e1df071 11:6347473a7bb2
    21 #include "rubydebug.h"
    21 #include "rubydebug.h"
    22 
    22 
    23 #include <apaid.h>
    23 #include <apaid.h>
    24 #include <apgcli.h>
    24 #include <apgcli.h>
    25 #include <apacmdln.h>
    25 #include <apacmdln.h>
       
    26 #include <apgtask.h>
       
    27 #include <eikappui.h>
    26 
    28 
    27 /**
    29 /**
    28 * The version of the streamed data protocol
    30 * The version of the streamed data protocol
    29 * It is rather likely, that the format of the data streamed changes in the future.
    31 * It is rather likely, that the format of the data streamed changes in the future.
    30 * Using the protocol version, the code can check if it knows how to parse the 
    32 * Using the protocol version, the code can check if it knows how to parse the 
   230 		CleanupStack::PopAndDestroy( arguments );
   232 		CleanupStack::PopAndDestroy( arguments );
   231 		CleanupStack::PopAndDestroy( &process );
   233 		CleanupStack::PopAndDestroy( &process );
   232 		}
   234 		}
   233 	else 
   235 	else 
   234 		{
   236 		{
       
   237         const TUid KLogsUID3 = { 270486741 };//101F4CD5
       
   238         //In case logs.exe run in background [EDCN-84B68Q]
       
   239         //todo: General support for this kind of case,
       
   240 		//      eg, add "view" keyworkd in defaultvoicecommands.xml...
       
   241         if ( iExeUid == KLogsUID3 )
       
   242             {
       
   243             TApaTaskList taskList( CCoeEnv::Static()->WsSession() );
       
   244             TApaTask task = taskList.FindApp( iExeUid );
       
   245             if( task.Exists() ) //Logs already open. Request it to
       
   246                 {               //activate the correct view
       
   247                 task.SendMessage( iExeUid, *iArguments );
       
   248                 return;
       
   249                 }
       
   250             }
       
   251         
   235 		TApaAppInfo appInfo;
   252 		TApaAppInfo appInfo;
   236 		RApaLsSession apaLsSession;
   253 		RApaLsSession apaLsSession;
   237 		CleanupClosePushL( apaLsSession );
   254 		CleanupClosePushL( apaLsSession );
   238 		User::LeaveIfError( apaLsSession.Connect() );
   255 		User::LeaveIfError( apaLsSession.Connect() );
   239 		User::LeaveIfError( apaLsSession.GetAppInfo( appInfo, iExeUid ) );
   256 		User::LeaveIfError( apaLsSession.GetAppInfo( appInfo, iExeUid ) );