Call Waiting Status Tutorial

This tutorial describes how to get the call waiting status information with the telephony API for applications.


  1. create a new instance of CTelephony

  2. call CTelephony::GetCallWaitingStatus() to get the call waiting information

  3. you can cancel the asynchronous request with a CTelephony::EGetCallWaitingStatusCancel enumeration.

Call waiting status example

       
        
       
       #include <e32base.h>
#include <Etel3rdParty.h>

class CClientApp : public CActive
    { 

private:
    CTelephony* iTelephony;
    CTelephony::TCallWaitingSupplServicesV1 iCallWaitingSupplServicesV1;
    CTelephony::TCallWaitingSupplServicesV1Pckg iCallWaitingSupplServicesV1Pckg;

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),
      iCallWaitingSupplServicesV1Pckg(iCallWaitingSupplServicesV1)
    {
    //default constructor
    }

void CClientApp::SomeFunction()
    {
    iTelephony->GetCallWaitingStatus(iStatus, iCallWaitingSupplServicesV1Pckg);
    SetActive();
    }

void CClientApp::RunL()
    {
    if(iStatus==KErrNone)
       {
       CTelephony::TSupplServiceStatus callWaitingStatus = iCallWaitingSupplServicesV1.iCallWaiting;
       }
    }

void CClientApp::DoCancel()
    {
    iTelephony->CancelAsync(CTelephony::EGetCallWaitingStatusCancel);
    }