Symbian3/PDK/Source/GUID-4D6FBF03-FA0A-5D79-A8B9-4C0B52303CF1.dita
changeset 1 25a17d01db0c
child 3 46218c8b8afa
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE task
       
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
       
    12 <task id="GUID-4D6FBF03-FA0A-5D79-A8B9-4C0B52303CF1" xml:lang="en"><title>Creating
       
    13 System Utility Policy plug-in</title><shortdesc>System Utility Policy plug-ins in the SSM Utility Server are intended
       
    14 to monitor some property of the system. It is used by the SSM for efficient
       
    15 handling of a system property change.</shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
       
    16 <context><p> <xref href="GUID-85E83C39-F01C-36EF-9629-D6BFB33BAEC2.dita"><apiname>MSsmUtility</apiname></xref> is an API which allows customization
       
    17 of the behavior of the SSM Utility Server. The <xref href="GUID-85E83C39-F01C-36EF-9629-D6BFB33BAEC2.dita"><apiname>MSsmUtility</apiname></xref> interface
       
    18 is used for plug-ins in the SSM Utility Server to monitor the device. </p> Follow
       
    19 the steps given below to create a SUP plug-in:</context>
       
    20 <steps id="GUID-B98F0128-4820-5D62-9960-7CE6D7867B24">
       
    21 <step id="GUID-0A9FD925-667A-533C-98FD-7CD47246EC84"><cmd/>
       
    22 <info>Define a class that implements <xref href="GUID-85E83C39-F01C-36EF-9629-D6BFB33BAEC2.dita"><apiname>MSsmUtility</apiname></xref> interface. </info>
       
    23 </step>
       
    24 <step id="GUID-61FE8142-8091-5B4B-92F4-90C7B7AB9586"><cmd/>
       
    25 <info>Export the static method to create new System Utility Policy plug-in
       
    26 as shown in the code snippet: </info>
       
    27 <stepxmp><codeblock id="GUID-1FE58CE2-2B1C-568D-A40E-13226FFBC6EF" xml:space="preserve">
       
    28 EXPORT_C MSsmUtility* CLafShutdownEventObserverAdaptor::NewL()
       
    29 {
       
    30     CLafShutdownEventObserverAdaptor* self = new (ELeave) CLafShutdownEventObserverAdaptor();
       
    31     return static_cast&lt;MSsmUtility*&gt;(self);
       
    32 }
       
    33 </codeblock> </stepxmp>
       
    34 <info>The code returns a new plug-in object for SUP plug-in. </info>
       
    35 </step>
       
    36 </steps>
       
    37 <result><p>The System Utility Policy plug-in is created. </p> </result>
       
    38 </taskbody><related-links>
       
    39 <link href="GUID-95FA6DDA-E1C2-5148-9F18-4171BF06C9AC.dita"><linktext>Creating
       
    40 System-wide Property Policy plug-in</linktext></link>
       
    41 </related-links></task>