|
1 /* |
|
2 * Copyright (c) 2009 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 #ifndef CTESTINTERNALWSPOLICY_H |
|
24 #define CTESTINTERNALWSPOLICY_H |
|
25 |
|
26 #include <e32std.h> |
|
27 #include <f32file.h> |
|
28 #include "SenDomFragment.h" |
|
29 #include <seninternalwspolicy.h> |
|
30 #include <wspolicywriter.h> |
|
31 #include <wspolicyreader.h> |
|
32 #include <policyassertion.h> |
|
33 |
|
34 //#include <SenWSPolicyIdentifier.h> |
|
35 |
|
36 |
|
37 class CTestInternalWSPolicy :public CSenInternalWsPolicy//, CSenWSPolicyIdentifier |
|
38 { |
|
39 public: |
|
40 static CTestInternalWSPolicy* NewL(); |
|
41 static CTestInternalWSPolicy* NewLC(); |
|
42 static CTestInternalWSPolicy* NewL(const TDesC8& aNsUri, |
|
43 const TDesC8& aLocalName, |
|
44 const TDesC8& aQName, |
|
45 const RAttributeArray& aAttributes); |
|
46 static CTestInternalWSPolicy* NewLC(const TDesC8& aNsUri, |
|
47 const TDesC8& aLocalName, |
|
48 const TDesC8& aQName, |
|
49 const RAttributeArray& aAttributes); |
|
50 static CTestInternalWSPolicy* NewL(const TDesC8& aNsUri, |
|
51 const TDesC8& aLocalName, |
|
52 const TDesC8& aQName, |
|
53 const RAttributeArray& aAttributes, |
|
54 CSenElement& aParent); |
|
55 static CTestInternalWSPolicy* NewLC(const TDesC8& aNsUri, |
|
56 const TDesC8& aLocalName, |
|
57 const TDesC8& aQName, |
|
58 const RAttributeArray& aAttributes, |
|
59 CSenElement& aParent); |
|
60 TBool IsApplicableL(const TDesC8& aPolicyEndpoint); |
|
61 TBool IsApplicableL(CSenInternalWsPolicy* aInternalPolicy); |
|
62 TBool IsApplicableL(CSenWSDescription& aPattern); |
|
63 |
|
64 TBool UpdateMetadataEndpointL(CSenInternalWsPolicy* aInternalPolicy, TInt& aExist); |
|
65 |
|
66 TInt AddMetadataPolicyL(CSenElement* aElement); |
|
67 TInt RemoveMetadataPolicyL(const TDesC8& aUri); |
|
68 CSenElement* WsPolicyByUriL(const TDesC8& aUri); |
|
69 CSenElement* WsPolicyByName(const TDesC8& aName); |
|
70 TTime ValidUntilL(const TDesC8& aUri); |
|
71 |
|
72 ~CTestInternalWSPolicy(); |
|
73 //CTestInternalWSPolicy(); |
|
74 |
|
75 |
|
76 }; |
|
77 |
|
78 ///////////////////////////////////////////////////////////////////////////////// |
|
79 //////////////////////////////////////////////////////////////////////////////// |
|
80 //////////////////////////////////////////////////////////////////////////////// |
|
81 |
|
82 |
|
83 class CTestWSPolicyIdentifier : public CSenWSPolicyIdentifier |
|
84 { |
|
85 public: |
|
86 static CTestWSPolicyIdentifier* NewL(); |
|
87 static CTestWSPolicyIdentifier* NewLC(); |
|
88 static CTestWSPolicyIdentifier* NewL(const TDesC8& aNsUri, |
|
89 const TDesC8& aLocalName, |
|
90 const TDesC8& aQName, |
|
91 const RAttributeArray& aAttributes); |
|
92 static CTestWSPolicyIdentifier* NewLC(const TDesC8& aNsUri, |
|
93 const TDesC8& aLocalName, |
|
94 const TDesC8& aQName, |
|
95 const RAttributeArray& aAttributes); |
|
96 static CTestWSPolicyIdentifier* NewL(const TDesC8& aNsUri, |
|
97 const TDesC8& aLocalName, |
|
98 const TDesC8& aQName, |
|
99 const RAttributeArray& aAttributes, |
|
100 CSenElement& aParent); |
|
101 static CTestWSPolicyIdentifier* NewLC(const TDesC8& aNsUri, |
|
102 const TDesC8& aLocalName, |
|
103 const TDesC8& aQName, |
|
104 const RAttributeArray& aAttributes, |
|
105 CSenElement& aParent); |
|
106 |
|
107 TInt SetPropertyL(const TDesC8& aName,const TDesC8& aValue); |
|
108 TInt PropertyL(const TDesC8& aName, TPtrC8& aValue); |
|
109 void SetIdL(TInt aId); |
|
110 TInt IdL(); |
|
111 TInt AddMetadataEndpointL(CSenElement* aElement); |
|
112 TPtrC8 MetadataEndpointL(); |
|
113 CSenElement* MetadataEndpointElementL(); |
|
114 TPtrC8 ElementAttribValueL(CSenElement* aElement, const TDesC8& aName); |
|
115 TBool HasAttributeL(CSenElement* aElement, const TDesC8& aName); |
|
116 |
|
117 |
|
118 }; |
|
119 |
|
120 ///////////////////////////////////////////////////////////////////////////////// |
|
121 //////////////////////////////////////////////////////////////////////////////// |
|
122 //////////////////////////////////////////////////////////////////////////////// |
|
123 |
|
124 |
|
125 class CTestPolicyWriter : public CWSPolicyWriter |
|
126 { |
|
127 public: |
|
128 |
|
129 static CTestPolicyWriter* NewL(); |
|
130 static CTestPolicyWriter* NewLC(); |
|
131 void WriteToFileAllL(CSenElement* aXml); |
|
132 void WriteToFileAllL(TDesC8& aXml); |
|
133 HBufC8* WriteAllAsXmlL(CPolicyAssertion* aXml); |
|
134 }; |
|
135 |
|
136 |
|
137 ///////////////////////////////////////////////////////////////////////////////// |
|
138 //////////////////////////////////////////////////////////////////////////////// |
|
139 //////////////////////////////////////////////////////////////////////////////// |
|
140 |
|
141 |
|
142 class CTestPolicyReader : public CWSPolicyReader |
|
143 { |
|
144 public: |
|
145 |
|
146 static CTestPolicyReader* NewL(); |
|
147 static CTestPolicyReader* NewLC(); |
|
148 CPolicyAssertion* GetPolicyL(CSenElement* aEle); |
|
149 }; |
|
150 |
|
151 #endif |
|
152 |
|
153 ///////////////////////////////////////////////////////////////////////////////// |
|
154 //////////////////////////////////////////////////////////////////////////////// |
|
155 //////////////////////////////////////////////////////////////////////////////// |
|
156 |
|
157 |
|
158 class CTestPolicyAssertion : public CPolicyAssertion |
|
159 { |
|
160 public: |
|
161 |
|
162 static CPolicyAssertion* NewL(); |
|
163 static CTestPolicyAssertion* NewLC(); |
|
164 }; |
|
165 |