Symbian3/PDK/Source/GUID-FEA8BB25-3F1F-5F2E-92E3-E5CF360BDD4B.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
parent 14 578be2adaf3e
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     6
<!-- Initial Contributors:
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     7
    Nokia Corporation - initial contribution.
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     8
Contributors: 
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     9
-->
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    10
<!DOCTYPE concept
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    12
<concept xml:lang="en" id="GUID-FEA8BB25-3F1F-5F2E-92E3-E5CF360BDD4B"><title>State Aware Component</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>The state aware component session, <xref href="GUID-89C25B0F-DB76-30D5-A4D6-0C12922194E4.dita"><apiname>RSsmStateAwareSession</apiname></xref>, provides an API for use by components that must be system state aware. A system state aware component is notified of changes to the system state through this API. </p> <p>The declaration of <xref href="GUID-89C25B0F-DB76-30D5-A4D6-0C12922194E4.dita"><apiname>RSsmStateAwareSession</apiname></xref> is as defined in the following class: </p> <codeblock id="GUID-3F89CA2F-C193-591F-A98B-6F6DEB16C115" xml:space="preserve">
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    13
class RSsmStateAwareSession
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    14
{
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    15
    public:
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    16
        IMPORT_C TInt Connect( TDmDomainId aId );
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    17
           IMPORT_C void Close();
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    18
           IMPORT_C TSsmState State() const;
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    19
           IMPORT_C void RequestStateNotification( TRequestStatus&amp; aStatus );
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    20
           IMPORT_C void RequestStateNotificationCancel();
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    21
           IMPORT_C void AcknowledgeStateNotification( TInt aError );
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    22
           IMPORT_C void AcknowledgeAndRequestStateNotification( TInt aError, TRequestStatus&amp; aStatus );
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    23
}
578be2adaf3e Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    24
</codeblock> <p>The following table lists the various methods of <xref href="GUID-89C25B0F-DB76-30D5-A4D6-0C12922194E4.dita"><apiname>RSsmStateAwareSession</apiname></xref> and their description. </p> <table id="GUID-1E11A150-AFAA-5EB5-94EB-5654AEB42F75"><tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/><thead><row><entry>Method</entry> <entry>Description</entry> </row> </thead> <tbody><row><entry><p> <codeph>RSsmStateAwareSession::Connect()</codeph>  </p> </entry> <entry><p>This method connects the 'R' class so that it is ready for use. The <codeph>aDomainId</codeph> parameter is used to specify at which position in the system state domain hierarchy this client must be inserted. The position in the domain hierarchy determines the order in which clients are notified of state changes. </p> </entry> </row> <row><entry><p> <codeph>RSsmStateAwareSession::State()</codeph>  </p> </entry> <entry><p>This method returns the current system state. The <codeph>RSsmStateAwareSession::RequestStateNotification()</codeph> method completes the <codeph>aStatus</codeph> when the system state has changed from its current value. </p> </entry> </row> <row><entry><p> <codeph>RSsmStateAwareSession::RequestStateNotificationCancel()</codeph> </p> </entry> <entry><p>This method cancels the previous request for state notification on this <xref href="GUID-89C25B0F-DB76-30D5-A4D6-0C12922194E4.dita"><apiname>RSsmStateAwareSession</apiname></xref>. </p> </entry> </row> <row><entry><p> <codeph>RSsmStateAwareSession::AcknowledgeStateNotification()</codeph>  </p> </entry> <entry><p>This method is used to signal that the client has reacted appropriately to the notified state change. The <codeph>aError</codeph> value is used to pass back information about the success of the actions performed by this client, such as successful initialisation of elements during a staged start-up. </p> </entry> </row> <row><entry><p> <codeph>RSsmStateAwareSession::AcknowledgeAndRequestStateNotification()</codeph> </p> </entry> <entry><p>This method provides clients to acknowledge a state change notification and request notification of subsequent changes without the risk of the client missing a later update to the system state. It combines the functions of <codeph>AcknowledgeStateNotification()</codeph> and <codeph>RequestStateNotification()</codeph> into a single method call. </p> </entry> </row> <row><entry><p> <codeph>AcknowledgeStateNotification() or
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    25
                AcknowledgeAndRequestStateNotification() </codeph>  </p> </entry> <entry><p>This method is called after a client has requested and received the notification of a state change to acknowledge that the client has responded to the state notification. </p> <p> <b>Note:</b> A time-out exists for this acknowledgement, so clients of this API have to complete the necessary tasks for the state notification and must acknowledge the transition at the earliest. </p> </entry> </row> </tbody> </tgroup> </table> </conbody></concept>