diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-2332AFD7-30F2-5B4D-BBA9-3EA36D8F5E81.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-2332AFD7-30F2-5B4D-BBA9-3EA36D8F5E81.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,87 @@ + + + + + +Call +Barring Status This tutorial describes how to get the call barring status information +with the telephony API for applications +

The call barring is a supplementary service. The client applications +can determine the status of the service with the CTelephony functions. +

+ + + + +create a new instance of CTelephony + + +use CTelephony::GetCallBarringStatus() to +get the supplementary services status information. +pass a TCallBarringCondition object. + + +cancel the request with CTelephony::EGetCallBarringStatusCancel enumeration. + + +Call barring +example #include <e32base.h> +#include <Etel3rdParty.h> + +class CClientApp : public CActive + { + +private: + CTelephony* iTelephony; + CTelephony::TCallBarringSupplServicesV1 iCallBarringSupplServicesV1; + CTelephony::TCallBarringSupplServicesV1Pckg iCallBarringSupplServicesV1Pckg; + +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), + iCallBarringSupplServicesV1Pckg(iCallBarringSupplServicesV1) + { + //default constructor + } + +void CClientApp::SomeFunction() + { + CTelephony::TCallBarringCondition condition = CTelephony::EBarAllOutgoing; + iTelephony->GetCallBarringStatus(iStatus, condition, iCallBarringSupplServicesV1Pckg); + SetActive(); + } + +void CClientApp::RunL() + { + if(iStatus==KErrNone) + { + if( iCallBarringSupplServicesV1.iCallBarring == CTelephony::EStatusActive ) + {} // The call barring condition is active; + // all outgoing calls are barred. + } + } + +void CClientApp::DoCancel() + { + iTelephony->CancelAsync(CTelephony::EGetCallBarringStatusCancel); + } +
\ No newline at end of file