|
1 /* |
|
2 * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Header declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 #ifndef M_SERVICE_POLICY_H |
|
26 #define M_SERVICE_POLICY_H |
|
27 |
|
28 // INCLUDES |
|
29 #include <e32base.h> // for CActive |
|
30 #include <badesca.h> |
|
31 |
|
32 #include "SenDomFragment.h" |
|
33 typedef RPointerArray<CSenElement> RPolicyArray; |
|
34 |
|
35 // FORWARD DECLARATION |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * Example structure of Policy XML fragment: |
|
41 * |
|
42 * <ServicePolicy> |
|
43 * <ClientPolicy> |
|
44 * <MetadataEndpoint>uri.1</MetadataEndpoint> |
|
45 * <MetadataEndpoint>uri.2</MetadataEndpoint> |
|
46 * <MetadataEndpoint>uri.3</MetadataEndpoint> |
|
47 * <PolicyValue1/> |
|
48 * <PolicyValue2/> |
|
49 * </ClientPolicy> |
|
50 * <PolicyArrray> |
|
51 * <wsp:Policy1/> |
|
52 * <wsp:Policy2/> |
|
53 * </PolicyArrray> |
|
54 * </ServicePolicy> |
|
55 */ |
|
56 class MServicePolicy |
|
57 { |
|
58 public: // New functions |
|
59 |
|
60 /** |
|
61 * Adds a policy in SD |
|
62 * Method is used to add a RAW policy obtained |
|
63 * by Network or some dynamic means |
|
64 * @since Series60 4.0 |
|
65 * @param aPolicy is the Policy Element |
|
66 */ |
|
67 virtual TInt AddPolicyL(CSenElement* aPolicy) = 0; |
|
68 |
|
69 /** |
|
70 * Remove a Policy from SD |
|
71 * @param aPolicyName , Policy with this name will be removed from SD |
|
72 * @return |
|
73 * - KErrNone |
|
74 |
|
75 */ |
|
76 virtual TInt RemovePolicyL(TDesC8& aPolicyName) = 0; |
|
77 |
|
78 /** |
|
79 * Method reads provider policy class instance values from given |
|
80 * template. |
|
81 * @since Series60 4.0 |
|
82 * @param aTemplate from which the values are read. |
|
83 * @return |
|
84 * |
|
85 */ |
|
86 virtual TInt RebuildServicePolicyFrom(MServicePolicy& aTemplate) = 0; |
|
87 |
|
88 /** |
|
89 * Checks if policies match. |
|
90 * @return ETrue if policies match, EFalse if not. |
|
91 */ |
|
92 virtual TBool Accepts(MServicePolicy& aPolicyPattern) = 0; |
|
93 |
|
94 /** |
|
95 * Getter for ServicePolicies |
|
96 * @since Series60 4.0 |
|
97 * @return |
|
98 * |
|
99 */ |
|
100 |
|
101 virtual TInt ServicePolicies(RPolicyArray& aPolicies) = 0; |
|
102 }; |
|
103 |
|
104 #endif //M_SEN_POLICY_H |
|
105 |
|
106 // End of File |