diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-C48890DD-BBFD-53FA-95D6-7F39D9C3C263.dita --- a/Symbian3/PDK/Source/GUID-C48890DD-BBFD-53FA-95D6-7F39D9C3C263.dita Tue Mar 30 11:42:04 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-C48890DD-BBFD-53FA-95D6-7F39D9C3C263.dita Tue Mar 30 11:56:28 2010 +0100 @@ -1,63 +1,63 @@ - - - - - -Current Network Information Tutorial This tutorial describes how to get the current network information with the telephony API for applications. create a new instance of CTelephony use CTelephony::GetCurrentNetworkInfo() to get the current network information use CTelephony::EGetCurrentNetworkInfoCancel to cancel the asynchronous request use CTelephony::ECurrentNetworkInfoChange to get the notification of any changes to the current network information pass the enumeration CTelephony::ECurrentNetworkInfoChangeCancel to cancel the notification request. Current network information example #include <e32base.h> -#include <Etel3rdParty.h> - -class CClientApp : public CActive - { - -private: - CTelephony* iTelephony; - CTelephony::TNetworkInfoV1 iNetworkInfoV1; - CTelephony::TNetworkInfoV1Pckg iNetworkInfoV1Pckg; - -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), - iNetworkInfoV1Pckg(iNetworkInfoV1) - { - //default constructor - } - -void CClientApp::SomeFunction() - { - iTelephony->GetCurrentNetworkInfo(iStatus, iNetworkInfoV1Pckg); - SetActive(); - } - -void CClientApp::RunL() - { - if(iStatus==KErrNone) - { - CTelephony::TNetworkMode mode = iNetworkInfoV1.iMode; - if((mode == CTelephony::ENetworkModeCdma2000) || (mode == CTelephony::ENetworkModeCdma95)) - {} // CDMA network; process CDMA-specific information - } - } - -void CClientApp::DoCancel() - { - iTelephony->CancelAsync(CTelephony::EGetCurrentNetworkInfoCancel); + + + + + +Current Network Information Tutorial This tutorial describes how to get the current network information with the telephony API for applications. create a new instance of CTelephony use CTelephony::GetCurrentNetworkInfo() to get the current network information use CTelephony::EGetCurrentNetworkInfoCancel to cancel the asynchronous request use CTelephony::ECurrentNetworkInfoChange to get the notification of any changes to the current network information pass the enumeration CTelephony::ECurrentNetworkInfoChangeCancel to cancel the notification request. Current network information example #include <e32base.h> +#include <Etel3rdParty.h> + +class CClientApp : public CActive + { + +private: + CTelephony* iTelephony; + CTelephony::TNetworkInfoV1 iNetworkInfoV1; + CTelephony::TNetworkInfoV1Pckg iNetworkInfoV1Pckg; + +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), + iNetworkInfoV1Pckg(iNetworkInfoV1) + { + //default constructor + } + +void CClientApp::SomeFunction() + { + iTelephony->GetCurrentNetworkInfo(iStatus, iNetworkInfoV1Pckg); + SetActive(); + } + +void CClientApp::RunL() + { + if(iStatus==KErrNone) + { + CTelephony::TNetworkMode mode = iNetworkInfoV1.iMode; + if((mode == CTelephony::ENetworkModeCdma2000) || (mode == CTelephony::ENetworkModeCdma95)) + {} // CDMA network; process CDMA-specific information + } + } + +void CClientApp::DoCancel() + { + iTelephony->CancelAsync(CTelephony::EGetCurrentNetworkInfoCancel); } \ No newline at end of file