diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-9EE405E2-2D58-525B-8C33-B1EAC0C5A71A.dita --- a/Symbian3/PDK/Source/GUID-9EE405E2-2D58-525B-8C33-B1EAC0C5A71A.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-9EE405E2-2D58-525B-8C33-B1EAC0C5A71A.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,70 +1,70 @@ - - - - - -Network Signal Status Tutorial This tutorial describes how to get the network signal status with the telephony API for applications. create new instance of CTelephony use CTelephony::GetIndicator() to get the network signal status information you can cancel the asynchronous request with a EGetIndicatorCancel object use the enumerationEIndicatorChange to get the notification of any changes to the network signal status cancel the notification request with EIndicatorChangeCancel enumeration. Network signal status example #include <e32base.h> -#include <Etel3rdParty.h> - -class CClientApp : public CActive - { - -private: - CTelephony* iTelephony; - CTelephony::TIndicatorV1 iIndicatorV1; - CTelephony::TIndicatorV1Pckg iIndicatorV1Pckg; - -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), - iIndicatorV1Pckg(iIndicatorV1) - { - //default constructor - } - -void CClientApp::SomeFunction() - { - iTelephony->GetIndicator(iStatus, iIndicatorV1Pckg); - SetActive(); - } - -void CClientApp::RunL() - { - if(iStatus==KErrNone) - { - if(iIndicatorV1.iCapabilities & CTelephony::KIndNetworkAvailable) - { - // We can detect when a network is present - if(iIndicatorV1.iIndicator & CTelephony::KIndNetworkAvailable) - {} // Network is present - else - {} // Network is no present - } - else - {} // We do not know whether a network is present - } - } - -void CClientApp::DoCancel() - { - iTelephony->CancelAsync(CTelephony::EGetIndicatorCancel); + + + + + +Network Signal Status Tutorial This tutorial describes how to get the network signal status with the telephony API for applications. create new instance of CTelephony use CTelephony::GetIndicator() to get the network signal status information you can cancel the asynchronous request with a EGetIndicatorCancel object use the enumerationEIndicatorChange to get the notification of any changes to the network signal status cancel the notification request with EIndicatorChangeCancel enumeration. Network signal status example #include <e32base.h> +#include <Etel3rdParty.h> + +class CClientApp : public CActive + { + +private: + CTelephony* iTelephony; + CTelephony::TIndicatorV1 iIndicatorV1; + CTelephony::TIndicatorV1Pckg iIndicatorV1Pckg; + +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), + iIndicatorV1Pckg(iIndicatorV1) + { + //default constructor + } + +void CClientApp::SomeFunction() + { + iTelephony->GetIndicator(iStatus, iIndicatorV1Pckg); + SetActive(); + } + +void CClientApp::RunL() + { + if(iStatus==KErrNone) + { + if(iIndicatorV1.iCapabilities & CTelephony::KIndNetworkAvailable) + { + // We can detect when a network is present + if(iIndicatorV1.iIndicator & CTelephony::KIndNetworkAvailable) + {} // Network is present + else + {} // Network is no present + } + else + {} // We do not know whether a network is present + } + } + +void CClientApp::DoCancel() + { + iTelephony->CancelAsync(CTelephony::EGetIndicatorCancel); } \ No newline at end of file