Symbian3/PDK/Source/GUID-4CD73A4C-8C2B-5F55-9B3C-6C4FFABCDCC6.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.

<?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 id="GUID-4CD73A4C-8C2B-5F55-9B3C-6C4FFABCDCC6" xml:lang="en"><title>Creating
State Adaptation plug-in</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>SSM adaptation plug-ins provides interfaces that allows custom commands
and other components in the device with appropriate capabilities to access
the functionality provided in the adaptation interfaces. </p>
<section><title>Required background</title> <p>Before you start, you must
know: </p> <ul>
<li id="GUID-EE49DC0C-DD66-5759-AD84-541A600FE49D"><p> <b>First ordinal:</b> used
to identify an item in an ordered set. </p> </li>
<li id="GUID-0DD38AB5-AAFF-5CEE-B0EB-54C1B784B641"><p>An understanding on <xref href="GUID-788BD091-186A-5E25-B058-952C7629A8D4.dita">System State Manager</xref> (SSM). </p> </li>
</ul> </section>
<section><title>Introduction</title> <p>This is an SPI, <xref href="GUID-75FE2C39-7CF0-345D-9C08-24422F85F218.dita"><apiname>MStateAdaptation</apiname></xref>,
which allows customization of the functionality of SSM adaptation interface.
The SSM adaptation server creates <xref href="GUID-75FE2C39-7CF0-345D-9C08-24422F85F218.dita"><apiname>MStateAdaptation</apiname></xref> class
by calling the first ordinal in the DLL that is <filepath>susstateadaptation.dll</filepath>. </p> <p>The
function prototype of the first ordinal is <codeph>MStateAdaptation * CreateCExampleStateAdaptation();</codeph>  </p><p>Follow
the procedure given below to create a state adaptation plug-in:</p></section>
<section><title>Procedure</title> <ol id="GUID-85021A9E-8281-5FE1-BBF4-53827186F518">
<li id="GUID-12246654-73E0-5183-ABF9-DE98EAA8A350"><p>Define a class from <xref href="GUID-75FE2C39-7CF0-345D-9C08-24422F85F218.dita"><apiname>MStateAdaptation</apiname></xref> interface. </p> </li>
<li id="GUID-58E796CC-5E2B-539A-B28F-CE3F9D2BB6F7"><p>Export the static method
to create new state adaptation plug-in as shown in the code snippet: </p> <p><codeblock id="GUID-E236A1B2-8EE1-569E-A7FC-C9B493AB3A70" xml:space="preserve">
EXPORT_C MStateAdaptation* CreateStateAdaptationL()
{
    CStateAdaptation* stateAdaptation = CStateAdaptation::NewL();
    return ( static_cast&lt;MStateAdaptation*&gt;(stateAdaptation ));
}
</codeblock> </p> <p>The code returns a new plugin object for state adaptation. </p> </li>
</ol> </section>
<section><title>Results</title> <p>The state adaptation plug-in
is created. </p> </section>
<section><title>Next Steps</title> <p>The following table depicts the interfaces
and their description used in the Adaptation Server plug-in. </p> <table id="GUID-C49B5357-F40C-518B-86D6-F19B93A8BB60">
<tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
<thead>
<row>
<entry>Interfaces</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><p> <xref href="GUID-4802F055-3539-372C-A7B9-C8A7B6B1D99A.dita"><apiname>MEmergencyCallRfAdaptation</apiname></xref>  </p> </entry>
<entry><p>Client interface for EmergencyCallRf Adaptation part of the adaptation
server. </p> </entry>
</row>
<row>
<entry><p> <xref href="GUID-AA592629-271A-3A52-A65A-06CFCBFED1BF.dita"><apiname>MMiscAdaptation</apiname></xref>  </p> </entry>
<entry><p>Client interface for Miscellaneous Adaptation part of the adaptation
server. </p> </entry>
</row>
<row>
<entry><p> <xref href="GUID-CC79A63E-15DF-3437-983B-9A90966B3004.dita"><apiname>MRtcAdaptation</apiname></xref>  </p> </entry>
<entry><p>Client interface for RTC Adaptation part of the Adaptation server. </p> </entry>
</row>
<row>
<entry><p> <xref href="GUID-C1BD3504-2837-3464-80C9-02CC400D7080.dita"><apiname>MSimAdaptation</apiname></xref>  </p> </entry>
<entry><p>Client interface for SIM Adaptation part of the Adaptation server. </p> </entry>
</row>
</tbody>
</tgroup>
</table> </section>
</conbody><related-links>
<link href="GUID-8CB4B949-CEDA-5F59-B46D-1415B016EF13.dita"><linktext>Creating
Sytsem State Policy plug-in</linktext></link>
<link href="GUID-95FA6DDA-E1C2-5148-9F18-4171BF06C9AC.dita"><linktext>Creating
System-wide Property Policy plug-in</linktext></link>
<link href="GUID-4D6FBF03-FA0A-5D79-A8B9-4C0B52303CF1.dita"><linktext>Creating
System Utility Policy plug-in</linktext></link>
</related-links></concept>