Symbian3/PDK/Source/GUID-D47B8704-3B2A-5849-A33E-490C191EE464.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Fri, 22 Jan 2010 18:26:19 +0000
changeset 1 25a17d01db0c
child 3 46218c8b8afa
permissions -rw-r--r--
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept xml:lang="en" id="GUID-D47B8704-3B2A-5849-A33E-490C191EE464"><title>How to use the System State Monitor API</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>The SIP System State Monitor ECOM plug-in must implement the following virtual functions defined in abstract base class <xref href="GUID-6DE8D037-4A3C-3A82-880D-C9CAB47B5F19.dita"><apiname>CSIPSystemStateMonitor</apiname></xref> found in <filepath>sipsystemstatemonitor.h</filepath> file to access the SIP stack: </p> <ul><li id="GUID-9AD35C5A-228B-52AB-8311-5FEF0D491AF1"><p> <codeph>TSystemState State() const</codeph> - This function returns the system state value. </p> </li> <li id="GUID-3BEAEC83-B485-53C0-BE24-A1FA5AB5629C"><p> <codeph>void StartMonitoringL(TSystemVariable aVariable, TInt
             aObjectId, MSipSystemStateObserver&amp; aObserver)</codeph> - This function starts to monitor the system state or SNAP availability events. Parameter <codeph>aObjectId</codeph> is valid when <codeph>aVariable</codeph> has value <codeph>CSIPSystemStateMonitor::ESnapAvailability</codeph>. It is the SNAP ID that is monitored. </p> </li> <li id="GUID-35405046-E48F-5ECD-9EC7-53A60946F931"><p> <codeph>void StopMonitoring(TSystemVariable aVariable, TInt aObjectId,
             MSipSystemStateObserver&amp; aObserver)</codeph> - This function stops monitoring the system state or SNAP availability events. Parameter <codeph>aObjectId</codeph> is valid when <codeph>aVariable</codeph> has value <codeph>CSIPSystemStateMonitor::ESnapAvailability</codeph>. It is the SNAP ID that is monitored. </p> </li> <li id="GUID-16ECAC1F-7E72-5A9C-BF6F-8ED3EF8825A4"><p> <codeph>TInt CurrentValue(TSystemVariable aVariable, TInt aObjectId)
             const</codeph> - This function returns the value of a system variable. Parameter <codeph>aObjectId</codeph> is valid when <codeph>aVariable</codeph> has value <codeph>CSIPSystemStateMonitor::ESnapAvailability</codeph>. It is the SNAP ID that is monitored. </p> </li> </ul> <p>The <codeph>TSystemVariable</codeph> for the preceding functions can have one of the following values: </p> <ul><li id="GUID-21FF60E2-BD4F-56D0-9F96-BF7A513218C9"><p> <codeph>CSIPSystemStateMonitor:: ESystemState</codeph>  </p> </li> <li id="GUID-7EC19E85-EE2D-59D9-AB94-226270768B11"><p> <codeph>CSIPSystemStateMonitor:: ESnapAvailability</codeph>  </p> </li> </ul> <p>Symbian SIP implements a callback when you call <codeph>MSipSystemStateObserver::SystemVariableUpdated</codeph> 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. </p> </conbody></concept>