diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-FDD3B60E-EC8B-53EF-9091-B8E7090A2F28.dita --- a/Symbian3/PDK/Source/GUID-FDD3B60E-EC8B-53EF-9091-B8E7090A2F28.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-FDD3B60E-EC8B-53EF-9091-B8E7090A2F28.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,64 +1,64 @@ - - - - - -Phone -Lock Settings TutorialThis tutorial describes how to get and set the phone locks using -the RMobilePhone functions. - - - - - - - -Use RMobilePhone::GetLockInfo() to -get the current phone lock setting. - -The lock is specified by a RMobilePhone::TMobilePhoneLock flag. - -Use RMobilePhone::NotifyLockInfoChange() to -get the notification of any changes in lock settings. - -Use RMobilePhone::SetLockSetting() to -set a phone lock. - - -

Information about a lock status whether the lock is on or off, -and the setting lock enabled or disabled is encapsulated in an RMobilePhone::TMobilePhoneLockInfoV1 object. -An enabled lock setting means that the lock is active and can be locked or -unlocked if the user enters the security code. If the lock is enabled, it -returns to the locked state if certain event such as the phone power down -occurs.

-Phone lock example

The following code checks if -phone lock information can be accessed and get that information. The example -code also checks if the phone lock is enabled.

The code assumes iMobilePhone is -an RMobilePhone object.

TUint32 securityCaps; -User::LeaveIfError(iMobilePhone.GetSecurityCaps(securityCaps)); - -if (securityCaps & RMobilePhone::KCapsLockPhone) - { - RMobilePhone::TMobilePhoneLockInfoV1 lockInfo; - RMobilePhone::TMobilePhoneLockInfoV1Pckg lockInfoPckg(lockInfo); - - RMobilePhone::TMobilePhoneLock lock = RMobilePhone::ELockPhoneDevice; - - TRequestStatus status; - - iMobilePhone.GetLockInfo(status, lock, lockInfoPckg); - User::WaitForRequest(status); - User::LeaveIfError(status.Int()); - - if (lockInfo.iStatus == RMobilePhone::EStatusLocked) - { - //do something - } -
+ + + + + +Phone +Lock Settings TutorialThis tutorial describes how to get and set the phone locks using +the RMobilePhone functions. + + + + + + + +Use RMobilePhone::GetLockInfo() to +get the current phone lock setting. + +The lock is specified by a RMobilePhone::TMobilePhoneLock flag. + +Use RMobilePhone::NotifyLockInfoChange() to +get the notification of any changes in lock settings. + +Use RMobilePhone::SetLockSetting() to +set a phone lock. + + +

Information about a lock status whether the lock is on or off, +and the setting lock enabled or disabled is encapsulated in an RMobilePhone::TMobilePhoneLockInfoV1 object. +An enabled lock setting means that the lock is active and can be locked or +unlocked if the user enters the security code. If the lock is enabled, it +returns to the locked state if certain event such as the phone power down +occurs.

+Phone lock example

The following code checks if +phone lock information can be accessed and get that information. The example +code also checks if the phone lock is enabled.

The code assumes iMobilePhone is +an RMobilePhone object.

TUint32 securityCaps; +User::LeaveIfError(iMobilePhone.GetSecurityCaps(securityCaps)); + +if (securityCaps & RMobilePhone::KCapsLockPhone) + { + RMobilePhone::TMobilePhoneLockInfoV1 lockInfo; + RMobilePhone::TMobilePhoneLockInfoV1Pckg lockInfoPckg(lockInfo); + + RMobilePhone::TMobilePhoneLock lock = RMobilePhone::ELockPhoneDevice; + + TRequestStatus status; + + iMobilePhone.GetLockInfo(status, lock, lockInfoPckg); + User::WaitForRequest(status); + User::LeaveIfError(status.Int()); + + if (lockInfo.iStatus == RMobilePhone::EStatusLocked) + { + //do something + } +
\ No newline at end of file