securitydialogs/Securitynotifier/Src/SecurityNotifier.cpp
changeset 14 b75757c81051
parent 0 164170e6151a
child 19 098e361762d2
equal deleted inserted replaced
1:d5423fbb4f29 14:b75757c81051
    29 #include <mmtsy_names.h>
    29 #include <mmtsy_names.h>
    30 #include <securitynotification.h>
    30 #include <securitynotification.h>
    31 #include <AknQueryDialog.h>
    31 #include <AknQueryDialog.h>
    32 #include <featmgr.h>
    32 #include <featmgr.h>
    33 #include <SCPClient.h>
    33 #include <SCPClient.h>
       
    34 #include <apgcli.h>
    34 
    35 
    35 //  LOCAL CONSTANTS AND MACROS
    36 //  LOCAL CONSTANTS AND MACROS
    36 	/*****************************************************
    37 	/*****************************************************
    37 	*	Series 60 Customer / TSY
    38 	*	Series 60 Customer / TSY
    38 	*	Needs customer TSY implementation
    39 	*	Needs customer TSY implementation
   222 // Initialize parameters and jump to RunL
   223 // Initialize parameters and jump to RunL
   223 // ----------------------------------------------------------
   224 // ----------------------------------------------------------
   224 //
   225 //
   225 void CSecurityNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReturnVal, const RMessagePtr2& aMessage)
   226 void CSecurityNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReturnVal, const RMessagePtr2& aMessage)
   226     {
   227     {
       
   228 	#if defined(_DEBUG)
       
   229 	RDebug::Printf( "%s %s (%u) searching for autolock.exe =%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x0 );
       
   230 	#endif
       
   231 	TApaTaskList taskList( CCoeEnv::Static()->WsSession() );
       
   232 	const TUid KAutolockUid = { 0x100059B5 };
       
   233 	TApaTask task( taskList.FindApp( KAutolockUid ) );
       
   234 	if ( !task.Exists() )
       
   235 		{
       
   236 		#if defined(_DEBUG)
       
   237 		RDebug::Printf( "%s %s (%u) autolock.exe not running. Starting now=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x1 );
       
   238 		#endif
       
   239 		RApaLsSession ls;                   
       
   240 		User::LeaveIfError(ls.Connect());   
       
   241 		CleanupClosePushL(ls);         
       
   242 		
       
   243 		CApaCommandLine* commandLine = CApaCommandLine::NewLC();
       
   244 		commandLine->SetExecutableNameL( _L("autolock.exe" ) );     
       
   245 		commandLine->SetCommandL( EApaCommandRun );
       
   246 		
       
   247 		// Try to launch the application.        
       
   248 		User::LeaveIfError(ls.StartApp(*commandLine));
       
   249 		#if defined(_DEBUG)
       
   250 		RDebug::Printf( "%s %s (%u) autolock.exe created=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x2 );
       
   251 		#endif
       
   252 		
       
   253 		CleanupStack::PopAndDestroy(2); // commandLine, ls
       
   254 		}
       
   255 
   227 	/*****************************************************
   256 	/*****************************************************
   228 	*	Series 60 Customer / ETel
   257 	*	Series 60 Customer / ETel
   229 	*	Series 60  ETel API
   258 	*	Series 60  ETel API
   230 	*****************************************************/
   259 	*****************************************************/
   231     iMessage = aMessage;
   260     iMessage = aMessage;