telephonyserverplugins/ctsydispatchlayer/src/csecuritydispatcher.cpp
changeset 0 3553901f7fa8
child 19 630d2f34d719
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include <ctsy/rmmcustomapi.h>
       
    17 #include "csecuritydispatcher.h"
       
    18 
       
    19 #include <ctsy/ltsy/mltsydispatchsecurityinterface.h>
       
    20 #include <ctsy/pluginapi/mmmessagemanagercallback.h>
       
    21 #include <ctsy/serviceapi/mmtsy_ipcdefs.h>
       
    22 #include <ctsy/serviceapi/cmmutility.h>
       
    23 
       
    24 #include <ctsy/ltsy/ltsylogger.h>
       
    25 #include "ctsydispatcherpanic.h"
       
    26 #include "tdispatcherholder.h"
       
    27 
       
    28 CSecurityDispatcher::CSecurityDispatcher(
       
    29 		MLtsyDispatchFactoryV1& aLtsyFactory,
       
    30 		MmMessageManagerCallback& aMessageManagerCallback,
       
    31 		CRequestQueueOneShot& aRequestAsyncOneShot)
       
    32 	: 	iLtsyFactoryV1(aLtsyFactory),
       
    33 		iMessageManagerCallback(aMessageManagerCallback),
       
    34 		iRequestAsyncOneShot(aRequestAsyncOneShot)
       
    35 	{
       
    36 	} // CSecurityDispatcher::CSecurityDispatcher
       
    37 
       
    38 	  
       
    39 CSecurityDispatcher::~CSecurityDispatcher()
       
    40 	{
       
    41 	} // CSecurityDispatcher::~CSecurityDispatcher
       
    42 
       
    43 
       
    44 CSecurityDispatcher* CSecurityDispatcher::NewLC(
       
    45 	MLtsyDispatchFactoryV1& aLtsyFactory,
       
    46 	MmMessageManagerCallback& aMessageManagerCallback,
       
    47 	CRequestQueueOneShot& aRequestAsyncOneShot)
       
    48 	{
       
    49 	TSYLOGENTRYEXIT;
       
    50 	CSecurityDispatcher* self =
       
    51 		new (ELeave) CSecurityDispatcher(aLtsyFactory, aMessageManagerCallback, aRequestAsyncOneShot);
       
    52 	CleanupStack::PushL(self);
       
    53 	self->ConstructL();
       
    54 	return self;
       
    55 	} // CSecurityDispatcher::NewLC
       
    56 
       
    57 
       
    58 CSecurityDispatcher* CSecurityDispatcher::NewL(
       
    59 	MLtsyDispatchFactoryV1& aLtsyFactory,
       
    60 	MmMessageManagerCallback& aMessageManagerCallback,
       
    61 	CRequestQueueOneShot& aRequestAsyncOneShot)
       
    62 	{
       
    63 	TSYLOGENTRYEXIT;
       
    64 	CSecurityDispatcher* self =
       
    65 		CSecurityDispatcher::NewLC(aLtsyFactory, aMessageManagerCallback, aRequestAsyncOneShot);
       
    66 	CleanupStack::Pop (self);
       
    67 	return self;
       
    68 	} // CSecurityDispatcher::NewL
       
    69 
       
    70 
       
    71 void CSecurityDispatcher::ConstructL()
       
    72 /**
       
    73  * Second phase constructor.
       
    74  */
       
    75 	{
       
    76 	TSYLOGENTRYEXIT;
       
    77 	
       
    78 	// Get the Licensee LTSY interfaces related to Security functionality
       
    79 	// from the factory
       
    80 	
       
    81 	
       
    82 	if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchSecurityFuncUnitId, MLtsyDispatchSecurityGetSecurityCodeInfo::KLtsyDispatchSecurityGetSecurityCodeInfoApiId))
       
    83 		{
       
    84 		TAny* getSecurityCodeInfoInterface = NULL;
       
    85 		iLtsyFactoryV1.GetDispatchHandler(
       
    86 		       	MLtsyDispatchSecurityGetSecurityCodeInfo::KLtsyDispatchSecurityGetSecurityCodeInfoApiId,
       
    87 		       	getSecurityCodeInfoInterface);
       
    88 		iLtsyDispatchSecurityGetSecurityCodeInfo =
       
    89 				static_cast<MLtsyDispatchSecurityGetSecurityCodeInfo*>(getSecurityCodeInfoInterface);
       
    90         __ASSERT_DEBUG(iLtsyDispatchSecurityGetSecurityCodeInfo, CtsyDispatcherPanic(EInvalidNullPtr));
       
    91   		}
       
    92 	
       
    93 	if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchSecurityFuncUnitId, MLtsyDispatchSecurityGetLockInfo::KLtsyDispatchSecurityGetLockInfoApiId))
       
    94 		{
       
    95 		TAny* getLockInfoInterface = NULL;
       
    96 		iLtsyFactoryV1.GetDispatchHandler(
       
    97 		       	MLtsyDispatchSecurityGetLockInfo::KLtsyDispatchSecurityGetLockInfoApiId,
       
    98 		       	getLockInfoInterface);
       
    99 		iLtsyDispatchSecurityGetLockInfo =
       
   100 				static_cast<MLtsyDispatchSecurityGetLockInfo*>(getLockInfoInterface);
       
   101         __ASSERT_DEBUG(iLtsyDispatchSecurityGetLockInfo, CtsyDispatcherPanic(EInvalidNullPtr));
       
   102   		}
       
   103 	
       
   104 	if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchSecurityFuncUnitId, MLtsyDispatchSecurityAbortSecurityCode::KLtsyDispatchSecurityAbortSecurityCodeApiId))
       
   105 		{
       
   106 		TAny* abortSecurityCodeInterface = NULL;
       
   107 		iLtsyFactoryV1.GetDispatchHandler(
       
   108 		       	MLtsyDispatchSecurityAbortSecurityCode::KLtsyDispatchSecurityAbortSecurityCodeApiId,
       
   109 		       	abortSecurityCodeInterface);
       
   110 		iLtsyDispatchSecurityAbortSecurityCode =
       
   111 				static_cast<MLtsyDispatchSecurityAbortSecurityCode*>(abortSecurityCodeInterface);
       
   112         __ASSERT_DEBUG(iLtsyDispatchSecurityAbortSecurityCode, CtsyDispatcherPanic(EInvalidNullPtr));
       
   113   		}
       
   114 	
       
   115 	if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchSecurityFuncUnitId, MLtsyDispatchSecurityGetCurrentActivePin::KLtsyDispatchSecurityGetCurrentActivePinApiId))
       
   116 		{
       
   117 		TAny* getCurrentActivePinInterface = NULL;
       
   118 		iLtsyFactoryV1.GetDispatchHandler(
       
   119 		       	MLtsyDispatchSecurityGetCurrentActivePin::KLtsyDispatchSecurityGetCurrentActivePinApiId,
       
   120 		       	getCurrentActivePinInterface);
       
   121 		iLtsyDispatchSecurityGetCurrentActivePin =
       
   122 				static_cast<MLtsyDispatchSecurityGetCurrentActivePin*>(getCurrentActivePinInterface);
       
   123         __ASSERT_DEBUG(iLtsyDispatchSecurityGetCurrentActivePin, CtsyDispatcherPanic(EInvalidNullPtr));
       
   124   		}
       
   125 	
       
   126 	if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchSecurityFuncUnitId, MLtsyDispatchSecuritySetLockSetting::KLtsyDispatchSecuritySetLockSettingApiId))
       
   127 		{
       
   128 		TAny* setLockSettingInterface = NULL;
       
   129 		iLtsyFactoryV1.GetDispatchHandler(
       
   130 		       	MLtsyDispatchSecuritySetLockSetting::KLtsyDispatchSecuritySetLockSettingApiId,
       
   131 		       	setLockSettingInterface);
       
   132 		iLtsyDispatchSecuritySetLockSetting =
       
   133 				static_cast<MLtsyDispatchSecuritySetLockSetting*>(setLockSettingInterface);
       
   134         __ASSERT_DEBUG(iLtsyDispatchSecuritySetLockSetting, CtsyDispatcherPanic(EInvalidNullPtr));
       
   135   		}
       
   136 	
       
   137 	if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchSecurityFuncUnitId, MLtsyDispatchSecurityVerifySecurityCode::KLtsyDispatchSecurityVerifySecurityCodeApiId))
       
   138 		{
       
   139 		TAny* verifySecurityCodeInterface = NULL;
       
   140 		iLtsyFactoryV1.GetDispatchHandler(
       
   141 		       	MLtsyDispatchSecurityVerifySecurityCode::KLtsyDispatchSecurityVerifySecurityCodeApiId,
       
   142 		       	verifySecurityCodeInterface);
       
   143 		iLtsyDispatchSecurityVerifySecurityCode =
       
   144 				static_cast<MLtsyDispatchSecurityVerifySecurityCode*>(verifySecurityCodeInterface);
       
   145         __ASSERT_DEBUG(iLtsyDispatchSecurityVerifySecurityCode, CtsyDispatcherPanic(EInvalidNullPtr));
       
   146   		}
       
   147 	
       
   148 	if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchSecurityFuncUnitId, MLtsyDispatchSecurityGetPin1DisableSupported::KLtsyDispatchSecurityGetPin1DisableSupportedApiId))
       
   149 		{
       
   150 		TAny* getPin1DisableSupportedInterface = NULL;
       
   151 		iLtsyFactoryV1.GetDispatchHandler(
       
   152 		       	MLtsyDispatchSecurityGetPin1DisableSupported::KLtsyDispatchSecurityGetPin1DisableSupportedApiId,
       
   153 		       	getPin1DisableSupportedInterface);
       
   154 		iLtsyDispatchSecurityGetPin1DisableSupported =
       
   155 			static_cast<MLtsyDispatchSecurityGetPin1DisableSupported*>(getPin1DisableSupportedInterface);
       
   156   		__ASSERT_DEBUG(iLtsyDispatchSecurityGetPin1DisableSupported, CtsyDispatcherPanic(EInvalidNullPtr));
       
   157   		}
       
   158   		
       
   159 	if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchSecurityFuncUnitId, MLtsyDispatchSecurityCheckSecurityCode::KLtsyDispatchSecurityCheckSecurityCodeApiId))
       
   160 		{
       
   161 		TAny* checkSecurityCodeInterface = NULL;
       
   162 		iLtsyFactoryV1.GetDispatchHandler(
       
   163 				MLtsyDispatchSecurityCheckSecurityCode::KLtsyDispatchSecurityCheckSecurityCodeApiId,
       
   164 		       	checkSecurityCodeInterface);
       
   165 		iLtsyDispatchSecurityCheckSecurityCode =
       
   166 				static_cast<MLtsyDispatchSecurityCheckSecurityCode*>(checkSecurityCodeInterface);
       
   167         __ASSERT_DEBUG(iLtsyDispatchSecurityCheckSecurityCode, CtsyDispatcherPanic(EInvalidNullPtr));
       
   168   		}
       
   169 	
       
   170 	if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchSecurityFuncUnitId, MLtsyDispatchSecurityDisablePhoneLock::KLtsyDispatchSecurityDisablePhoneLockApiId))
       
   171 		{
       
   172 		TAny* disablePhoneLockInterface = NULL;
       
   173 		iLtsyFactoryV1.GetDispatchHandler(
       
   174 				MLtsyDispatchSecurityDisablePhoneLock::KLtsyDispatchSecurityDisablePhoneLockApiId,
       
   175 		       	disablePhoneLockInterface);
       
   176 		iLtsyDispatchSecurityDisablePhoneLock =
       
   177 				static_cast<MLtsyDispatchSecurityDisablePhoneLock*>(disablePhoneLockInterface);
       
   178         __ASSERT_DEBUG(iLtsyDispatchSecurityDisablePhoneLock, CtsyDispatcherPanic(EInvalidNullPtr));
       
   179   		}
       
   180 	
       
   181 	if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchSecurityFuncUnitId, MLtsyDispatchSecurityGetCipheringInfo::KLtsyDispatchSecurityGetCipheringInfoApiId))
       
   182 		{
       
   183 		TAny* getCipheringInfoInterface = NULL;
       
   184 		iLtsyFactoryV1.GetDispatchHandler(
       
   185 				MLtsyDispatchSecurityGetCipheringInfo::KLtsyDispatchSecurityGetCipheringInfoApiId,
       
   186 		       	getCipheringInfoInterface);
       
   187 		iLtsyDispatchSecurityGetCipheringInfo =
       
   188 				static_cast<MLtsyDispatchSecurityGetCipheringInfo*>(getCipheringInfoInterface);
       
   189         __ASSERT_DEBUG(iLtsyDispatchSecurityGetCipheringInfo, CtsyDispatcherPanic(EInvalidNullPtr));
       
   190   		}
       
   191 	
       
   192 	if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchSecurityFuncUnitId, MLtsyDispatchSecurityIsSecurityCodeBlocked::KLtsyDispatchSecurityIsSecurityCodeBlockedApiId))
       
   193 		{
       
   194 		TAny* isSecurityCodeBlockedInterface = NULL;
       
   195 		iLtsyFactoryV1.GetDispatchHandler(
       
   196 				MLtsyDispatchSecurityIsSecurityCodeBlocked::KLtsyDispatchSecurityIsSecurityCodeBlockedApiId,
       
   197 		       	isSecurityCodeBlockedInterface);
       
   198 		iLtsyDispatchSecurityIsSecurityCodeBlocked =
       
   199 				static_cast<MLtsyDispatchSecurityIsSecurityCodeBlocked*>(isSecurityCodeBlockedInterface);
       
   200         __ASSERT_DEBUG(iLtsyDispatchSecurityIsSecurityCodeBlocked, CtsyDispatcherPanic(EInvalidNullPtr));
       
   201   		}
       
   202 	
       
   203 	if(iLtsyFactoryV1.IsDispatchInterfaceSupported(KDispatchSecurityFuncUnitId, MLtsyDispatchSecurityCheckSecurityCodeCancel::KLtsyDispatchSecurityCheckSecurityCodeCancelApiId))
       
   204 		{
       
   205 		TAny* checkSecurityCodeCancelInterface = NULL;
       
   206 		iLtsyFactoryV1.GetDispatchHandler(
       
   207 				MLtsyDispatchSecurityCheckSecurityCodeCancel::KLtsyDispatchSecurityCheckSecurityCodeCancelApiId,
       
   208 		       	checkSecurityCodeCancelInterface);
       
   209 		iLtsyDispatchSecurityCheckSecurityCodeCancel =
       
   210 				static_cast<MLtsyDispatchSecurityCheckSecurityCodeCancel*>(checkSecurityCodeCancelInterface);
       
   211         __ASSERT_DEBUG(iLtsyDispatchSecurityCheckSecurityCodeCancel, CtsyDispatcherPanic(EInvalidNullPtr));
       
   212   		}
       
   213 	  		
       
   214 	} // CSecurityDispatcher::ConstructL
       
   215 
       
   216 void CSecurityDispatcher::SetDispatcherHolder(TDispatcherHolder& aDispatcherHolder)
       
   217 /**
       
   218  * Set the dispatcher holder.  
       
   219  * 
       
   220  * @param aDispatcherHolder Reference to dispatcher holder.
       
   221  */
       
   222 	{
       
   223 	TSYLOGENTRYEXIT;
       
   224 	
       
   225 	iDispatcherHolder = &aDispatcherHolder;
       
   226 	} // CSecurityDispatcher::SetDispatcherHolder
       
   227 
       
   228 TInt CSecurityDispatcher::DispatchGetSecurityCodeInfoL(const CMmDataPackage* aDataPackage)
       
   229 /**
       
   230  * Unpack data related to EMobilePhoneGetSecurityCodeInfo
       
   231  * and pass request on to Licensee LTSY.
       
   232  *
       
   233  * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if
       
   234  * the Licensee LTSY does not support this request.
       
   235  */
       
   236 	{
       
   237 	TSYLOGENTRYEXIT;
       
   238 	TInt ret = KErrNotSupported;
       
   239    
       
   240     __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr));
       
   241 
       
   242 	// Call Handle... method in Licensee LTSY
       
   243 	if (iLtsyDispatchSecurityGetSecurityCodeInfo)
       
   244 		{
       
   245 		RMobilePhone::TMobilePhoneSecurityCode secCode;
       
   246 		aDataPackage->UnPackData(secCode);
       
   247 		ret = iLtsyDispatchSecurityGetSecurityCodeInfo->HandleGetSecurityCodeInfoReqL(secCode);				
       
   248 		}		
       
   249 
       
   250 	return TSYLOGSETEXITERR(ret);
       
   251 	} // CSecurityDispatcher::DispatchGetSecurityCodeInfoL
       
   252 
       
   253 TInt CSecurityDispatcher::DispatchGetLockInfoL(const CMmDataPackage* aDataPackage)
       
   254 /**
       
   255  * Unpack data related to EMobilePhoneGetLockInfo
       
   256  * and pass request on to Licensee LTSY.
       
   257  *
       
   258  * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if
       
   259  * the Licensee LTSY does not support this request.
       
   260  */
       
   261 	{
       
   262 	TSYLOGENTRYEXIT;
       
   263 	TInt ret = KErrNotSupported;
       
   264 
       
   265     __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr));
       
   266 
       
   267 	// Call Handle... method in Licensee LTSY
       
   268 	if (iLtsyDispatchSecurityGetLockInfo)
       
   269 		{
       
   270 		RMobilePhone::TMobilePhoneLock lockType;
       
   271 		aDataPackage->UnPackData(lockType);
       
   272 		ret = iLtsyDispatchSecurityGetLockInfo->HandleGetLockInfoReqL(lockType);				
       
   273 		}
       
   274 			
       
   275 	return TSYLOGSETEXITERR(ret);
       
   276 	} // CSecurityDispatcher::DispatchGetLockInfoL
       
   277 
       
   278 TInt CSecurityDispatcher::DispatchAbortSecurityCodeL(const CMmDataPackage* aDataPackage)
       
   279 /**
       
   280  * Unpack data related to EMobilePhoneAbortSecurityCode
       
   281  * and pass request on to Licensee LTSY.
       
   282  *
       
   283  * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if
       
   284  * the Licensee LTSY does not support this request.
       
   285  */
       
   286 	{
       
   287 	TSYLOGENTRYEXIT;
       
   288 	TInt ret = KErrNotSupported;
       
   289 
       
   290    __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr));
       
   291 
       
   292 	// Call Handle... method in Licensee LTSY
       
   293 	if (iLtsyDispatchSecurityAbortSecurityCode)
       
   294 		{
       
   295 		RMobilePhone::TMobilePhoneSecurityCode secCode;
       
   296 		aDataPackage->UnPackData(secCode);
       
   297 		ret = iLtsyDispatchSecurityAbortSecurityCode->HandleAbortSecurityCodeReqL(secCode);				
       
   298 		}
       
   299 
       
   300 	return TSYLOGSETEXITERR(ret);
       
   301 	} // CSecurityDispatcher::DispatchAbortSecurityCodeL
       
   302 
       
   303 TInt CSecurityDispatcher::DispatchGetCurrentActivePinL()
       
   304 /**
       
   305  * Pass request on to Licensee LTSY.
       
   306  *
       
   307  * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if
       
   308  * the Licensee LTSY does not support this request.
       
   309  */
       
   310 	{
       
   311 	TSYLOGENTRYEXIT;
       
   312 	TInt ret = KErrNotSupported;
       
   313 
       
   314 	// Call Handle... method in Licensee LTSY
       
   315 	
       
   316 	if (iLtsyDispatchSecurityGetCurrentActivePin)
       
   317 		{
       
   318 		ret = iLtsyDispatchSecurityGetCurrentActivePin->HandleGetCurrentActivePinReqL();
       
   319 		}
       
   320 	 	 
       
   321 	return TSYLOGSETEXITERR(ret);
       
   322 	} // CSecurityDispatcher::DispatchGetCurrentActivePinL
       
   323 
       
   324 TInt CSecurityDispatcher::DispatchSetLockSettingL(const CMmDataPackage* aDataPackage)
       
   325 /**
       
   326  * Unpack data related to EMobilePhoneSetLockSetting
       
   327  * and pass request on to Licensee LTSY.
       
   328  *
       
   329  * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if
       
   330  * the Licensee LTSY does not support this request.
       
   331  */
       
   332 	{
       
   333 	TSYLOGENTRYEXIT;
       
   334 	TInt ret = KErrNotSupported;
       
   335 
       
   336     __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr));
       
   337 
       
   338 	// Call Handle... method in Licensee LTSY
       
   339 	if (iLtsyDispatchSecuritySetLockSetting)
       
   340 		{
       
   341 		TLockAndSetting* lockAndSetting = NULL;
       
   342 		RMobilePhone::TMobilePassword* mobilePassword = NULL;
       
   343 		aDataPackage->UnPackData(&lockAndSetting,&mobilePassword);
       
   344 		
       
   345 		//these should never be NULL
       
   346 		__ASSERT_DEBUG(lockAndSetting, CtsyDispatcherPanic(EInvalidNullPtr));
       
   347 		__ASSERT_DEBUG(lockAndSetting->iLock, CtsyDispatcherPanic(EInvalidNullPtr));
       
   348 		__ASSERT_DEBUG(lockAndSetting->iSetting, CtsyDispatcherPanic(EInvalidNullPtr));
       
   349 		
       
   350 		//mobile password maybe null, as the CTSY has not packed one, if so pass 
       
   351 		//down a reference to a null descriptor
       
   352 		//ternary operator used so that KNullDesC does not have to have its const cast away
       
   353 		const TDesC* mobilePasswordPtr = mobilePassword ? mobilePassword : &KNullDesC;
       
   354 
       
   355 		ret = iLtsyDispatchSecuritySetLockSetting->HandleSetLockSettingReqL(*(lockAndSetting->iLock),*(lockAndSetting->iSetting),*mobilePasswordPtr);				
       
   356 		}		
       
   357 
       
   358 	return TSYLOGSETEXITERR(ret);
       
   359 	} // CSecurityDispatcher::DispatchSetLockSettingL
       
   360 
       
   361 TInt CSecurityDispatcher::DispatchVerifySecurityCodeL(const CMmDataPackage* aDataPackage)
       
   362 /**
       
   363  * Unpack data related to EMobilePhoneVerifySecurityCode
       
   364  * and pass request on to Licensee LTSY.
       
   365  *
       
   366  * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if
       
   367  * the Licensee LTSY does not support this request.
       
   368  */
       
   369 	{
       
   370 	TSYLOGENTRYEXIT;
       
   371 	TInt ret = KErrNotSupported;
       
   372 
       
   373     __ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr));
       
   374 
       
   375 	// Call Handle... method in Licensee LTSY
       
   376 	if (iLtsyDispatchSecurityVerifySecurityCode)
       
   377 		{
       
   378 		//sec code also has to be unpacked as a pointer due to CMmDataPackage's
       
   379 		RMobilePhone::TMobilePhoneSecurityCode* secCode = NULL;
       
   380 		RMobilePhone::TCodeAndUnblockCode* codes = NULL;
       
   381 		aDataPackage->UnPackData(&secCode, &codes);
       
   382 			
       
   383 		//should never be NULL
       
   384 		__ASSERT_DEBUG(codes, CtsyDispatcherPanic(EInvalidNullPtr));
       
   385 		__ASSERT_DEBUG(secCode, CtsyDispatcherPanic(EInvalidNullPtr));
       
   386 			
       
   387 		ret = iLtsyDispatchSecurityVerifySecurityCode->HandleVerifySecurityCodeReqL(*secCode, *codes);
       
   388 		}
       
   389 
       
   390 	return TSYLOGSETEXITERR(ret);
       
   391 	} // CSecurityDispatcher::DispatchVerifySecurityCodeL
       
   392 
       
   393 TInt CSecurityDispatcher::DispatchGetPin1DisableSupportedL()
       
   394 /**
       
   395  * Pass request on to Licensee LTSY.
       
   396  * 
       
   397  * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if
       
   398  * the Licensee LTSY does not support this request.
       
   399  */
       
   400 	{
       
   401 	TSYLOGENTRYEXIT;
       
   402 	TInt ret = KErrNotSupported;
       
   403 
       
   404 	// Call Handle... method in Licensee LTSY
       
   405 	if (iLtsyDispatchSecurityGetPin1DisableSupported)
       
   406 		{
       
   407 		ret = iLtsyDispatchSecurityGetPin1DisableSupported->HandleGetPin1DisableSupportedReqL();
       
   408 		}
       
   409 			
       
   410 	return TSYLOGSETEXITERR(ret);	
       
   411 	} // CPhoneDispatcher::DispatchGetPin1DisableSupportedL
       
   412 	
       
   413 TInt CSecurityDispatcher::DispatchCheckSecurityCodeL(const CMmDataPackage* aDataPackage)
       
   414 /**
       
   415  * Unpack data related to ECustomCheckSecurityCodeIPC
       
   416  * and pass request on to Licensee LTSY.
       
   417  *
       
   418  * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if
       
   419  * the Licensee LTSY does not support this request.
       
   420  */
       
   421 	{
       
   422 	TSYLOGENTRYEXIT;
       
   423 	TInt ret = KErrNotSupported;
       
   424 	
       
   425 	__ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr));	
       
   426 
       
   427 	// Call Handle... method in Licensee LTSY
       
   428 	if (iLtsyDispatchSecurityCheckSecurityCode)
       
   429 		{
       
   430 		TUint8* codeID = NULL;
       
   431 		RMobilePhone::TMobilePassword* secCode = NULL;
       
   432 		aDataPackage->UnPackData(&codeID, &secCode);
       
   433 			
       
   434 		__ASSERT_DEBUG(codeID, CtsyDispatcherPanic(EInvalidNullPtr));	
       
   435 		__ASSERT_DEBUG(secCode, CtsyDispatcherPanic(EInvalidNullPtr));	
       
   436 			
       
   437 		DispatcherSecurity::TSecurityCodeId secCodeId = static_cast<DispatcherSecurity::TSecurityCodeId> (*codeID);
       
   438 		ret = iLtsyDispatchSecurityCheckSecurityCode->HandleCheckSecurityCodeReqL(secCodeId, *secCode);
       
   439 		}	
       
   440 
       
   441 	return TSYLOGSETEXITERR(ret);
       
   442 	} // CSecurityDispatcher::DispatchCheckSecurityCodeL
       
   443 
       
   444 TInt CSecurityDispatcher::DispatchDisablePhoneLockL(const CMmDataPackage* aDataPackage)
       
   445 /**
       
   446  * Unpack data related to ECustomDisablePhoneLockIPC
       
   447  * and pass request on to Licensee LTSY.
       
   448  *
       
   449  * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if
       
   450  * the Licensee LTSY does not support this request.
       
   451  */
       
   452 	{
       
   453 	TSYLOGENTRYEXIT;
       
   454 	TInt ret = KErrNotSupported;
       
   455 	
       
   456 	__ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr));		
       
   457 
       
   458 	// Can Handle... method in Licensee LTSY
       
   459 	if (iLtsyDispatchSecurityDisablePhoneLock)
       
   460 		{		
       
   461 		RMobilePhone::TMobilePassword* secCode = NULL;
       
   462 		aDataPackage->UnPackData(&secCode);
       
   463 		__ASSERT_DEBUG(secCode, CtsyDispatcherPanic(EInvalidNullPtr));
       
   464 			
       
   465 		ret = iLtsyDispatchSecurityDisablePhoneLock->HandleDisablePhoneLockReqL(*secCode);			
       
   466 		}
       
   467 
       
   468 	return TSYLOGSETEXITERR(ret);
       
   469 	} // CSecurityDispatcher::DispatchDisablePhoneLockL
       
   470 
       
   471 TInt CSecurityDispatcher::DispatchGetCipheringInfoL()
       
   472 /**
       
   473  * Pass request on to Licensee LTSY.
       
   474  *
       
   475  * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if
       
   476  * the Licensee LTSY does not support this request.
       
   477  */
       
   478 	{
       
   479 	TSYLOGENTRYEXIT;
       
   480 	TInt ret = KErrNotSupported;
       
   481 
       
   482 	// Can Handle... method in Licensee LTSY
       
   483 	if (iLtsyDispatchSecurityGetCipheringInfo)
       
   484 		{
       
   485 		ret = iLtsyDispatchSecurityGetCipheringInfo->HandleGetCipheringInfoReqL();
       
   486 		}
       
   487 
       
   488 	return TSYLOGSETEXITERR(ret);
       
   489 	} // CSecurityDispatcher::DispatchGetCipheringInfoL
       
   490 
       
   491 TInt CSecurityDispatcher::DispatchIsSecurityCodeBlockedL(const CMmDataPackage* aDataPackage)
       
   492 /**
       
   493  * Unpack data related to ECustomIsBlockedIPC
       
   494  * and pass request on to Licensee LTSY.
       
   495  *
       
   496  * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if
       
   497  * the Licensee LTSY does not support this request.
       
   498  */
       
   499 	{
       
   500 	TSYLOGENTRYEXIT;
       
   501 	TInt ret = KErrNotSupported;
       
   502 	
       
   503 	__ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr));			
       
   504 
       
   505 	// Can Handle... method in Licensee LTSY
       
   506 	if (iLtsyDispatchSecurityIsSecurityCodeBlocked)
       
   507 		{
       
   508 		TUint8 codeID;
       
   509 		aDataPackage->UnPackData(codeID);
       
   510 		DispatcherSecurity::TSecurityCodeId secCodeId = static_cast<DispatcherSecurity::TSecurityCodeId> (codeID);
       
   511 		ret = iLtsyDispatchSecurityIsSecurityCodeBlocked->HandleIsSecurityCodeBlockedReqL(secCodeId);			
       
   512 		}
       
   513 		
       
   514 	return TSYLOGSETEXITERR(ret);
       
   515 	} // CSecurityDispatcher::DispatchIsSecurityCodeBlockedL
       
   516 
       
   517 TInt CSecurityDispatcher::DispatchCheckSecurityCodeCancelL(const CMmDataPackage* aDataPackage)
       
   518 /**
       
   519  * Unpack data related to ECustomCheckSecurityCodeCancelIPC
       
   520  * and pass request on to Licensee LTSY.
       
   521  *
       
   522  * @return Returns error code returned by the Licensee LTSY or KErrNotSupported if
       
   523  * the Licensee LTSY does not support this request.
       
   524  */
       
   525 	{
       
   526 	TSYLOGENTRYEXIT;
       
   527 	TInt ret = KErrNotSupported;
       
   528 	
       
   529 	__ASSERT_DEBUG(aDataPackage, CtsyDispatcherPanic(EInvalidNullPtr));		
       
   530 
       
   531 	// Can Handle... method in Licensee LTSY
       
   532 	if (iLtsyDispatchSecurityCheckSecurityCodeCancel)
       
   533 		{
       
   534 		TUint8 codeID;
       
   535 		TBool flag; // it will not be sent to the LTSY
       
   536 		aDataPackage->UnPackData(codeID, flag);
       
   537 		DispatcherSecurity::TSecurityCodeId secCodeId = static_cast<DispatcherSecurity::TSecurityCodeId> (codeID);
       
   538 		ret = iLtsyDispatchSecurityCheckSecurityCodeCancel->HandleCheckSecurityCodeCancelReqL(secCodeId);			
       
   539 		}
       
   540 	
       
   541 	return TSYLOGSETEXITERR(ret);
       
   542 	} // CSecurityDispatcher::DispatchCheckSecurityCodeCancelL
       
   543 
       
   544 
       
   545 //
       
   546 // Callback handlers follow
       
   547 //
       
   548 
       
   549 
       
   550 
       
   551 void CSecurityDispatcher::CallbackBootNotifySecurityReady(TInt aError)
       
   552 /**
       
   553  * Callback function to be used by the request to complete
       
   554  * CCtsyDispatcherCallback::CallbackSecurityBootNotifySecurityReadyInd()
       
   555  *
       
   556  * @param aError The error code to be returned to the CTSY Dispatcher.
       
   557  */
       
   558 	{
       
   559 	TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError);
       
   560 	
       
   561 	iMessageManagerCallback.Complete(EMmTsyBootNotifySecurityReadyIPC, aError);
       
   562 	
       
   563 	} // CSecurityDispatcher::CallbackBootNotifySecurityReady
       
   564 
       
   565 void CSecurityDispatcher::CallbackNotifySecurityEvent(TInt aError, RMobilePhone::TMobilePhoneSecurityEvent aSecEvent)
       
   566 /**
       
   567  * Callback function to be used by the request to complete
       
   568  * CCtsyDispatcherCallback::CallbackSecurityNotifySecurityEventInd()
       
   569  *
       
   570  * @param aError The error code to be returned to the CTSY Dispatcher.
       
   571  * @param aSecEvent Security event.
       
   572  */
       
   573 	{
       
   574 	TSYLOGENTRYEXITARGS(_L8("aError=%d, aSecEvent=%d"), aError, aSecEvent);
       
   575 
       
   576 	CMmDataPackage dataPackage;		
       
   577 	dataPackage.PackData(&aSecEvent);			             
       
   578 	
       
   579 	iMessageManagerCallback.Complete(EMobilePhoneNotifySecurityEvent, &dataPackage, aError);
       
   580 	
       
   581 	} // CSecurityDispatcher::CallbackNotifySecurityEvent
       
   582 
       
   583 void CSecurityDispatcher::CallbackNotifyLockInfoChange(TInt aError,
       
   584 				RMobilePhone::TMobilePhoneLockStatus aStatus, RMobilePhone::TMobilePhoneLockSetting aSetting, RMobilePhone::TMobilePhoneLock aLock)
       
   585 /**
       
   586  * Callback function to be used by the request to complete
       
   587  * CCtsyDispatcherCallback::CallbackSecurityNotifyLockInfoChangeInd()
       
   588  *
       
   589  * @param aError The error code to be returned to the CTSY Dispatcher.
       
   590  * @param aStatus Status of the lock (unknown, locked, unlocked or blocked).
       
   591  * @param aSetting Lock setting (unknown, enabled, disabled or replaced).
       
   592  * @param aLock Lock information.
       
   593  */
       
   594 	{
       
   595 	TSYLOGENTRYEXITARGS(_L8("aError=%d, aStatus=%d, aSetting=%d, aLock=%d"), 
       
   596 			                 aError, aStatus, aSetting, aLock);
       
   597 
       
   598     RMobilePhone::TMobilePhoneLockInfoV1 lockInfo;
       
   599     lockInfo.iStatus = aStatus;
       
   600     lockInfo.iSetting = aSetting;
       
   601 	CMmDataPackage dataPackage;		
       
   602 	dataPackage.PackData(&lockInfo, &aLock);			             
       
   603 	
       
   604 	iMessageManagerCallback.Complete(EMobilePhoneNotifyLockInfoChange, &dataPackage, aError);
       
   605 	
       
   606 	} // CSecurityDispatcher::CallbackNotifyLockInfoChange
       
   607 
       
   608 void CSecurityDispatcher::CallbackGetSecurityCodeInfo(TInt aError,
       
   609 				RMobilePhone::TMobilePhoneSecurityCode aSecCode, TInt aRemainingEntryAttempts)
       
   610 /**
       
   611  * Callback function to be used by the request to complete
       
   612  * CCtsyDispatcherCallback::CallbackSecurityGetSecurityCodeInfoComp()
       
   613  *
       
   614  * @param aError The error code to be returned to the CTSY Dispatcher.
       
   615  * @param aSecCode Security code.
       
   616  * @param aRemainingEntryAttempts Number of remaining security code entry attempts before the corresponding lock gets blocked.
       
   617  */
       
   618 	{
       
   619 	TSYLOGENTRYEXITARGS(_L8("aError=%d, aSecCode=%d, aRemainingEntryAttempts=%d"), aError, aSecCode, aRemainingEntryAttempts);
       
   620 
       
   621 	RMobilePhone::TMobilePhoneSecurityCodeInfoV5 codeInfo;
       
   622     codeInfo.iRemainingEntryAttempts = aRemainingEntryAttempts;
       
   623 	CMmDataPackage dataPackage;		
       
   624 	dataPackage.PackData(&aSecCode, &codeInfo);			             
       
   625 	
       
   626 	iMessageManagerCallback.Complete(EMobilePhoneGetSecurityCodeInfo, &dataPackage, aError);
       
   627 	
       
   628 	} // CSecurityDispatcher::CallbackGetSecurityCodeInfo
       
   629 
       
   630 void CSecurityDispatcher::CallbackGetLockInfo(TInt aError,
       
   631 				RMobilePhone::TMobilePhoneLockStatus aLockStatus, RMobilePhone::TMobilePhoneLockSetting aLockSetting)
       
   632 /**
       
   633  * Callback function to be used by the request to complete
       
   634  * CCtsyDispatcherCallback::CallbackSecurityGetLockInfoComp()
       
   635  *
       
   636  * @param aError The error code to be returned to the CTSY Dispatcher.
       
   637  * @param aLockStatus Lock status (unknown, locked, unlocked or blocked).
       
   638  * @param aLockSetting Lock setting (unknown, enabled, disabled or replaced).
       
   639  */
       
   640 	{
       
   641 	TSYLOGENTRYEXITARGS(_L8("aError=%d, aLockStatus=%d, aLockSetting=%d"), aError, aLockStatus, aLockSetting);
       
   642 
       
   643 	CMmDataPackage dataPackage;
       
   644 	dataPackage.PackData(&aLockStatus, &aLockSetting);
       
   645 		
       
   646 	iMessageManagerCallback.Complete(EMobilePhoneGetLockInfo, &dataPackage,  aError);
       
   647 	
       
   648 	} // CSecurityDispatcher::CallbackGetLockInfo
       
   649 
       
   650 void CSecurityDispatcher::CallbackAbortSecurityCode(TInt aError)
       
   651 /**
       
   652  * Callback function to be used by the request to complete
       
   653  * CCtsyDispatcherCallback::CallbackSecurityAbortSecurityCodeComp()
       
   654  *
       
   655  * @param aError The error code to be returned to the CTSY Dispatcher.
       
   656  */
       
   657 	{
       
   658 	TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError);
       
   659 
       
   660 	iMessageManagerCallback.Complete(EMobilePhoneAbortSecurityCode, aError);
       
   661 	
       
   662 	} // CSecurityDispatcher::CallbackAbortSecurityCode
       
   663 
       
   664 void CSecurityDispatcher::CallbackGetCurrentActivePin(TInt aError, RMobilePhone::TMobilePhoneSecurityCode aSecCode)				
       
   665 /**
       
   666  * Callback function to be used by the request to complete
       
   667  * CCtsyDispatcherCallback::CallbackSecurityGetCurrentActivePinComp()
       
   668  *
       
   669  * @param aError The error code to be returned to the CTSY Dispatcher.
       
   670  * @param aSecCode Security code.
       
   671  */
       
   672 	{
       
   673 	TSYLOGENTRYEXITARGS(_L8("aError=%d, aSecCode=%d"), aError, aSecCode);
       
   674 	
       
   675 	CMmDataPackage dataPackage;
       
   676 	dataPackage.PackData(&aSecCode);	
       
   677 	
       
   678 	iMessageManagerCallback.Complete(EMmTsySecurityGetSimActivePinStateIPC, &dataPackage, aError);
       
   679 	
       
   680 	} // CSecurityDispatcher::CallbackGetCurrentActivePin
       
   681 
       
   682 void CSecurityDispatcher::CallbackSetLockSetting(TInt aError)
       
   683 /**
       
   684  * Callback function to be used by the request to complete
       
   685  * CCtsyDispatcherCallback::CallbackSecuritySetLockSettingComp()
       
   686  *
       
   687  * @param aError The error code to be returned to the CTSY Dispatcher.
       
   688  * @param aLockStatus Phone lock status.
       
   689  * @param aLockSetting The phone lock setting.
       
   690  */
       
   691 	{
       
   692 	TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError);
       
   693 
       
   694     // next 2 params are ignored by the CTSY:
       
   695     RMobilePhone::TMobilePhoneLockStatus lockStatus = RMobilePhone::EStatusLocked;
       
   696     RMobilePhone::TMobilePhoneLockSetting lockSetting = RMobilePhone::ELockSetEnabled;
       
   697 	CMmDataPackage dataPackage;
       
   698 	dataPackage.PackData(&lockStatus, &lockSetting);
       
   699 		
       
   700 	iMessageManagerCallback.Complete(EMobilePhoneSetLockSetting, &dataPackage,  aError);
       
   701 		
       
   702 	} // CSecurityDispatcher::CallbackSetLockSetting
       
   703 
       
   704 void CSecurityDispatcher::CallbackVerifySecurityCode(TInt aError)
       
   705 /**
       
   706  * Callback function to be used by the request to complete
       
   707  * CCtsyDispatcherCallback::CallbackSecurityVerifySecurityCodeComp().
       
   708  *
       
   709  * @param aError The error code to be returned to the CTSY Dispatcher.
       
   710  */
       
   711 	{
       
   712 	TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError);
       
   713 
       
   714 	iMessageManagerCallback.Complete(EMobilePhoneVerifySecurityCode, aError);
       
   715 	
       
   716 	} // CSecurityDispatcher::CallbackVerifySecurityCode
       
   717 	
       
   718 void CSecurityDispatcher::CallbackGetPin1DisableSupported(TInt aError, TBool aIsSupported)
       
   719 /**
       
   720  * Packages the data returned by the Licensee LTSY and completes the 
       
   721  * EMmTsyPhoneGetPin1DisableSupportedIPC back to the Common TSY.
       
   722  * 
       
   723  * @param aError The error code to complete back. 
       
   724  * @param aIsSupported Is SIM support disabling of PIN1.
       
   725  */
       
   726 	{
       
   727 	TSYLOGENTRYEXITARGS(_L8("aError=%d aIsSupported=%d"), aError, aIsSupported);
       
   728 
       
   729 	// Package up data to return to Common TSY
       
   730 	CMmDataPackage dataPackage;
       
   731 	dataPackage.PackData(&aIsSupported);
       
   732 
       
   733 	// Now complete the actual get request
       
   734 	iMessageManagerCallback.Complete(EMmTsyPhoneGetPin1DisableSupportedIPC, &dataPackage, aError);		
       
   735 	} // CSecurityDispatcher::CallbackGetPin1DisableSupported
       
   736 	
       
   737 void CSecurityDispatcher::CallbackNotifyCipheringInfoChange(TInt aError, const RMmCustomAPI::TCipheringInfo& aInfo)				
       
   738 /**
       
   739  * Callback function to be used by the request to complete
       
   740  * CCtsyDispatcherCallback::CallbackSecurityNotifyCipheringInfoChangeInd().
       
   741  *
       
   742  * @param aError The error code to be returned to the CTSY Dispatcher.
       
   743  * @param aInfo Ciphering information data structure: ciphering indicator and ciphering status.
       
   744  */
       
   745 	{
       
   746 	TSYLOGENTRYEXITARGS(_L8("aError=%d, aInfo.iIndStatus=%d, aInfo.iCiphStatus=%d"), aError, aInfo.iIndStatus, aInfo.iCiphStatus);
       
   747 	
       
   748 	// Package up data to return to Common TSY
       
   749 	CMmDataPackage dataPackage;
       
   750 	dataPackage.PackData(const_cast<TBool*>(&aInfo.iIndStatus), 
       
   751 			             const_cast<TBool*>(&aInfo.iCiphStatus));	
       
   752 	
       
   753 	iMessageManagerCallback.Complete(ECustomNotifyCipheringInfoChangeIPC, &dataPackage, aError);
       
   754 	
       
   755 	} // CSecurityDispatcher::CallbackNotifyCipheringInfoChange
       
   756 
       
   757 void CSecurityDispatcher::CallbackCheckSecurityCode(TInt aError)
       
   758 /**
       
   759  * Callback function to be used by the request to complete
       
   760  * CCtsyDispatcherCallback::CallbackSecurityCheckSecurityCodeComp().
       
   761  *
       
   762  * @param aError The error code to be returned to the CTSY Dispatcher.
       
   763  */
       
   764 	{
       
   765 	TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError);
       
   766 
       
   767 	iMessageManagerCallback.Complete(ECustomCheckSecurityCodeIPC, aError);
       
   768 	
       
   769 	} // CSecurityDispatcher::CallbackCheckSecurityCode
       
   770 
       
   771 void CSecurityDispatcher::CallbackDisablePhoneLock(TInt aError)
       
   772 /**
       
   773  * Callback function to be used by the request to complete
       
   774  * CCtsyDispatcherCallback::CallbackSecurityDisablePhoneLockComp().
       
   775  *
       
   776  * @param aError The error code to be returned to the CTSY Dispatcher.
       
   777  */
       
   778 	{
       
   779 	TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError);
       
   780 
       
   781 	iMessageManagerCallback.Complete(ECustomDisablePhoneLockIPC, aError);
       
   782 	
       
   783 	} // CSecurityDispatcher::CallbackDisablePhoneLock
       
   784 
       
   785 void CSecurityDispatcher::CallbackGetCipheringInfo(TInt aError, TBool aIndStatus)				
       
   786 /**
       
   787  * Callback function to be used by the request to complete
       
   788  * CCtsyDispatcherCallback::CallbackSecurityGetCipheringInfoComp().
       
   789  *
       
   790  * @param aError The error code to be returned to the CTSY Dispatcher.
       
   791  * @param aIndStatus Ciphering indicator status.
       
   792  */
       
   793 	{
       
   794 	TSYLOGENTRYEXITARGS(_L8("aError=%d, aIndStatus=%d"), aError, aIndStatus);
       
   795 	
       
   796 	CMmDataPackage dataPackage;
       
   797 	dataPackage.PackData(&aIndStatus);	
       
   798 
       
   799 	// Pack the data to return to the Common TSY
       
   800 	iMessageManagerCallback.Complete(ECustomGetCipheringInfoIPC, &dataPackage, aError);
       
   801 	
       
   802 	} // CSecurityDispatcher::CallbackGetCipheringInfo
       
   803 
       
   804 void CSecurityDispatcher::CallbackIsSecurityCodeBlocked(TInt aError, TBool aIsBlocked)				
       
   805 /**
       
   806  * Callback function to be used by the request to complete
       
   807  * CCtsyDispatcherCallback::CallbackSecurityIsSecurityCodeBlockedComp().
       
   808  *
       
   809  * @param aError The error code to be returned to the CTSY Dispatcher.
       
   810  * @param aIsBlocked Is security code blocked.
       
   811  */
       
   812 	{
       
   813 	TSYLOGENTRYEXITARGS(_L8("aError=%d, aIsBlocked=%d"), aError, aIsBlocked);
       
   814 	
       
   815 	CMmDataPackage dataPackage;
       
   816 	dataPackage.PackData(&aIsBlocked);		
       
   817 	
       
   818 	iMessageManagerCallback.Complete(ECustomIsBlockedIPC, &dataPackage, aError);
       
   819 	
       
   820 	} // CSecurityDispatcher::CallbackIsSecurityCodeBlocked	
       
   821 
       
   822 void CSecurityDispatcher::CallbackCheckSecurityCodeCancel(TInt aError)
       
   823 /**
       
   824  * Callback function to be used by the request to complete
       
   825  * CCtsyDispatcherCallback::CallbackSecurityCheckSecurityCodeCancelComp().
       
   826  *
       
   827  * @param aError The error code to be returned to the CTSY Dispatcher.
       
   828  */
       
   829 	{
       
   830 	TSYLOGENTRYEXITARGS(_L8("aError=%d"), aError);
       
   831 
       
   832 	iMessageManagerCallback.Complete(ECustomCheckSecurityCodeCancelIPC, aError);
       
   833 	
       
   834 	} // CSecurityDispatcher::CallbackCheckSecurityCodeCancel
       
   835 
       
   836 void CSecurityDispatcher::CallbackSync(CRequestQueueOneShot::TIpcDataPackage& aIpcDataPackage)
       
   837 /**
       
   838  * Part of the MDispatcherCallback interface. Used to complete requests handled
       
   839  * synchronously by the Licensee LTSY asynchronously back to the Common TSY.
       
   840  *  
       
   841  * @param aIpcDataPackage Package encapsulating the request.
       
   842  * 
       
   843  * @see MDispatcherCallback::CallbackSync
       
   844  */
       
   845 	{
       
   846 	TSYLOGENTRYEXIT;
       
   847 	
       
   848 	switch (aIpcDataPackage.iIpc)
       
   849 		{
       
   850 	
       
   851 	default:
       
   852 		LOG(_L8("WARNING: CSecurityDispatcher::CallbackSync unhandled IPC=%d"), aIpcDataPackage.iIpc);
       
   853 		__ASSERT_DEBUG(NULL, CtsyDispatcherPanic(EUnhandledCtsyIpc));
       
   854 		break;		
       
   855 		} // switch (aIpcDataPackage.iIpc)
       
   856 	
       
   857 	} // CSecurityDispatcher::CallbackSync
       
   858 
       
   859 
       
   860