diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-AC5665B4-8E33-58A3-824B-6CC40E13160A.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-AC5665B4-8E33-58A3-824B-6CC40E13160A.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,62 @@ + + + + + +Signal Strength Information TutorialThis tutorial describes how to get the signal strength information with the telephony API for applications. create a new instance of CTelephony use CTelephony::GetSignalStrength() to get the signal strength information you can cancel the asynchronous request with a EGetSignalStrengthCancel pass the enumeration CTelephony::ESignalStrengthChange to get the notification of any changes to the signal strength information pass the enumeration CTelephony::ESignalStrengthChangeCancel to cancel the notification request. Signal strength example #include <e32base.h> +#include <Etel3rdParty.h> + +class CClientApp : public CActive + { + +private: + CTelephony* iTelephony; + CTelephony::TSignalStrengthV1 iSigStrengthV1; + CTelephony::TSignalStrengthV1Pckg iSigStrengthV1Pckg; + +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), + iSigStrengthV1Pckg(iSigStrengthV1) + { + //default constructor + } + +void CClientApp::SomeFunction() + { + iTelephony->GetSignalStrength(iStatus, iSigStrengthV1Pckg); + SetActive(); + } + +void CClientApp::RunL() + { + if(iStatus==KErrNone) + { + TInt32 sigStrength = iSigStrengthV1.iSignalStrength; + TInt8 bar = iSigStrengthV1.iBar; + } + } + +void CClientApp::DoCancel() + { + iTelephony->CancelAsync(CTelephony::EGetSignalStrengthCancel); + } \ No newline at end of file