How to use the System State Monitor API

The SIP System State Monitor ECOM plug-in must implement the following virtual functions defined in abstract base class CSIPSystemStateMonitor found in sipsystemstatemonitor.h file to access the SIP stack:

  • TSystemState State() const - This function returns the system state value.

  • void StartMonitoringL(TSystemVariable aVariable, TInt aObjectId, MSipSystemStateObserver& aObserver) - This function starts to monitor the system state or SNAP availability events. Parameter aObjectId is valid when aVariable has value CSIPSystemStateMonitor::ESnapAvailability. It is the SNAP ID that is monitored.

  • void StopMonitoring(TSystemVariable aVariable, TInt aObjectId, MSipSystemStateObserver& aObserver) - This function stops monitoring the system state or SNAP availability events. Parameter aObjectId is valid when aVariable has value CSIPSystemStateMonitor::ESnapAvailability. It is the SNAP ID that is monitored.

  • TInt CurrentValue(TSystemVariable aVariable, TInt aObjectId) const - This function returns the value of a system variable. Parameter aObjectId is valid when aVariable has value CSIPSystemStateMonitor::ESnapAvailability. It is the SNAP ID that is monitored.

The TSystemVariable for the preceding functions can have one of the following values:

  • CSIPSystemStateMonitor:: ESystemState

  • CSIPSystemStateMonitor:: ESnapAvailability

Symbian SIP implements a callback when you call MSipSystemStateObserver::SystemVariableUpdated to receive system state and SNAP availability events. SIP System State Monitor ECOM plug-in implementation must call these functions when the value of a monitored system variable changes.