This tutorial describes how to get the call forward status information with the telephony API for applications.
#include <e32base.h> #include <Etel3rdParty.h> class CClientApp : public CActive { private: CTelephony* iTelephony; CTelephony::TCallForwardingSupplServicesV1 iCallForwardingSupplServicesV1; CTelephony::TCallForwardingSupplServicesV1Pckg iCallForwardingSupplServicesV1Pckg; 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), iCallForwardingSupplServicesV1Pckg(iCallForwardingSupplServicesV1) { //default constructor } void CClientApp::SomeFunction() { CTelephony::TCallForwardingCondition condition = CTelephony::ECallForwardingNoReply; iTelephony->GetCallForwardingStatus(iStatus, condition, iCallForwardingSupplServicesV1Pckg); SetActive(); } void CClientApp::RunL() { if(iStatus==KErrNone) { if( iCallForwardingSupplServicesV1.iCallForwarding == CTelephony::ENotActive ) {} // The call forwarding condition is inactive; // If the phone user does not answer a call then the call is _not_ forwarded } } void CClientApp::DoCancel() { iTelephony->CancelAsync(CTelephony::EGetCallForwardingStatusCancel); }