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 & aCallBackA reference to the callback for Network registration status observer

~CDiagNetworkRegStatusWatcher()

IMPORT_C~CDiagNetworkRegStatusWatcher()[virtual]

Default C++ virtual destructor

Member Functions Documentation

ConstructL()

voidConstructL()[private]

Symbian C++ 2nd phase constructor.

DoCancel()

voidDoCancel()[private, virtual]

Handle active object cancel event.

HandleInitialStatusL()

voidHandleInitialStatusL()[private]

Handler for the internal state EStateWaitForInitialStatus

HandleNetworkStatusChangeL()

voidHandleNetworkStatusChangeL()[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 & aCallBackA reference to the callback for this network registration status watcher

RunL()

voidRunL()[private, virtual]

Handle active object completion event.

StartObserver()

IMPORT_C voidStartObserver()

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 voidStopObserver()

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.