13 a UPS Policy File</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
13 a UPS Policy File</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
14 <p>UPS policy files are resource files that specify whether application requests |
14 <p>UPS policy files are resource files that specify whether application requests |
15 to access services are silently accepted or denied or whether they require |
15 to access services are silently accepted or denied or whether they require |
16 the user to be prompted. Each service has a policy file. The policy file lists |
16 the user to be prompted. Each service has a policy file. The policy file lists |
17 policies for various applications. </p> |
17 policies for various applications. </p> |
18 <section><title>Required Background</title> <p>Before you start writing a |
18 <section id="GUID-F3D62C3E-D570-4DE2-ACED-0577D3923965"><title>Required Background</title> <p>Before you start writing a |
19 UPS policy file, you must configure the UPS. For more information, see <xref href="GUID-6849E256-6719-5788-BCB2-7557F09AAAD0.dita">Configuring UPS</xref>. </p> </section> |
19 UPS policy file, you must configure the UPS. For more information, see <xref href="GUID-6849E256-6719-5788-BCB2-7557F09AAAD0.dita">Configuring UPS</xref>. </p> </section> |
20 <section><title>Introduction</title> <p>The resource header file, <filepath>ups/policies.rh</filepath>, |
20 <section id="GUID-10A7A574-4E57-45E3-8198-CD6D15EAC455"><title>Introduction</title> <p>The resource header file, <filepath>ups/policies.rh</filepath>, |
21 defines the structures and constants required by User Prompt Service policy |
21 defines the structures and constants required by User Prompt Service policy |
22 files. </p> <p>Device creators can customise the circumstances under which |
22 files. </p> <p>Device creators can customise the circumstances under which |
23 prompts are generated by configuring policies. Policies are made up of details |
23 prompts are generated by configuring policies. Policies are made up of details |
24 about the service being requested as well as information about whether to |
24 about the service being requested as well as information about whether to |
25 accept or deny silently or to ask the user. They are defined in policy lists. |
25 accept or deny silently or to ask the user. They are defined in policy lists. |
26 Each service has one policy list defining any number of policies. </p> <p>In |
26 Each service has one policy list defining any number of policies. </p> <p>In |
27 cases where the policy specifies that a user prompt is required, ECOM plug-ins |
27 cases where the policy specifies that a user prompt is required, ECOM plug-ins |
28 called <xref href="GUID-43080A86-72D3-5422-953E-A5EF79961D7B.dita">Policy Evaluators</xref> and <xref href="GUID-A8130D83-E684-5B6C-BDFE-EB6EE3CD49E8.dita">Dialog Creators</xref>, written |
28 called <xref href="GUID-43080A86-72D3-5422-953E-A5EF79961D7B.dita">Policy Evaluators</xref> and <xref href="GUID-A8130D83-E684-5B6C-BDFE-EB6EE3CD49E8.dita">Dialog Creators</xref>, written |
29 by device creators. </p> </section> |
29 by device creators. </p> </section> |
30 <section><title>Writing policy files</title> <p>Writing policy files include |
30 <section id="GUID-7DFB9572-0E28-4D7A-9EF1-8A4DADFAA0B3"><title>Writing policy files</title> <p>Writing policy files include |
31 the following: </p> <ul> |
31 the following: </p> <ul> |
32 <li id="GUID-9FE188FC-A512-595A-848B-DA5A82F143AF"><p>Naming and location |
32 <li id="GUID-9FE188FC-A512-595A-848B-DA5A82F143AF"><p>Naming and location |
33 of policy files </p> </li> |
33 of policy files </p> </li> |
34 <li id="GUID-81096653-08DF-53F2-8CD9-D683BD8D9F97"><p>Policy resource </p> </li> |
34 <li id="GUID-81096653-08DF-53F2-8CD9-D683BD8D9F97"><p>Policy resource </p> </li> |
35 </ul> <p><b> Naming and location of policy files</b> </p> <p>UPS policy files |
35 </ul> <p><b> Naming and location of policy files</b> </p> <p>UPS policy files |
76 //dialogcreator and policyevaluator UIDs |
76 //dialogcreator and policyevaluator UIDs |
77 dialogcreator = 0x10283694; |
77 dialogcreator = 0x10283694; |
78 policyevaluator = 0x10283698; |
78 policyevaluator = 0x10283698; |
79 }; |
79 }; |
80 </codeblock> </section> |
80 </codeblock> </section> |
81 <section><title>Example of a policy file </title> <p>The following is an example |
81 <section id="GUID-7A571B93-A2B9-4B97-ACE9-8C70AABBB389"><title>Example of a policy file </title> <p>The following is an example |
82 of a policy file: </p> <codeblock id="GUID-F5378D3D-02A5-536E-96D1-6BD240B3852E" xml:space="preserve">// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
82 of a policy file: </p> <codeblock id="GUID-F5378D3D-02A5-536E-96D1-6BD240B3852E" xml:space="preserve">#include <ups/policies.rh> |
83 // All rights reserved. |
|
84 // This component and the accompanying materials are made available |
|
85 // under the terms of the License "Symbian Foundation License v1.0" |
|
86 // which accompanies this distribution, and is available |
|
87 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
88 // |
|
89 // Initial Contributors: |
|
90 // Nokia Corporation - initial contribution. |
|
91 |
|
92 |
|
93 #include <ups/policies.rh> |
|
94 // Identifies this as a UPS policy file |
83 // Identifies this as a UPS policy file |
95 UID2 KUidUpsPolicyResourceFile |
84 UID2 KUidUpsPolicyResourceFile |
96 // Uniquely defines this policy file. The UID should be reserved using the Symbian Signed protected UID allocator. |
85 // Uniquely defines this policy file. The UID should be reserved using the Symbian Signed protected UID allocator. |
97 UID3 0x01100001 |
86 UID3 0x01100001 |
98 |
87 |