CDiagNetworkRegStatusWatcher Class Reference

class CDiagNetworkRegStatusWatcher : public CActive

Diagnostics Network registration status watcher

This class can be used as an observer for network status. After instantiating the class and calling StartObserver() , the class firstly informs the client of the current registration status and then goes into an observing mode for any changes in the network registration status.

Inherits from

Constructor & Destructor Documentation

CDiagNetworkRegStatusWatcher(MDiagNetworkRegStatusObserver &)

CDiagNetworkRegStatusWatcher ( MDiagNetworkRegStatusObserver & aCallBack ) [private]

C++ constructor.

Parameters

MDiagNetworkRegStatusObserver & aCallBack A reference to the callback for Network registration status observer

~CDiagNetworkRegStatusWatcher()

IMPORT_C ~CDiagNetworkRegStatusWatcher ( ) [virtual]

Default C++ virtual destructor

Member Functions Documentation

ConstructL()

void ConstructL ( ) [private]

Symbian C++ 2nd phase constructor.

DoCancel()

void DoCancel ( ) [private, virtual]

Handle active object cancel event.

HandleInitialStatusL()

void HandleInitialStatusL ( ) [private]

Handler for the internal state EStateWaitForInitialStatus

HandleNetworkStatusChangeL()

void HandleNetworkStatusChangeL ( ) [private]

Handler for the internal state EStateWaitForStatusChange

IsDeviceRegisteredOnNetwork()

TBool IsDeviceRegisteredOnNetwork ( ) [private]

This function wraps the logic to decide if the device is currently registered or not.

NewL(MDiagNetworkRegStatusObserver &)

IMPORT_C CDiagNetworkRegStatusWatcher * NewL ( MDiagNetworkRegStatusObserver & aCallBack ) [static]

Symbian OS constructor.

Parameters

MDiagNetworkRegStatusObserver & aCallBack A reference to the callback for this network registration status watcher

RunL()

void RunL ( ) [private, virtual]

Handle active object completion event.

StartObserver()

IMPORT_C void StartObserver ( )

This function is used by client to start the watcher. Firstly, the watcher will inform the clients via call MDiagNetworkRegStatusObserver::InitialNetworkRegistrationStatusL() and then go into an observing mode for any changes in the network registration status. The changes status is informed via MDiagNetworkRegStatusObserver::NetworkRegistrationStatusChangeL()

StopObserver()

IMPORT_C void StopObserver ( )

This function is used by client to stop the observer.

Member Enumerations Documentation

Enum TDiagNetwRegStatusWatcherState

States of the Network registration status watcher

Enumerators

EStateInit = 0
EStateWaitForInitialStatus
EStateWaitForStatusChange
EStateStopping

Member Data Documentation

MDiagNetworkRegStatusObserver & iCallBack

MDiagNetworkRegStatusObserver & iCallBack [private]

The callback interface for this instance of Network registration status observer

TBool iPreviouslyRegistered

TBool iPreviouslyRegistered [private]

This variable remembers whether in previous state the the device was registered or not

CTelephony::TNetworkRegistrationV1 iRegV1

CTelephony::TNetworkRegistrationV1 iRegV1 [private]

Defines the current network registration status

CTelephony::TNetworkRegistrationV1Pckg iRegV1Pckg

CTelephony::TNetworkRegistrationV1Pckg iRegV1Pckg [private]

A typedef'd packaged CTelephony::TNetworkRegistrationV1 for passing through a generic API method.

TDiagNetwRegStatusWatcherState iState

TDiagNetwRegStatusWatcherState iState [private]

variable to store the internal state of the network registration status watcher

CTelephony * iTelephony

CTelephony * iTelephony [private]

Interface to phone's telephony system. Own.