MCchUi Class Reference

class MCchUi

Virtual interface of cchui.

        // One way to use CCHUI API is to configure which notes it shows
   // and after that do normal enable through CCH
   iCch = CCch::NewL();
   
   // Allow connectivity notes to be shown when enabling service
   iCch->SetConnectivityDialogsAllowed( ETrue );
 
   // Get handle to cchui api
   iCchUi = &iCch->CchUiApi(); // iCchUi is pointer to MCchUi
 
   // Set observer to listen cchui events.
   iCchUi->AddObserverL( *this );  // parameter is MCchUiObserver
   
   // Configure CCHUI API to show all notes/dialogs except connecting note.
   // Also configure that only VoIP and IM subservices are allowed (notes are
   // shown only for those).
   RArray<MCchUiObserver::TCchUiDialogType> allowedNotes;
   RArray<MCchUiObserver::TCchUiDialogType> allowedSubServices;
   CleanupClosePushL( allowedNotes );
   CleanupClosePushL( allowedSubServices );
 
   allowedNotes.AppendL( MCchUiObserver::ECchUiDialogTypeAuthenticationFailed );
   allowedNotes.AppendL( MCchUiObserver::ECchUiDialogTypeNoConnectionDefined );
   allowedNotes.AppendL( MCchUiObserver::ECchUiDialogTypeNoConnectionAvailable );
   allowedNotes.AppendL( MCchUiObserver::ECchUiDialogTypeChangeConnection );
   allowedNotes.AppendL( MCchUiObserver::ECchUiDialogTypeDefectiveSettings );     
   
   allowedSubServices.AppendL( ECCHVoIPSub );
   allowedSubServices.AppendL( ECCHIMSub );
 
   iCchUi->ConfigureVisualizationL( 
       allowedNotes, allowedSubServices );
   
   CleanupStack::PopAndDestroy( &allowedNotes );
   
   CCchService* service = iCch->GetService( serviceId );
   service->Enable( ECCHUnknown );
 
 
 
 
   // Another way to use CCHUI API is to just show specific notes.
   iCch = CCch::NewL();
   
   // Get handle to cchui api
   iCchUi = &iCch->CchUiApi(); // iCchUi is pointer to MCchUi
 
   // Set observer to listen cchui events.
   iCchUi->AddObserverL( *this );  // parameter is MCchUiObserver
 
   // Show connecting dialog.
   iCchUi->ShowDialogL( 
       serviceId, 
       MCchUiObserver::ECchUiDialogTypeConnecting );
 
   // disable note by cancelling
   iCchUi->CancelNotes();
 
   // Remove observer
   iCchUi->RemoveObserver();
       
cch.lib
Since
S60 5.0

Constructor & Destructor Documentation

~MCchUi()

~MCchUi ( ) [inline, virtual]

destructor

Member Functions Documentation

AddObserverL(MCchUiObserver &)

void AddObserverL ( MCchUiObserver & aObserver ) [pure virtual]

Adds observer for listening cchui events.

Since
S60 5.0

Parameters

MCchUiObserver & aObserver Event observing class

CancelNotes()

void CancelNotes ( ) [pure virtual]

Cancels all notes shown by CCH UI. If there is nothing to dismiss, call to this method does nothing.

Since
S60 5.0

ConfigureVisualizationL(RArray< MCchUiObserver::TCchUiDialogType > &, RArray< TCCHSubserviceType > &)

void ConfigureVisualizationL ( RArray < MCchUiObserver::TCchUiDialogType > & aAllowedNotes,
RArray < TCCHSubserviceType > & aAllowedSubServices
) [pure virtual]

Allows client to configure visualization of connectivity events. This only effects the automatically shown connectivity notes. Client can still use seperate methods in this API to show specific notes by itself.

By default all notes are allowed.

Since
S60 5.0

Parameters

RArray < MCchUiObserver::TCchUiDialogType > & aAllowedNotes array of allowed notes
RArray < TCCHSubserviceType > & aAllowedSubServices

RemoveObserver(MCchUiObserver &)

void RemoveObserver ( MCchUiObserver & aObserver ) [pure virtual]

Removes the observer of cchui events.

Since
S60 5.0

Parameters

MCchUiObserver & aObserver Event observing class

Reserved1()

void Reserved1 ( ) [pure virtual]

Reserved for future use.

Since
S60 5.0

Reserved2()

void Reserved2 ( ) [pure virtual]

Reserved for future use.

Since
S60 5.0

ShowDialogL(TUint32, MCchUiObserver::TCchUiDialogType)

void ShowDialogL ( TUint32 aServiceId,
MCchUiObserver::TCchUiDialogType aDialog
) [pure virtual]

Shows global note/dialog. See observer definition for available notes.

Since
S60 5.0
leave
KErrAlreadyExists Failed to show dialog because another note already shown.

Parameters

TUint32 aServiceId service id of the service that the dialog is shown for. Service id is used to fetch service specific data.
MCchUiObserver::TCchUiDialogType aDialog defines which dialog is shown.