2 * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Service policy interface for serene
18 #ifndef M_SEN_SERVICE_POLICY_H
19 #define M_SEN_SERVICE_POLICY_H
22 #include <e32base.h> // for CActive
25 #include "SenDomFragment.h"
27 typedef RPointerArray<CSenElement> RPolicyArray;
29 // FORWARD DECLARATION
35 * <MetadataEndpoint>uri.1</MetadataEndpoint>
36 * <MetadataEndpoint>uri.2</MetadataEndpoint>
37 * <MetadataEndpoint>uri.3</MetadataEndpoint>
47 class MSenServicePolicy
49 public: // New functions
53 * Method is used to add a RAW policy obtained
54 * by Network or some dynamic means
56 * @param aPolicy is the Policy Element
58 virtual TInt AddPolicyL(CSenElement* aPolicy) = 0;
61 * Remove a Policy from SD
62 * @param aPolicyName , Policy with this name will be removed from SD
67 virtual TInt RemovePolicyL(TDesC8& aPolicyName) = 0;
70 * Method reads provider policy class instance values from given
73 * @param aTemplate from which the values are read.
77 virtual TInt RebuildServicePolicyFrom(MSenServicePolicy& aTemplate) = 0;
80 * Checks if policies match.
81 * @return ETrue if policies match, EFalse if not.
83 virtual TBool Accepts(MSenServicePolicy& aPolicyPattern) = 0;
86 * Getter for ServicePolicies
93 * Return all of the Services polices from SD only <wsp:Policy> tags
98 virtual TInt ServicePolicies(RPolicyArray& aPolicies) = 0;
100 * Gets the Client Policy
102 virtual CSenElement* ClientPolicy() = 0;
104 * Searches for the Client Policy with the given key value
106 * @return ETrue If the Client Policy is present with the given key value
107 * EFalse If the Client Policy is not present with the given key value
109 virtual TBool ClientPolicy(const TDesC8& aKey) = 0;
111 * Gets the Client Policy with the given key value
113 * @return Client Policy Value is returned
115 virtual HBufC8* ClientPolicyValue(const TDesC8& aKey) = 0;
118 #endif //M_SEN_POLICY_H