CVccCchMonitor Class Reference

class CVccCchMonitor : public CBase

CCH monitor. Uses CCH to enable/disable CCH services.

        MyClass::ConstructL()
       {
       iMyCch = Cch::NewL();

       iMyService = iMyCch->GetService( iMyServiceId );

       User::LeaveIfNull( iMyService );

       iMyService->SetObserver( *this );

       TInt error = iMyService->Enable( iMyServiceType );

       if ( error != KErrNone )
           {
           User::Leave( error );
           }
       }

   MyClass::ServiceStatusChanged(
       TInt aServiceId,
       CCHSubserviceType aType,
       const TCchServiceStatus& aServiceStatus )
       {
       if ( aServiceStatus.Error() != KErrNone )
           {
           HandleError();
           }
       else
           {
           HandleStateChange();
           }
       }

   MyClass::~MyClass()
       {
       iMyService->Disable( iMyServiceType );
       delete iCch;
       }
       
vcchotrigger.dll
Since
S60 v3.2

Inherits from

Constructor & Destructor Documentation

CVccCchMonitor(MVccCchObserver &)

CVccCchMonitor ( MVccCchObserver & aObserver ) [private]

C++ constructor

Since
S60 v3.2

Parameters

MVccCchObserver & aObserver Observer to be notified when status changes.

~CVccCchMonitor()

~CVccCchMonitor ( ) [virtual]

Destructor.

Member Functions Documentation

ConstructL()

void ConstructL ( ) [private]

Symbian constructor

Since
S60 v3.2

DisableService()

void DisableService ( )

Disable the service and stop monitoring the service state

Since
S60 v3.2

DoEnableServiceL()

void DoEnableServiceL ( ) [private]

Enable the service (assioated to the iCchService)

Since
S60 v3.2

EnableServiceL()

void EnableServiceL ( )

Enable the service and start monitoring the service state.

Since
S60 v3.2

NewL(MVccCchObserver &)

CVccCchMonitor * NewL ( MVccCchObserver & aObserver ) [static]

Two-phased constructor.

Parameters

MVccCchObserver & aObserver Observer to be notified when status changes

NotifyObserver()

void NotifyObserver ( ) [private]

Notify observer about CCH service status has changed.

Since
S60 v3.2

ServiceStatus()

MVccCchObserver::TServiceStatus ServiceStatus ( ) const

Get the last state of the CCH service.

Since
S60 v3.2

ServiceStatusChanged(TInt, TCCHSubserviceType, const TCchServiceStatus &)

void ServiceStatusChanged ( TInt aServiceId,
TCCHSubserviceType aType,
const TCchServiceStatus & aServiceStatus
)

From MCchServiceStatusObserver Signaled when service status or error changes

Parameters

TInt aServiceId Id of the service
TCCHSubserviceType aType Service type
const TCchServiceStatus & aServiceStatus Service status

Member Data Documentation

CCch * iCch

CCch * iCch [private]

CCchService * iCchService

CCchService * iCchService [private]

TCCHSubserviceState iCurrentCchState

TCCHSubserviceState iCurrentCchState [private]

The last state of the CCH service.

MVccCchObserver::TServiceStatus iCurrentStatus

MVccCchObserver::TServiceStatus iCurrentStatus [private]

TBool iDisableService

TBool iDisableService [private]

TInt iLastCchError

TInt iLastCchError [private]

The last error received from the CCH service

TBool iNotifyObserver

TBool iNotifyObserver [private]

Should our obsever to be notified ETrue: yes, EFalse: no.

MVccCchObserver & iObserver

MVccCchObserver & iObserver [private]

Our observer. Not own

TInt iServiceId

TInt iServiceId [private]

Service id of the VoIP we are using

TBool iServiceReserved

TBool iServiceReserved [private]