|
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-95FA6DDA-E1C2-5148-9F18-4171BF06C9AC" xml:lang="en"><title>Creating |
|
13 System-wide Property Policy Plug-in</title><shortdesc>System-wide Properties (SwP) are attributes of a device that have |
|
14 system-wide significance (for example, the power status or device lock status). |
|
15 The value of any System-wide property is normally independent of the System |
|
16 State, but the state and different properties can be combined with policy |
|
17 to generate a new status indications and actions. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody> |
|
18 <context><p>The <xref href="GUID-31FB0BC8-83FC-3581-A7A3-C1781CAE7187.dita"><apiname>MSsmSwpPolicy</apiname></xref>, is an API which allows customization |
|
19 of the behavior of system-wide property changes in the SSM. </p><p>Follow |
|
20 the steps given below to create a system-wide property policy plug-in:</p></context> |
|
21 <steps id="GUID-4EE901CB-7DF1-5A14-84A7-0FAAFC1B276E"> |
|
22 <step id="GUID-EED1CF34-AC86-51A6-AE68-459DD47B80D1"><cmd/> |
|
23 <info>Define a class from <xref href="GUID-31FB0BC8-83FC-3581-A7A3-C1781CAE7187.dita"><apiname>MSsmSwpPolicy</apiname></xref> interface. </info> |
|
24 </step> |
|
25 <step id="GUID-DCF835C0-150A-582E-9247-C85F1A0D6E91"><cmd/> |
|
26 <info>Export the static method to create new system-wide property policy plug-in |
|
27 as shown in the code snippet: </info> |
|
28 <stepxmp><codeblock id="GUID-24CE6A8F-5BCA-5D7B-A3A1-B9E995FA5E2E" xml:space="preserve"> |
|
29 EXPORT_C MSsmSwpPolicy* CSimStatuspolicy::NewL() |
|
30 { |
|
31 CSimStatuspolicy* self = new (ELeave) CSimStatuspolicy; |
|
32 CleanupStack::PushL(self); |
|
33 self->ConstructL(); |
|
34 CleanupStack::Pop(self); |
|
35 return self; |
|
36 } |
|
37 </codeblock> </stepxmp> |
|
38 <info>The code returns a new plug-in object for system-wide property plug-in. </info> |
|
39 </step> |
|
40 </steps> |
|
41 <result><p>The system-wide property policy plug-in is created. </p> </result> |
|
42 </taskbody><related-links> |
|
43 <link href="GUID-DA68ED44-4BF4-54EF-8090-821F73F7904D.dita"><linktext>System-wide |
|
44 Properties</linktext></link> |
|
45 </related-links></task> |