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 & aObserverObserver to be notified when status changes.

~CVccCchMonitor()

~CVccCchMonitor()[virtual]

Destructor.

Member Functions Documentation

ConstructL()

voidConstructL()[private]

Symbian constructor

Since
S60 v3.2

DisableService()

voidDisableService()

Disable the service and stop monitoring the service state

Since
S60 v3.2

DoEnableServiceL()

voidDoEnableServiceL()[private]

Enable the service (assioated to the iCchService)

Since
S60 v3.2

EnableServiceL()

voidEnableServiceL()

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 & aObserverObserver to be notified when status changes

NotifyObserver()

voidNotifyObserver()[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 &)

voidServiceStatusChanged(TIntaServiceId,
TCCHSubserviceTypeaType,
const TCchServiceStatus &aServiceStatus
)

From MCchServiceStatusObserver Signaled when service status or error changes

Parameters

TInt aServiceIdId of the service
TCCHSubserviceType aTypeService type
const TCchServiceStatus & aServiceStatusService 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]