telephonyutils/etel3rdpartyapi/src/TelephonyActPhone.cpp
changeset 0 3553901f7fa8
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 /*
       
     2 * Copyright (c) 2009 Sony Ericsson Mobile Communications AB
       
     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 * Sony Ericsson Mobile Communications AB - initial contribution.
       
    11 * Nokia Corporation - additional changes.
       
    12 * 
       
    13 * Contributors:
       
    14 * 
       
    15 * Description:
       
    16 * Code for TelephonyActPhone class, used by CTelephonyFunctions class.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 /**
       
    22  @file
       
    23 */
       
    24 
       
    25 #include "TelephonyFunctions.h" 
       
    26 #include "TelephonyActPhone.h"
       
    27 
       
    28 
       
    29 CGetPhoneIdAct* CGetPhoneIdAct::NewL(CTelephonyFunctions* aTelephonyFunctions)
       
    30 /**
       
    31 Public constructor which can Leave().
       
    32 
       
    33 @param	aTelephonyFunctions Object that constructs us.
       
    34 @leave	Leaves if no memory.
       
    35 */
       
    36 	{
       
    37 	CGetPhoneIdAct* self = new(ELeave) CGetPhoneIdAct(aTelephonyFunctions);
       
    38 	CActiveScheduler::Add(self);
       
    39 	return self;
       
    40 	}
       
    41 
       
    42 CGetPhoneIdAct::~CGetPhoneIdAct()
       
    43 /**
       
    44 Destructor
       
    45 */
       
    46 	{
       
    47 	Cancel();
       
    48 	Complete();
       
    49 	}
       
    50 
       
    51 void CGetPhoneIdAct::GetPhoneId(TDes8& aId)
       
    52 /**
       
    53 Issue Request
       
    54 */
       
    55 	{
       
    56 	iISVphoneId = reinterpret_cast<CTelephony::TPhoneIdV1*> ( const_cast<TUint8*> (aId.Ptr()));
       
    57 	iTelephonyFunctions->Phone()->GetPhoneId(iStatus, iMMphoneId);
       
    58 	SetActive();
       
    59 	}
       
    60 
       
    61 
       
    62 void CGetPhoneIdAct::Complete()
       
    63 /**
       
    64 Service Completed request.
       
    65 */
       
    66 	{
       
    67 	if(iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::EGetPhoneId))
       
    68 		{
       
    69 		if(iStatus==KErrNone)
       
    70 			{
       
    71 			iISVphoneId->iManufacturer.Copy(iMMphoneId.iManufacturer);
       
    72 			iISVphoneId->iModel.Copy(iMMphoneId.iModel);
       
    73 			iISVphoneId->iSerialNumber.Copy(iMMphoneId.iSerialNumber);		
       
    74 			}
       
    75 		iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::EGetPhoneId, iStatus.Int());
       
    76 		}
       
    77 	}
       
    78 
       
    79 
       
    80 TInt CGetPhoneIdAct::RunError(TInt aLeaveCode)
       
    81 /**
       
    82 Handle any Leave() from inside RunL().
       
    83 
       
    84 @param	aLeaveCode	passed in if RunL Leaves.
       
    85 @return	KErrNone.
       
    86 */
       
    87 	{
       
    88 	iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::EGetPhoneId, aLeaveCode);
       
    89 	return KErrNone;	// to ActiveScheduler.
       
    90 	}
       
    91 
       
    92 void CGetPhoneIdAct::DoCancel()
       
    93 /**
       
    94 Cancel request.
       
    95 
       
    96 Async request to dial is cancelled.
       
    97 */
       
    98 	{
       
    99 	iTelephonyFunctions->Phone()->CancelAsyncRequest(EMobilePhoneGetPhoneId);
       
   100 	}
       
   101 
       
   102 
       
   103 CGetPhoneIdAct::CGetPhoneIdAct(CTelephonyFunctions* aTelephonyFunctions)
       
   104 : 	CAsyncRequestBaseAct(),
       
   105 	iTelephonyFunctions(aTelephonyFunctions)
       
   106 /**
       
   107 First-phase constructor which cannot Leave().
       
   108 
       
   109 @param	aTelephonyFunctions Object that constructs us.
       
   110 */
       
   111 	{
       
   112 	}
       
   113 
       
   114 
       
   115 CGetSubscriberIdAct* CGetSubscriberIdAct::NewL(CTelephonyFunctions* aTelephonyFunctions)
       
   116 /**
       
   117 Public constructor which can Leave().
       
   118 
       
   119 @param	aTelephonyFunctions Object that constructs us.
       
   120 @leave	Leaves if no memory.
       
   121 */
       
   122 	{
       
   123 	CGetSubscriberIdAct* self = new(ELeave) CGetSubscriberIdAct(aTelephonyFunctions);
       
   124 	CActiveScheduler::Add(self);
       
   125 	return self;
       
   126 	}
       
   127 
       
   128 CGetSubscriberIdAct::~CGetSubscriberIdAct()
       
   129 /**
       
   130 Destructor
       
   131 */
       
   132 	{
       
   133 	Cancel();
       
   134 	Complete();
       
   135 	}
       
   136 
       
   137 void CGetSubscriberIdAct::GetSubscriberId(TDes8& aId)
       
   138 /**
       
   139 Issue Request
       
   140 */
       
   141 	{
       
   142 	iISVSubscriberIdV1 = reinterpret_cast<CTelephony::TSubscriberIdV1*> ( const_cast<TUint8*> (aId.Ptr()));
       
   143 	iTelephonyFunctions->Phone()->GetSubscriberId(iStatus, iMMSubscriberId);
       
   144 	SetActive();
       
   145 	}
       
   146 
       
   147 
       
   148 void CGetSubscriberIdAct::Complete()
       
   149 /**
       
   150 Service Completed request.
       
   151 */
       
   152 	{
       
   153 	if(iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::EGetSubscriberId))
       
   154 		{
       
   155 		if(iStatus==KErrNone)
       
   156 			{
       
   157 			iISVSubscriberIdV1->iSubscriberId.Copy(iMMSubscriberId);		
       
   158 			}
       
   159 		iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::EGetSubscriberId, iStatus.Int());
       
   160 		}
       
   161 	}
       
   162 
       
   163 
       
   164 TInt CGetSubscriberIdAct::RunError(TInt aLeaveCode)
       
   165 /**
       
   166 Handle any Leave() from inside RunL().
       
   167 
       
   168 @param	aLeaveCode	passed in if RunL Leaves.
       
   169 @return	KErrNone.
       
   170 */
       
   171 	{
       
   172 	iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::EGetSubscriberId, aLeaveCode);
       
   173 	return KErrNone;	// to ActiveScheduler.
       
   174 	}
       
   175 
       
   176 void CGetSubscriberIdAct::DoCancel()
       
   177 /**
       
   178 Cancel request.
       
   179 
       
   180 Async request to dial is cancelled.
       
   181 */
       
   182 	{
       
   183 	iTelephonyFunctions->Phone()->CancelAsyncRequest(EMobilePhoneGetSubscriberId);
       
   184 	}
       
   185 
       
   186 
       
   187 CGetSubscriberIdAct::CGetSubscriberIdAct(CTelephonyFunctions* aTelephonyFunctions)
       
   188 : CAsyncRequestBaseAct(),
       
   189   iTelephonyFunctions(aTelephonyFunctions)
       
   190 /**
       
   191 First-phase constructor which cannot Leave().
       
   192 
       
   193 @param	aTelephonyFunctions Object that constructs us.
       
   194 */
       
   195 	{
       
   196 	}
       
   197 
       
   198 
       
   199 CGetIndicatorAct* CGetIndicatorAct::NewL(CTelephonyFunctions* aTelephonyFunctions)
       
   200 /**
       
   201 Public constructor which can Leave().
       
   202 
       
   203 @param	aTelephonyFunctions Object that constructs us.
       
   204 @leave	Leaves if no memory.
       
   205 */
       
   206 	{
       
   207 	CGetIndicatorAct* self = new(ELeave) CGetIndicatorAct(aTelephonyFunctions);
       
   208 	CActiveScheduler::Add(self);
       
   209 	return self;
       
   210 	}
       
   211 
       
   212 CGetIndicatorAct::~CGetIndicatorAct()
       
   213 /**
       
   214 Destructor
       
   215 */
       
   216 	{
       
   217 	Cancel();
       
   218 	Complete();
       
   219 	}
       
   220 
       
   221 void CGetIndicatorAct::GetIndicator(TDes8& aId)
       
   222 /**
       
   223 Issue Request
       
   224 */
       
   225 	{
       
   226 	TUint32 actionCaps; //not interested!
       
   227 	iISVIndicator = reinterpret_cast<CTelephony::TIndicatorV1*> ( const_cast<TUint8*> (aId.Ptr()) );
       
   228 	iTelephonyFunctions->Phone()->GetIndicatorCaps(actionCaps, iIndicatorCaps);
       
   229 	iTelephonyFunctions->Phone()->GetIndicator(iStatus, iIndicator);
       
   230 	SetActive();
       
   231 	}
       
   232 
       
   233 
       
   234 void CGetIndicatorAct::Complete()
       
   235 /**
       
   236 Service Completed request.
       
   237 */
       
   238 	{
       
   239 	if(iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::EGetIndicator))
       
   240 		{
       
   241 		if(iStatus==KErrNone)
       
   242 			{
       
   243 			iISVIndicator->iIndicator=iIndicator;
       
   244 			iISVIndicator->iCapabilities=iIndicatorCaps;		
       
   245 			}
       
   246 		iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::EGetIndicator, iStatus.Int());
       
   247 		}
       
   248 	}
       
   249 
       
   250 
       
   251 TInt CGetIndicatorAct::RunError(TInt aLeaveCode)
       
   252 /**
       
   253 Handle any Leave() from inside RunL().
       
   254 
       
   255 @param	aLeaveCode	passed in if RunL Leaves.
       
   256 @return	KErrNone.
       
   257 */
       
   258 	{
       
   259 	iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::EGetIndicator, aLeaveCode);
       
   260 	return KErrNone;	// to ActiveScheduler.
       
   261 	}
       
   262 
       
   263 void CGetIndicatorAct::DoCancel()
       
   264 /**
       
   265 Cancel request.
       
   266 
       
   267 Async request to dial is cancelled.
       
   268 */
       
   269 	{
       
   270 	iTelephonyFunctions->Phone()->CancelAsyncRequest(EMobilePhoneGetIndicator);
       
   271 	}
       
   272 
       
   273 
       
   274 CGetIndicatorAct::CGetIndicatorAct(CTelephonyFunctions* aTelephonyFunctions)
       
   275 : CAsyncRequestBaseAct(),
       
   276   iTelephonyFunctions(aTelephonyFunctions)
       
   277 /**
       
   278 First-phase constructor which cannot Leave().
       
   279 
       
   280 @param	aTelephonyFunctions Object that constructs us.
       
   281 */
       
   282 	{
       
   283 	}
       
   284 
       
   285 CGetBatteryInfoAct* CGetBatteryInfoAct::NewL(CTelephonyFunctions* aTelephonyFunctions)
       
   286 /**
       
   287 Public constructor which can Leave().
       
   288 
       
   289 @param	aTelephonyFunctions Object that constructs us.
       
   290 @leave	Leaves if no memory.
       
   291 */
       
   292 	{
       
   293 	CGetBatteryInfoAct* self = new(ELeave) CGetBatteryInfoAct(aTelephonyFunctions);
       
   294 	CActiveScheduler::Add(self);
       
   295 	return self;
       
   296 	}
       
   297 
       
   298 CGetBatteryInfoAct::~CGetBatteryInfoAct()
       
   299 /**
       
   300 Destructor
       
   301 */
       
   302 	{
       
   303 	Cancel();
       
   304 	Complete();
       
   305 	}
       
   306 
       
   307 void CGetBatteryInfoAct::GetBatteryInfo(TDes8& aId)
       
   308 /**
       
   309 Issue Request
       
   310 */
       
   311 	{
       
   312 	iISVBatteryInfo = reinterpret_cast<CTelephony::TBatteryInfoV1*> ( const_cast<TUint8*> (aId.Ptr()) );
       
   313 	iTelephonyFunctions->Phone()->GetBatteryInfo(iStatus, iMMBatteryInfo);
       
   314 	SetActive();
       
   315 	}
       
   316 
       
   317 
       
   318 void CGetBatteryInfoAct::Complete()
       
   319 /**
       
   320 Service Completed request.
       
   321 */
       
   322 	{
       
   323 	if(iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::EGetBatteryInfo))
       
   324 		{
       
   325 		if(iStatus==KErrNone)
       
   326 			{
       
   327 			switch(iMMBatteryInfo.iStatus)
       
   328 				{
       
   329 				case RMobilePhone::EPoweredByBattery:
       
   330 					iISVBatteryInfo->iStatus=CTelephony::EPoweredByBattery;
       
   331 					break;
       
   332 				case RMobilePhone::EBatteryConnectedButExternallyPowered:
       
   333 					iISVBatteryInfo->iStatus=CTelephony::EBatteryConnectedButExternallyPowered;
       
   334 					break;
       
   335 				case RMobilePhone::ENoBatteryConnected:
       
   336 					iISVBatteryInfo->iStatus=CTelephony::ENoBatteryConnected;
       
   337 					break;
       
   338 				case RMobilePhone::EPowerFault:
       
   339 					iISVBatteryInfo->iStatus=CTelephony::EPowerFault;
       
   340 					break;
       
   341 				default:
       
   342 						iISVBatteryInfo->iStatus=CTelephony::EPowerStatusUnknown;
       
   343 				}		
       
   344 			iISVBatteryInfo->iChargeLevel=iMMBatteryInfo.iChargeLevel;		
       
   345 			}
       
   346 		iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::EGetBatteryInfo, iStatus.Int());
       
   347 		}
       
   348 	}
       
   349 
       
   350 
       
   351 TInt CGetBatteryInfoAct::RunError(TInt aLeaveCode)
       
   352 /**
       
   353 Handle any Leave() from inside RunL().
       
   354 
       
   355 @param	aLeaveCode	passed in if RunL Leaves.
       
   356 @return	KErrNone.
       
   357 */
       
   358 	{
       
   359 	iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::EGetBatteryInfo, aLeaveCode);
       
   360 	return KErrNone;	// to ActiveScheduler.
       
   361 	}
       
   362 
       
   363 void CGetBatteryInfoAct::DoCancel()
       
   364 /**
       
   365 Cancel request.
       
   366 
       
   367 Async request to dial is cancelled.
       
   368 */
       
   369 	{
       
   370 	iTelephonyFunctions->Phone()->CancelAsyncRequest(EMobilePhoneGetBatteryInfo);
       
   371 	}
       
   372 
       
   373 
       
   374 CGetBatteryInfoAct::CGetBatteryInfoAct(CTelephonyFunctions* aTelephonyFunctions)
       
   375 : CAsyncRequestBaseAct(),
       
   376   iTelephonyFunctions(aTelephonyFunctions)
       
   377 /**
       
   378 First-phase constructor which cannot Leave().
       
   379 
       
   380 @param	aTelephonyFunctions Object that constructs us.
       
   381 */
       
   382 	{
       
   383 	}
       
   384 
       
   385 
       
   386 CGetSignalStrengthAct* CGetSignalStrengthAct::NewL(CTelephonyFunctions* aTelephonyFunctions)
       
   387 /**
       
   388 Public constructor which can Leave().
       
   389 
       
   390 @param	aTelephonyFunctions Object that constructs us.
       
   391 @leave	Leaves if no memory.
       
   392 */
       
   393 	{
       
   394 	CGetSignalStrengthAct* self = new(ELeave) CGetSignalStrengthAct(aTelephonyFunctions);
       
   395 	CActiveScheduler::Add(self);
       
   396 	return self;
       
   397 	}
       
   398 
       
   399 CGetSignalStrengthAct::~CGetSignalStrengthAct()
       
   400 /**
       
   401 Destructor
       
   402 */
       
   403 	{
       
   404 	Cancel();
       
   405 	Complete();
       
   406 	}
       
   407 
       
   408 void CGetSignalStrengthAct::GetSignalStrength(TDes8& aId)
       
   409 /**
       
   410 Issue Request
       
   411 */
       
   412 	{
       
   413 	iISVSignalStrength = reinterpret_cast<CTelephony::TSignalStrengthV1*> (const_cast<TUint8*> (aId.Ptr()));
       
   414 	iTelephonyFunctions->Phone()->GetSignalStrength(iStatus, iSignalStrength, iBar);
       
   415 	SetActive();
       
   416 	}
       
   417 
       
   418 
       
   419 void CGetSignalStrengthAct::Complete()
       
   420 /**
       
   421 Service Completed request.
       
   422 */
       
   423 	{
       
   424 	if(iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::EGetSignalStrength))
       
   425 		{
       
   426 		if(iStatus==KErrNone)
       
   427 			{
       
   428 			iISVSignalStrength->iSignalStrength=iSignalStrength;
       
   429 			iISVSignalStrength->iBar=iBar;		
       
   430 			}
       
   431 		iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::EGetSignalStrength, iStatus.Int());
       
   432 		}
       
   433 	}
       
   434 
       
   435 
       
   436 TInt CGetSignalStrengthAct::RunError(TInt aLeaveCode)
       
   437 /**
       
   438 Handle any Leave() from inside RunL().
       
   439 
       
   440 @param	aLeaveCode	passed in if RunL Leaves.
       
   441 @return	KErrNone.
       
   442 */
       
   443 	{
       
   444 	iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::EGetSignalStrength, aLeaveCode);
       
   445 	return KErrNone;	// to ActiveScheduler.
       
   446 	}
       
   447 
       
   448 void CGetSignalStrengthAct::DoCancel()
       
   449 /**
       
   450 Cancel request.
       
   451 
       
   452 Async request to dial is cancelled.
       
   453 */
       
   454 	{
       
   455 	iTelephonyFunctions->Phone()->CancelAsyncRequest(EMobilePhoneGetSignalStrength);
       
   456 	}
       
   457 
       
   458 
       
   459 CGetSignalStrengthAct::CGetSignalStrengthAct(CTelephonyFunctions* aTelephonyFunctions)
       
   460 : CAsyncRequestBaseAct(),
       
   461   iTelephonyFunctions(aTelephonyFunctions)
       
   462 /**
       
   463 First-phase constructor which cannot Leave().
       
   464 
       
   465 @param	aTelephonyFunctions Object that constructs us.
       
   466 */
       
   467 	{
       
   468 	}
       
   469 
       
   470 
       
   471 CGetIccLockInfoAct* CGetIccLockInfoAct::NewL(CTelephonyFunctions* aTelephonyFunctions)
       
   472 /**
       
   473 Public constructor which can Leave().
       
   474 
       
   475 @param	aTelephonyFunctions Object that constructs us.
       
   476 @leave	Leaves if no memory.
       
   477 */
       
   478 	{
       
   479 	CGetIccLockInfoAct* self = new(ELeave) CGetIccLockInfoAct(aTelephonyFunctions);
       
   480 	CActiveScheduler::Add(self);
       
   481 	return self;
       
   482 	}
       
   483 
       
   484 CGetIccLockInfoAct::~CGetIccLockInfoAct()
       
   485 /**
       
   486 Destructor
       
   487 */
       
   488 	{
       
   489 	Cancel();
       
   490 	Complete();
       
   491 	}
       
   492 
       
   493 void CGetIccLockInfoAct::GetIccLockInfo(CTelephony::TIccLock aLock, TDes8& aId)
       
   494 /**
       
   495 Issue Request
       
   496 */
       
   497 	{
       
   498 	iISVLockInfo = reinterpret_cast<CTelephony::TIccLockInfoV1*> ( const_cast<TUint8*> (aId.Ptr()) );
       
   499 	
       
   500 	RMobilePhone::TMobilePhoneLock thisLock;
       
   501 	
       
   502 	switch(aLock)
       
   503 		{
       
   504 	case CTelephony::ELockPin1:
       
   505 		thisLock=RMobilePhone::ELockICC;
       
   506 		break;
       
   507 	case CTelephony::ELockPin2:
       
   508 		thisLock=RMobilePhone::ELockPin2;
       
   509 		break;
       
   510 	default:
       
   511 		thisLock=RMobilePhone::ELockICC;
       
   512 		break;
       
   513 		}
       
   514 	
       
   515 	iTelephonyFunctions->Phone()->GetLockInfo(iStatus, thisLock, iMMLockInfo1Pckg);
       
   516 	SetActive();
       
   517 	}
       
   518 
       
   519 
       
   520 void CGetIccLockInfoAct::Complete()
       
   521 /**
       
   522 Service Completed request.
       
   523 */
       
   524 	{
       
   525 	if(iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::EGetIccLockInfo))
       
   526 		{
       
   527 		if(iStatus==KErrNone)
       
   528 			{
       
   529 				switch(iMMLockInfo.iStatus)
       
   530 					{
       
   531 				case RMobilePhone::EStatusLocked:
       
   532 					iISVLockInfo->iStatus=CTelephony::EStatusLocked;
       
   533 					break;
       
   534 				case RMobilePhone::EStatusUnlocked:
       
   535 					iISVLockInfo->iStatus=CTelephony::EStatusUnlocked;
       
   536 					break;
       
   537 				case RMobilePhone::EStatusBlocked:
       
   538 					iISVLockInfo->iStatus=CTelephony::EStatusBlocked;
       
   539 					break;
       
   540 				default:
       
   541 					iISVLockInfo->iStatus=CTelephony::EStatusLockUnknown;
       
   542 					break;
       
   543 					}
       
   544 				
       
   545 				switch(iMMLockInfo.iSetting)
       
   546 					{
       
   547 				case RMobilePhone::ELockSetEnabled:
       
   548 					iISVLockInfo->iSetting=CTelephony::ELockSetEnabled;
       
   549 					break;
       
   550 				case RMobilePhone::ELockSetDisabled:
       
   551 					iISVLockInfo->iSetting=CTelephony::ELockSetDisabled;
       
   552 					break;
       
   553 				default:
       
   554 					iISVLockInfo->iSetting=CTelephony::ELockSetUnknown;
       
   555 					}			
       
   556 			}
       
   557 		iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::EGetIccLockInfo,  iStatus.Int());
       
   558 		}
       
   559 	}
       
   560 
       
   561 
       
   562 TInt CGetIccLockInfoAct::RunError(TInt aLeaveCode)
       
   563 /**
       
   564 Handle any Leave() from inside RunL().
       
   565 
       
   566 @param	aLeaveCode	passed in if RunL Leaves.
       
   567 @return	KErrNone.
       
   568 */
       
   569 	{
       
   570 	iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::EGetIccLockInfo,  aLeaveCode);
       
   571 	return KErrNone;	// to ActiveScheduler.
       
   572 	}
       
   573 
       
   574 void CGetIccLockInfoAct::DoCancel()
       
   575 /**
       
   576 Cancel request.
       
   577 
       
   578 Async request to dial is cancelled.
       
   579 */
       
   580 	{
       
   581 	iTelephonyFunctions->Phone()->CancelAsyncRequest(EMobilePhoneGetLockInfo);
       
   582 	}
       
   583 
       
   584 
       
   585 CGetIccLockInfoAct::CGetIccLockInfoAct(CTelephonyFunctions* aTelephonyFunctions)
       
   586 : CAsyncRequestBaseAct(),
       
   587   iTelephonyFunctions(aTelephonyFunctions),
       
   588   iMMLockInfo1Pckg(iMMLockInfo)
       
   589 /**
       
   590 First-phase constructor which cannot Leave().
       
   591 
       
   592 @param	aTelephonyFunctions Object that constructs us.
       
   593 */
       
   594 	{
       
   595 	}
       
   596 
       
   597 
       
   598 CSendDTMFTonesAct* CSendDTMFTonesAct::NewL(CTelephonyFunctions* aTelephonyFunctions)
       
   599 /**
       
   600 Public constructor which can Leave().
       
   601 
       
   602 @param	aTelephonyFunctions Object that constructs us.
       
   603 @leave	Leaves if no memory.
       
   604 */
       
   605 	{
       
   606 	CSendDTMFTonesAct* self = new(ELeave) CSendDTMFTonesAct(aTelephonyFunctions);
       
   607 	CActiveScheduler::Add(self);
       
   608 	return self;
       
   609 	}
       
   610 
       
   611 CSendDTMFTonesAct::~CSendDTMFTonesAct()
       
   612 /**
       
   613 Destructor
       
   614 */
       
   615 	{
       
   616 	Cancel();
       
   617 	Complete();
       
   618 	}
       
   619 
       
   620 void CSendDTMFTonesAct::SendDTMFTones(const TDesC& aTones)
       
   621 /**
       
   622 Issue Request
       
   623 */
       
   624 	{
       
   625 	iTelephonyFunctions->Phone()->SendDTMFTones(iStatus, aTones);
       
   626 	SetActive();
       
   627 	}
       
   628 
       
   629 
       
   630 void CSendDTMFTonesAct::Complete()
       
   631 /**
       
   632 Service Completed request.
       
   633 */
       
   634 	{
       
   635 	iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::ESendDTMFTones,  iStatus.Int());
       
   636 	}
       
   637 
       
   638 
       
   639 TInt CSendDTMFTonesAct::RunError(TInt aLeaveCode)
       
   640 /**
       
   641 Handle any Leave() from inside RunL().
       
   642 
       
   643 @param	aLeaveCode	passed in if RunL Leaves.
       
   644 @return	KErrNone.
       
   645 */
       
   646 	{
       
   647 	iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::ESendDTMFTones,  aLeaveCode);
       
   648 	return KErrNone;	// to ActiveScheduler.
       
   649 	}
       
   650 
       
   651 void CSendDTMFTonesAct::DoCancel()
       
   652 /**
       
   653 Cancel request.
       
   654 
       
   655 Async request to dial is cancelled.
       
   656 */
       
   657 	{
       
   658 	iTelephonyFunctions->Phone()->CancelAsyncRequest(EMobilePhoneSendDTMFTones);
       
   659 	}
       
   660 
       
   661 
       
   662 CSendDTMFTonesAct::CSendDTMFTonesAct(CTelephonyFunctions* aTelephonyFunctions)
       
   663 : CAsyncRequestBaseAct(),
       
   664   iTelephonyFunctions(aTelephonyFunctions)
       
   665 /**
       
   666 First-phase constructor which cannot Leave().
       
   667 
       
   668 @param	aTelephonyFunctions Object that constructs us.
       
   669 */
       
   670 	{
       
   671 	}
       
   672 
       
   673 CFlightModeChangeAct* CFlightModeChangeAct::NewL(CTelephonyFunctions* aTelephonyFunctions)
       
   674 /**
       
   675 Public constructor which can Leave().
       
   676 
       
   677 @param	aTelephonyFunctions Object that constructs us.
       
   678 @leave	Leaves if no memory.
       
   679 */
       
   680 	{
       
   681 	CFlightModeChangeAct* self = new(ELeave) CFlightModeChangeAct(aTelephonyFunctions);
       
   682 	CActiveScheduler::Add(self);
       
   683 	return self;
       
   684 	}
       
   685 
       
   686 CFlightModeChangeAct::~CFlightModeChangeAct()
       
   687 /**
       
   688 Destructor
       
   689 */
       
   690 	{
       
   691 	Cancel();
       
   692 	Complete();
       
   693 	}
       
   694 
       
   695 void CFlightModeChangeAct::FlightModeChangeL(TDes8& aDes)
       
   696 /**
       
   697 Issue Request
       
   698 */
       
   699 	{	
       
   700 	iFlightMode = reinterpret_cast<CTelephony::TFlightModeV1*> ( const_cast<TUint8*> (aDes.Ptr()) );
       
   701 	
       
   702 	iTelephonyFunctions->PhonePowerProperty()->Subscribe(iStatus);
       
   703 
       
   704 	SetActive();	
       
   705 	}
       
   706 
       
   707 
       
   708 void CFlightModeChangeAct::Complete()
       
   709 /**
       
   710 Service Completed request.
       
   711 */
       
   712 	{
       
   713 	if(iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::EFlightModeChange))
       
   714 		{
       
   715 		if(iStatus==KErrNone)
       
   716 			{
       
   717 			TInt newPhonePowerState;
       
   718 			if (iTelephonyFunctions->PhonePowerProperty()->Get(newPhonePowerState) != KErrNone)
       
   719 			  newPhonePowerState = ESAPhoneOff;
       
   720 			
       
   721 			if(newPhonePowerState==ESAPhoneOn) 
       
   722 				{
       
   723 				iFlightMode->iFlightModeStatus=CTelephony::EFlightModeOff;
       
   724 				}
       
   725 			else 
       
   726 				{
       
   727 				iFlightMode->iFlightModeStatus=CTelephony::EFlightModeOn;
       
   728 				}			
       
   729 			}
       
   730 		iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::EFlightModeChange,  iStatus.Int());
       
   731 		}
       
   732 	}
       
   733 
       
   734 
       
   735 TInt CFlightModeChangeAct::RunError(TInt aLeaveCode)
       
   736 /**
       
   737 Handle any Leave() from inside RunL().
       
   738 
       
   739 @param	aLeaveCode	passed in if RunL Leaves.
       
   740 @return	KErrNone.
       
   741 */
       
   742 	{
       
   743 	iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::EFlightModeChange,  aLeaveCode);
       
   744 	return KErrNone;	// to ActiveScheduler.
       
   745 	}
       
   746 
       
   747 void CFlightModeChangeAct::DoCancel()
       
   748 /**
       
   749 Cancel request.
       
   750 
       
   751 Async request to dial is cancelled.
       
   752 */
       
   753 	{
       
   754 	iTelephonyFunctions->PhonePowerProperty()->Cancel();
       
   755 	}
       
   756 
       
   757 
       
   758 CFlightModeChangeAct::CFlightModeChangeAct(CTelephonyFunctions* aTelephonyFunctions)
       
   759 : CAsyncRequestBaseAct(),
       
   760   iTelephonyFunctions(aTelephonyFunctions)
       
   761 /**
       
   762 First-phase constructor which cannot Leave().
       
   763 
       
   764 @param	aTelephonyFunctions Object that constructs us.
       
   765 */
       
   766 	{
       
   767 	}
       
   768 	
       
   769 CNotifyIndicatorAct* CNotifyIndicatorAct::NewL(CTelephonyFunctions* aTelephonyFunctions)
       
   770 /**
       
   771 Public constructor which can Leave().
       
   772 
       
   773 @param	aTelephonyFunctions Object that constructs us.
       
   774 @leave	Leaves if no memory.
       
   775 */
       
   776 	{
       
   777 	CNotifyIndicatorAct* self = new(ELeave) CNotifyIndicatorAct(aTelephonyFunctions);
       
   778 	CActiveScheduler::Add(self);
       
   779 	return self;
       
   780 	}
       
   781 
       
   782 CNotifyIndicatorAct::~CNotifyIndicatorAct()
       
   783 /**
       
   784 Destructor
       
   785 */
       
   786 	{
       
   787 	Cancel();
       
   788 	Complete();
       
   789 	}
       
   790 
       
   791 void CNotifyIndicatorAct::NotifyIndicator(TDes8& aId)
       
   792 /**
       
   793 Issue Request
       
   794 */
       
   795 	{
       
   796 	TUint32 actionCaps; //not interested!
       
   797 	iISVIndicator = reinterpret_cast<CTelephony::TIndicatorV1*> ( const_cast<TUint8*> (aId.Ptr()) );
       
   798 	iTelephonyFunctions->Phone()->GetIndicatorCaps(actionCaps, iIndicatorCaps);
       
   799 	iTelephonyFunctions->Phone()->NotifyIndicatorChange(iStatus, iIndicator);
       
   800 	SetActive();
       
   801 	}
       
   802 
       
   803 
       
   804 void CNotifyIndicatorAct::Complete()
       
   805 /**
       
   806 Service Completed request.
       
   807 */
       
   808 	{
       
   809 	if(iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::ENotifyIndicator))
       
   810 		{
       
   811 		if(iStatus==KErrNone)
       
   812 			{
       
   813 			iISVIndicator->iIndicator=iIndicator;
       
   814 			iISVIndicator->iCapabilities=iIndicatorCaps;		
       
   815 			}
       
   816 		iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::ENotifyIndicator,  iStatus.Int());
       
   817 		}
       
   818 	}
       
   819 
       
   820 
       
   821 TInt CNotifyIndicatorAct::RunError(TInt aLeaveCode)
       
   822 /**
       
   823 Handle any Leave() from inside RunL().
       
   824 
       
   825 @param	aLeaveCode	passed in if RunL Leaves.
       
   826 @return	KErrNone.
       
   827 */
       
   828 	{
       
   829 	iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::ENotifyIndicator,  aLeaveCode);
       
   830 	return KErrNone;	// to ActiveScheduler.
       
   831 	}
       
   832 
       
   833 void CNotifyIndicatorAct::DoCancel()
       
   834 /**
       
   835 Cancel request.
       
   836 
       
   837 Async request to dial is cancelled.
       
   838 */
       
   839 	{
       
   840 	iTelephonyFunctions->Phone()->CancelAsyncRequest(EMobilePhoneNotifyIndicatorChange);
       
   841 	}
       
   842 
       
   843 
       
   844 CNotifyIndicatorAct::CNotifyIndicatorAct(CTelephonyFunctions* aTelephonyFunctions)
       
   845 : CAsyncRequestBaseAct(),
       
   846   iTelephonyFunctions(aTelephonyFunctions)
       
   847 /**
       
   848 First-phase constructor which cannot Leave().
       
   849 
       
   850 @param	aTelephonyFunctions Object that constructs us.
       
   851 */
       
   852 	{
       
   853 	}
       
   854 
       
   855 CNotifyBatteryInfoAct* CNotifyBatteryInfoAct::NewL(CTelephonyFunctions* aTelephonyFunctions)
       
   856 /**
       
   857 Public constructor which can Leave().
       
   858 
       
   859 @param	aTelephonyFunctions Object that constructs us.
       
   860 @leave	Leaves if no memory.
       
   861 */
       
   862 	{
       
   863 	CNotifyBatteryInfoAct* self = new(ELeave) CNotifyBatteryInfoAct(aTelephonyFunctions);
       
   864 	CActiveScheduler::Add(self);
       
   865 	return self;
       
   866 	}
       
   867 
       
   868 CNotifyBatteryInfoAct::~CNotifyBatteryInfoAct()
       
   869 /**
       
   870 Destructor
       
   871 */
       
   872 	{
       
   873 	Cancel();
       
   874 	Complete();
       
   875 	}
       
   876 
       
   877 void CNotifyBatteryInfoAct::NotifyBatteryInfo(TDes8& aId)
       
   878 /**
       
   879 Issue Request
       
   880 */
       
   881 	{
       
   882 	iISVBatteryInfo = reinterpret_cast<CTelephony::TBatteryInfoV1*> ( const_cast<TUint8*> (aId.Ptr()) );
       
   883 	iTelephonyFunctions->Phone()->NotifyBatteryInfoChange(iStatus, iMMBatteryInfo);
       
   884 	SetActive();
       
   885 	}
       
   886 
       
   887 
       
   888 void CNotifyBatteryInfoAct::Complete()
       
   889 /**
       
   890 Service Completed request.
       
   891 */
       
   892 	{
       
   893 	if(iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::ENotifyBatteryInfo))
       
   894 		{
       
   895 		if(iStatus==KErrNone)
       
   896 			{
       
   897 			switch(iMMBatteryInfo.iStatus)
       
   898 				{
       
   899 				case RMobilePhone::EPoweredByBattery:
       
   900 					iISVBatteryInfo->iStatus=CTelephony::EPoweredByBattery;
       
   901 					break;
       
   902 				case RMobilePhone::EBatteryConnectedButExternallyPowered:
       
   903 					iISVBatteryInfo->iStatus=CTelephony::EBatteryConnectedButExternallyPowered;
       
   904 					break;
       
   905 				case RMobilePhone::ENoBatteryConnected:
       
   906 					iISVBatteryInfo->iStatus=CTelephony::ENoBatteryConnected;
       
   907 					break;
       
   908 				case RMobilePhone::EPowerFault:
       
   909 					iISVBatteryInfo->iStatus=CTelephony::EPowerFault;
       
   910 					break;
       
   911 				default:
       
   912 						iISVBatteryInfo->iStatus=CTelephony::EPowerStatusUnknown;
       
   913 				}		
       
   914 			iISVBatteryInfo->iChargeLevel=iMMBatteryInfo.iChargeLevel;		
       
   915 			}
       
   916 		iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::ENotifyBatteryInfo,  iStatus.Int());
       
   917 		}
       
   918 	}
       
   919 
       
   920 
       
   921 TInt CNotifyBatteryInfoAct::RunError(TInt aLeaveCode)
       
   922 /**
       
   923 Handle any Leave() from inside RunL().
       
   924 
       
   925 @param	aLeaveCode	passed in if RunL Leaves.
       
   926 @return	KErrNone.
       
   927 */
       
   928 	{
       
   929 	iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::ENotifyBatteryInfo,  aLeaveCode);
       
   930 	return KErrNone;	// to ActiveScheduler.
       
   931 	}
       
   932 
       
   933 void CNotifyBatteryInfoAct::DoCancel()
       
   934 /**
       
   935 Cancel request.
       
   936 
       
   937 Async request to dial is cancelled.
       
   938 */
       
   939 	{
       
   940 	iTelephonyFunctions->Phone()->CancelAsyncRequest(EMobilePhoneNotifyBatteryInfoChange);
       
   941 	}
       
   942 
       
   943 
       
   944 CNotifyBatteryInfoAct::CNotifyBatteryInfoAct(CTelephonyFunctions* aTelephonyFunctions)
       
   945 : CAsyncRequestBaseAct(),
       
   946   iTelephonyFunctions(aTelephonyFunctions)
       
   947 /**
       
   948 First-phase constructor which cannot Leave().
       
   949 
       
   950 @param	aTelephonyFunctions Object that constructs us.
       
   951 */
       
   952 	{
       
   953 	}
       
   954 
       
   955 CNotifySignalStrengthAct* CNotifySignalStrengthAct::NewL(CTelephonyFunctions* aTelephonyFunctions)
       
   956 /**
       
   957 Public constructor which can Leave().
       
   958 
       
   959 @param	aTelephonyFunctions Object that constructs us.
       
   960 @leave	Leaves if no memory.
       
   961 */
       
   962 	{
       
   963 	CNotifySignalStrengthAct* self = new(ELeave) CNotifySignalStrengthAct(aTelephonyFunctions);
       
   964 	CActiveScheduler::Add(self);
       
   965 	return self;
       
   966 	}
       
   967 
       
   968 CNotifySignalStrengthAct::~CNotifySignalStrengthAct()
       
   969 //
       
   970 //Destructor
       
   971 //
       
   972 	{
       
   973 	Cancel();
       
   974 	Complete();
       
   975 	}
       
   976 
       
   977 void CNotifySignalStrengthAct::NotifySignalStrength(TDes8& aId)
       
   978 //
       
   979 //Issue Request
       
   980 //
       
   981 	{
       
   982 	iISVSignalStrength = reinterpret_cast<CTelephony::TSignalStrengthV1*> ( const_cast<TUint8*> (aId.Ptr()) );
       
   983 	iTelephonyFunctions->Phone()->NotifySignalStrengthChange(iStatus, iSignalStrength, iBar);
       
   984 	SetActive();
       
   985 	}
       
   986 
       
   987 
       
   988 void CNotifySignalStrengthAct::Complete()
       
   989 /**
       
   990 Service Completed request.
       
   991 */
       
   992 	{
       
   993 	if(iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::ENotifySignalStrength))
       
   994 		{
       
   995 		if(iStatus==KErrNone)
       
   996 			{
       
   997 			iISVSignalStrength->iSignalStrength=iSignalStrength;
       
   998 			iISVSignalStrength->iBar=iBar;		
       
   999 			}
       
  1000 		iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::ENotifySignalStrength,  iStatus.Int());
       
  1001 		}
       
  1002 	}
       
  1003 
       
  1004 
       
  1005 TInt CNotifySignalStrengthAct::RunError(TInt aLeaveCode)
       
  1006 /**
       
  1007 Handle any Leave() from inside RunL().
       
  1008 
       
  1009 @param	aLeaveCode	passed in if RunL Leaves.
       
  1010 @return	KErrNone.
       
  1011 */
       
  1012 	{
       
  1013 	iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::ENotifySignalStrength,  aLeaveCode);
       
  1014 	return KErrNone;	// to ActiveScheduler.
       
  1015 	}
       
  1016 
       
  1017 void CNotifySignalStrengthAct::DoCancel()
       
  1018 /**
       
  1019 Cancel request.
       
  1020 
       
  1021 Async request to dial is cancelled.
       
  1022 */
       
  1023 	{
       
  1024 	iTelephonyFunctions->Phone()->CancelAsyncRequest(EMobilePhoneNotifySignalStrengthChange);
       
  1025 	}
       
  1026 
       
  1027 
       
  1028 CNotifySignalStrengthAct::CNotifySignalStrengthAct(CTelephonyFunctions* aTelephonyFunctions)
       
  1029 : CAsyncRequestBaseAct(),
       
  1030   iTelephonyFunctions(aTelephonyFunctions)
       
  1031 /**
       
  1032 First-phase constructor which cannot Leave().
       
  1033 
       
  1034 @param	aTelephonyFunctions Object that constructs us.
       
  1035 */
       
  1036 	{
       
  1037 	}
       
  1038 
       
  1039 
       
  1040 CNotifyIccLockInfoAct* CNotifyIccLockInfoAct::NewL(CTelephonyFunctions* aTelephonyFunctions)
       
  1041 /**
       
  1042 Public constructor which can Leave().
       
  1043 
       
  1044 @param	aTelephonyFunctions Object that constructs us.
       
  1045 @leave	Leaves if no memory.
       
  1046 */
       
  1047 	{
       
  1048 	CNotifyIccLockInfoAct* self = new(ELeave) CNotifyIccLockInfoAct(aTelephonyFunctions);
       
  1049 	CActiveScheduler::Add(self);
       
  1050 	return self;
       
  1051 	}
       
  1052 
       
  1053 CNotifyIccLockInfoAct::~CNotifyIccLockInfoAct()
       
  1054 /**
       
  1055 Destructor
       
  1056 */
       
  1057 	{
       
  1058 	Cancel();
       
  1059 	Complete();
       
  1060 	}
       
  1061 
       
  1062 void CNotifyIccLockInfoAct::NotifyIccLockInfo(CTelephony::TIccLock aLock, TDes8& aId)
       
  1063 /**
       
  1064 Issue Request
       
  1065 */
       
  1066 	{
       
  1067 	if (aLock == CTelephony::ELockPin1)
       
  1068 		{
       
  1069 		iISVPin1LockInfo = reinterpret_cast<CTelephony::TIccLockInfoV1*> ( const_cast<TUint8*> (aId.Ptr()) );
       
  1070 		}
       
  1071 	else if (aLock == CTelephony::ELockPin2)
       
  1072 		{
       
  1073 		iISVPin2LockInfo = reinterpret_cast<CTelephony::TIccLockInfoV1*> ( const_cast<TUint8*> (aId.Ptr()) );
       
  1074 		}
       
  1075 
       
  1076 	if (!((iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::ENotifyPin1LockInfo)) && (iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::ENotifyPin2LockInfo))))
       
  1077 		{
       
  1078 		iTelephonyFunctions->Phone()->NotifyLockInfoChange(iStatus, iMMLock, iMMLockInfoV1Pckg);
       
  1079 		SetActive();
       
  1080 		}
       
  1081 	}
       
  1082 
       
  1083 
       
  1084 void CNotifyIccLockInfoAct::Complete()
       
  1085 /**
       
  1086 Service Completed request.
       
  1087 */
       
  1088 	{
       
  1089 	if(iStatus==KErrNone)
       
  1090 		{
       
  1091 		if ((iMMLock == RMobilePhone::ELockICC) && (iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::ENotifyPin1LockInfo)))
       
  1092 			{
       
  1093 			switch(iMMLockInfo.iStatus)
       
  1094 				{
       
  1095 			case RMobilePhone::EStatusLocked:
       
  1096 				iISVPin1LockInfo->iStatus=CTelephony::EStatusLocked;
       
  1097 				break;
       
  1098 			case RMobilePhone::EStatusUnlocked:
       
  1099 				iISVPin1LockInfo->iStatus=CTelephony::EStatusUnlocked;
       
  1100 				break;
       
  1101 			case RMobilePhone::EStatusBlocked:
       
  1102 				iISVPin1LockInfo->iStatus=CTelephony::EStatusBlocked;
       
  1103 				break;
       
  1104 			default:
       
  1105 				iISVPin1LockInfo->iStatus=CTelephony::EStatusLockUnknown;
       
  1106 				break;
       
  1107 				}
       
  1108 			
       
  1109 			switch(iMMLockInfo.iSetting)
       
  1110 				{
       
  1111 			case RMobilePhone::ELockSetEnabled:
       
  1112 				iISVPin1LockInfo->iSetting=CTelephony::ELockSetEnabled;
       
  1113 				break;
       
  1114 			case RMobilePhone::ELockSetDisabled:
       
  1115 				iISVPin1LockInfo->iSetting=CTelephony::ELockSetDisabled;
       
  1116 				break;
       
  1117 			default:
       
  1118 				iISVPin1LockInfo->iSetting=CTelephony::ELockSetUnknown;
       
  1119 				}
       
  1120 			iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::ENotifyPin1LockInfo,  KErrNone);
       
  1121 			}
       
  1122 		else if ((iMMLock == RMobilePhone::ELockPin2) && (iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::ENotifyPin2LockInfo)))
       
  1123 			{
       
  1124 			switch(iMMLockInfo.iStatus)
       
  1125 				{
       
  1126 			case RMobilePhone::EStatusLocked:
       
  1127 				iISVPin2LockInfo->iStatus=CTelephony::EStatusLocked;
       
  1128 				break;
       
  1129 			case RMobilePhone::EStatusUnlocked:
       
  1130 				iISVPin2LockInfo->iStatus=CTelephony::EStatusUnlocked;
       
  1131 				break;
       
  1132 			case RMobilePhone::EStatusBlocked:
       
  1133 				iISVPin2LockInfo->iStatus=CTelephony::EStatusBlocked;
       
  1134 				break;
       
  1135 			default:
       
  1136 				iISVPin2LockInfo->iStatus=CTelephony::EStatusLockUnknown;
       
  1137 				break;
       
  1138 				}
       
  1139 			
       
  1140 			switch(iMMLockInfo.iSetting)
       
  1141 				{
       
  1142 			case RMobilePhone::ELockSetEnabled:
       
  1143 				iISVPin2LockInfo->iSetting=CTelephony::ELockSetEnabled;
       
  1144 				break;
       
  1145 			case RMobilePhone::ELockSetDisabled:
       
  1146 				iISVPin2LockInfo->iSetting=CTelephony::ELockSetDisabled;
       
  1147 				break;
       
  1148 			default:
       
  1149 				iISVPin2LockInfo->iSetting=CTelephony::ELockSetUnknown;
       
  1150 				}
       
  1151 			iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::ENotifyPin2LockInfo,  KErrNone);
       
  1152 			}
       
  1153 		}
       
  1154 	else
       
  1155 		{
       
  1156 		if (iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::ENotifyPin1LockInfo))
       
  1157 			{
       
  1158 			iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::ENotifyPin1LockInfo,  iStatus.Int());
       
  1159 			}
       
  1160 		
       
  1161 		if (iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::ENotifyPin2LockInfo))
       
  1162 			{
       
  1163 			iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::ENotifyPin2LockInfo,  iStatus.Int());
       
  1164 			}
       
  1165 		}
       
  1166 	if ((iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::ENotifyPin1LockInfo)) || (iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::ENotifyPin2LockInfo)))
       
  1167 		{
       
  1168 		iTelephonyFunctions->Phone()->NotifyLockInfoChange(iStatus, iMMLock, iMMLockInfoV1Pckg);
       
  1169 		SetActive();
       
  1170 		}
       
  1171 	}
       
  1172 
       
  1173 
       
  1174 TInt CNotifyIccLockInfoAct::RunError(TInt aLeaveCode)
       
  1175 /**
       
  1176 Handle any Leave() from inside RunL().
       
  1177 
       
  1178 @param	aLeaveCode	passed in if RunL Leaves.
       
  1179 @return	KErrNone.
       
  1180 */
       
  1181 	{
       
  1182 	if (iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::ENotifyPin1LockInfo))
       
  1183 		{
       
  1184 		iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::ENotifyPin1LockInfo,  aLeaveCode);
       
  1185 		}
       
  1186 	
       
  1187 	if (iTelephonyFunctions->IsRequestPending(CTelephonyFunctions::ENotifyPin2LockInfo))
       
  1188 		{
       
  1189 		iTelephonyFunctions->CompleteRequest(CTelephonyFunctions::ENotifyPin2LockInfo,  aLeaveCode);
       
  1190 		}
       
  1191 	return KErrNone;	// to ActiveScheduler.
       
  1192 	}
       
  1193 
       
  1194 void CNotifyIccLockInfoAct::DoCancel()
       
  1195 /**
       
  1196 Cancel request.
       
  1197 
       
  1198 Async request to dial is cancelled.
       
  1199 */
       
  1200 	{
       
  1201 	iTelephonyFunctions->Phone()->CancelAsyncRequest(EMobilePhoneNotifyLockInfoChange);
       
  1202 	}
       
  1203 
       
  1204 
       
  1205 CNotifyIccLockInfoAct::CNotifyIccLockInfoAct(CTelephonyFunctions* aTelephonyFunctions)
       
  1206 : CAsyncRequestBaseAct(),
       
  1207   iTelephonyFunctions(aTelephonyFunctions),
       
  1208   iMMLockInfoV1Pckg(iMMLockInfo)
       
  1209 /**
       
  1210 First-phase constructor which cannot Leave().
       
  1211 
       
  1212 @param	aTelephonyFunctions Object that constructs us.
       
  1213 */
       
  1214 	{
       
  1215 	}
       
  1216