diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-0703C141-17C7-5918-9CF3-EF6CD408975B.dita --- a/Symbian3/PDK/Source/GUID-0703C141-17C7-5918-9CF3-EF6CD408975B.dita Tue Mar 30 11:42:04 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-0703C141-17C7-5918-9CF3-EF6CD408975B.dita Tue Mar 30 11:56:28 2010 +0100 @@ -1,56 +1,54 @@ - - - - - -Phone -Security Code TutorialThis tutorial describes how to set the security code in a Symbian -OS device. - - -

A security code controls access to the phone and can take a number -of - forms, such as a phone password, or SIM PIN number. Phone security functions -use an RMobilePhone::TMobilePhoneSecurityCode flag to - specify the type of the code. -

- -To set a security -code, use RMobilePhone::ChangeSecurityCode(). -This takes a RMobilePhone::TMobilePhonePasswordChangeV1 object -containing the old and new values. - -To verify an entered -code against the specified stored security code, use RMobilePhone::VerifySecurityCode(). - -To inform the phone -that the user has cancelled a request for a security code to be entered, use RMobilePhone::AbortSecurityCode(). - - -Phone security code example

The following code -takes the parameters for old and new password values, and changes the phone -password.

The code assumes iMobilePhone is an RMobilePhone object.

void CClass::SetPasswordL(const TDesC& aOldPassword, const TDesC& aNewPassword) - { - TUint32 securityCaps; - User::LeaveIfError(iMobilePhone.GetSecurityCaps(securityCaps)); - - if (securityCaps & RMobilePhone::KCapsLockPhone) - { - RMobilePhone::TMobilePhonePasswordChangeV1 passwordChange; - passwordChange.iOldPassword = aOldPassword; - passwordChange.iNewPassword = aNewPassword; - RMobilePhone::TMobilePhoneSecurityCode securityCode = RMobilePhone::ESecurityCodePhonePassword; - TRequestStatus status; - iMobilePhone.ChangeSecurityCode(status, securityCode, passwordChange); - User::WaitForRequest(status); - User::LeaveIfError(status.Int()); - } - } -
+ + + + + +Phone +Security Code TutorialThis tutorial describes how to set the security code in a Symbian +platform device. + + +

A security code controls access to the phone and can take a number +of forms, such as a phone password, or SIM PIN number. Phone security functions +use an RMobilePhone::TMobilePhoneSecurityCode flag to +specify the type of the code.

+ +To set a security +code, use RMobilePhone::ChangeSecurityCode(). +This takes a RMobilePhone::TMobilePhonePasswordChangeV1 object +containing the old and new values. + +To verify an entered +code against the specified stored security code, use RMobilePhone::VerifySecurityCode(). + +To inform the phone +that the user has cancelled a request for a security code to be entered, use RMobilePhone::AbortSecurityCode(). + + +Phone security code example

The following code +takes the parameters for old and new password values, and changes the phone +password.

The code assumes iMobilePhone is an RMobilePhone object.

void CClass::SetPasswordL(const TDesC& aOldPassword, const TDesC& aNewPassword) + { + TUint32 securityCaps; + User::LeaveIfError(iMobilePhone.GetSecurityCaps(securityCaps)); + + if (securityCaps & RMobilePhone::KCapsLockPhone) + { + RMobilePhone::TMobilePhonePasswordChangeV1 passwordChange; + passwordChange.iOldPassword = aOldPassword; + passwordChange.iNewPassword = aNewPassword; + RMobilePhone::TMobilePhoneSecurityCode securityCode = RMobilePhone::ESecurityCodePhonePassword; + TRequestStatus status; + iMobilePhone.ChangeSecurityCode(status, securityCode, passwordChange); + User::WaitForRequest(status); + User::LeaveIfError(status.Int()); + } + } +
\ No newline at end of file