diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-5E10D5B7-C407-51E0-8C16-466A8BC89106.dita --- a/Symbian3/PDK/Source/GUID-5E10D5B7-C407-51E0-8C16-466A8BC89106.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-5E10D5B7-C407-51E0-8C16-466A8BC89106.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,63 +1,63 @@ - - - - - -Phone Identification TutorialThis tutorial describes how to retrieve the phone identification parameters from the device.

The phone idenitifcation is returned in a packaged CTelephony::TPhoneIdV1. It contains the following member variables, each a TBuf descriptor of up to 50 characters:

  • Manufacturer

  • Model

  • Serial Number, the IMEI or ESN serial number. It identifies the phone, not the subscriber using the phone.

create an instance of CTelephony with an active object set the active object with SetActive() function use CTelephony::GetPhoneId() to get the phone identification parameters use CTelephony::EGetPhoneIdCancel to cancel the asynchronous call. Phone Identification example #include <e32base.h> -#include <Etel3rdParty.h> - -class CClientApp : public CActive - { - -private: - CTelephony* iTelephony; - CTelephony::TPhoneIdV1 iPhoneIdV1; - CTelephony::TPhoneIdV1Pckg iPhoneIdV1Pckg; - -public: - CClientApp(CTelephony* aTelephony); - void SomeFunction(); - -private: - /* - These are the pure virtual methods from CActive that - MUST be implemented by all active objects - */ - void RunL(); - void DoCancel(); - }; - -CClientApp::CClientApp(CTelephony* aTelephony) - : CActive(EPriorityStandard), - iTelephony(aTelephony), - iPhoneIdV1Pckg(iPhoneIdV1) - { - //default constructor - } - -void CClientApp::SomeFunction() - { - iTelephony->GetPhoneId(iStatus, iPhoneIdV1Pckg); - SetActive(); - } - -void CClientApp::RunL() - { - if(iStatus==KErrNone) - { - TBuf<CTelephony::KPhoneManufacturerIdSize> manufacturer = iPhoneIdV1.iManufacturer; - TBuf<CTelephony::KPhoneModelIdSize> model = iPhoneIdV1.iModel; - TBuf<CTelephony::KPhoneSerialNumberSize> serialNumber = iPhoneIdV1.iSerialNumber; - } - } - -void CClientApp::DoCancel() - { - iTelephony->CancelAsync(CTelephony::EGetPhoneIdCancel); + + + + + +Phone Identification TutorialThis tutorial describes how to retrieve the phone identification parameters from the device.

The phone idenitifcation is returned in a packaged CTelephony::TPhoneIdV1. It contains the following member variables, each a TBuf descriptor of up to 50 characters:

  • Manufacturer

  • Model

  • Serial Number, the IMEI or ESN serial number. It identifies the phone, not the subscriber using the phone.

create an instance of CTelephony with an active object set the active object with SetActive() function use CTelephony::GetPhoneId() to get the phone identification parameters use CTelephony::EGetPhoneIdCancel to cancel the asynchronous call. Phone Identification example #include <e32base.h> +#include <Etel3rdParty.h> + +class CClientApp : public CActive + { + +private: + CTelephony* iTelephony; + CTelephony::TPhoneIdV1 iPhoneIdV1; + CTelephony::TPhoneIdV1Pckg iPhoneIdV1Pckg; + +public: + CClientApp(CTelephony* aTelephony); + void SomeFunction(); + +private: + /* + These are the pure virtual methods from CActive that + MUST be implemented by all active objects + */ + void RunL(); + void DoCancel(); + }; + +CClientApp::CClientApp(CTelephony* aTelephony) + : CActive(EPriorityStandard), + iTelephony(aTelephony), + iPhoneIdV1Pckg(iPhoneIdV1) + { + //default constructor + } + +void CClientApp::SomeFunction() + { + iTelephony->GetPhoneId(iStatus, iPhoneIdV1Pckg); + SetActive(); + } + +void CClientApp::RunL() + { + if(iStatus==KErrNone) + { + TBuf<CTelephony::KPhoneManufacturerIdSize> manufacturer = iPhoneIdV1.iManufacturer; + TBuf<CTelephony::KPhoneModelIdSize> model = iPhoneIdV1.iModel; + TBuf<CTelephony::KPhoneSerialNumberSize> serialNumber = iPhoneIdV1.iSerialNumber; + } + } + +void CClientApp::DoCancel() + { + iTelephony->CancelAsync(CTelephony::EGetPhoneIdCancel); }
\ No newline at end of file