diff -r ebc84c812384 -r 46218c8b8afa Symbian3/PDK/Source/GUID-CC5A1C8D-55AA-5FAE-A446-4CBF949C9003.dita --- a/Symbian3/PDK/Source/GUID-CC5A1C8D-55AA-5FAE-A446-4CBF949C9003.dita Thu Mar 11 15:24:26 2010 +0000 +++ b/Symbian3/PDK/Source/GUID-CC5A1C8D-55AA-5FAE-A446-4CBF949C9003.dita Thu Mar 11 18:02:22 2010 +0000 @@ -1,61 +1,61 @@ - - - - - -Subscriber Identity Tutorial This tutorial describes how an application gets the subscriber identification information. create a new instance of the CTelephony use CTelephony::GetSubscriberId() to get the IMSI number the function returns the IMSI in a CTelephony::TSubscriberIdV1 object pass the enumeration CTelephony::EGetSubscriberIdCancel to cancel the asynchronous request. Subscriber identity example #include <e32base.h> -#include <Etel3rdParty.h> - -class CClientApp : public CActive - { - -private: - CTelephony* iTelephony; - CTelephony::TSubscriberIdV1 iSubscriberIdV1; - CTelephony::TSubscriberIdV1Pckg iSubscriberIdV1Pckg; - -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), - iSubscriberIdV1Pckg(iSubscriberIdV1) - { - //default constructor - } - -void CClientApp::SomeFunction() - { - iTelephony->GetSubscriberId(iStatus, iSubscriberIdV1Pckg); - SetActive(); - } - -void CClientApp::RunL() - { - if(iStatus==KErrNone) - { - TBuf<CTelephony::KIMSISize> suscriberId = iSubscriberIdV1.iSubscriberId; - } - } - -void CClientApp::DoCancel() - { - iTelephony->CancelAsync(CTelephony::EGetSubscriberIdCancel); + + + + + +Subscriber Identity Tutorial This tutorial describes how an application gets the subscriber identification information. create a new instance of the CTelephony use CTelephony::GetSubscriberId() to get the IMSI number the function returns the IMSI in a CTelephony::TSubscriberIdV1 object pass the enumeration CTelephony::EGetSubscriberIdCancel to cancel the asynchronous request. Subscriber identity example #include <e32base.h> +#include <Etel3rdParty.h> + +class CClientApp : public CActive + { + +private: + CTelephony* iTelephony; + CTelephony::TSubscriberIdV1 iSubscriberIdV1; + CTelephony::TSubscriberIdV1Pckg iSubscriberIdV1Pckg; + +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), + iSubscriberIdV1Pckg(iSubscriberIdV1) + { + //default constructor + } + +void CClientApp::SomeFunction() + { + iTelephony->GetSubscriberId(iStatus, iSubscriberIdV1Pckg); + SetActive(); + } + +void CClientApp::RunL() + { + if(iStatus==KErrNone) + { + TBuf<CTelephony::KIMSISize> suscriberId = iSubscriberIdV1.iSubscriberId; + } + } + +void CClientApp::DoCancel() + { + iTelephony->CancelAsync(CTelephony::EGetSubscriberIdCancel); } \ No newline at end of file