Symbian3/PDK/Source/GUID-4D6FBF03-FA0A-5D79-A8B9-4C0B52303CF1.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 task
  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="GUID-4D6FBF03-FA0A-5D79-A8B9-4C0B52303CF1" xml:lang="en"><title>Creating
System Utility Policy plug-in</title><shortdesc>System Utility Policy plug-ins in the SSM Utility Server are intended
to monitor some property of the system. It is used by the SSM for efficient
handling of a system property change.</shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
<context><p> <xref href="GUID-85E83C39-F01C-36EF-9629-D6BFB33BAEC2.dita"><apiname>MSsmUtility</apiname></xref> is an API which allows customization
of the behavior of the SSM Utility Server. The <xref href="GUID-85E83C39-F01C-36EF-9629-D6BFB33BAEC2.dita"><apiname>MSsmUtility</apiname></xref> interface
is used for plug-ins in the SSM Utility Server to monitor the device. </p> Follow
the steps given below to create a SUP plug-in:</context>
<steps id="GUID-B98F0128-4820-5D62-9960-7CE6D7867B24">
<step id="GUID-0A9FD925-667A-533C-98FD-7CD47246EC84"><cmd/>
<info>Define a class that implements <xref href="GUID-85E83C39-F01C-36EF-9629-D6BFB33BAEC2.dita"><apiname>MSsmUtility</apiname></xref> interface. </info>
</step>
<step id="GUID-61FE8142-8091-5B4B-92F4-90C7B7AB9586"><cmd/>
<info>Export the static method to create new System Utility Policy plug-in
as shown in the code snippet: </info>
<stepxmp><codeblock id="GUID-1FE58CE2-2B1C-568D-A40E-13226FFBC6EF" xml:space="preserve">
EXPORT_C MSsmUtility* CLafShutdownEventObserverAdaptor::NewL()
{
    CLafShutdownEventObserverAdaptor* self = new (ELeave) CLafShutdownEventObserverAdaptor();
    return static_cast&lt;MSsmUtility*&gt;(self);
}
</codeblock> </stepxmp>
<info>The code returns a new plug-in object for SUP plug-in. </info>
</step>
</steps>
<result><p>The System Utility Policy plug-in is created. </p> </result>
</taskbody><related-links>
<link href="GUID-95FA6DDA-E1C2-5148-9F18-4171BF06C9AC.dita"><linktext>Creating
System-wide Property Policy plug-in</linktext></link>
</related-links></task>