1 martin 1.4 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.5 //
|
3 martin 1.4 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
|
9 martin 1.5 //
|
10 martin 1.4 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
16 martin 1.5 //
|
17 martin 1.4 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.5 //
|
20 martin 1.4 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.5 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.4 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.5 //
|
28 martin 1.4 //////////////////////////////////////////////////////////////////////////
|
29 kumpf 1.2 //
30 //%////////////////////////////////////////////////////////////////////////////
31
32 #ifndef Pegasus_WsmReader_h
33 #define Pegasus_WsmReader_h
34
35 #include <Pegasus/Common/Config.h>
36 #include <Pegasus/Common/XmlParser.h>
37 #include <Pegasus/Common/AcceptLanguageList.h>
|
38 mike 1.7 #include <Pegasus/Common/SharedPtr.h>
|
39 kumpf 1.2 #include <Pegasus/WsmServer/WsmInstance.h>
40 #include <Pegasus/WsmServer/WsmSelectorSet.h>
41 #include <Pegasus/WsmServer/WsmEndpointReference.h>
42 #include <Pegasus/WsmServer/WsmUtils.h>
|
43 mike 1.7 #include <Pegasus/WQL/WQLParser.h>
|
44 karl 1.8 #include <Pegasus/WsmServer/WsmFilter.h>
|
45 rohini.deshpande 1.9 #include <Pegasus/Common/Constants.h>
|
46 kumpf 1.2 PEGASUS_NAMESPACE_BEGIN
47
48 class PEGASUS_WSMSERVER_LINKAGE WsmReader
49 {
50 public:
51
52 WsmReader(char* text);
53 ~WsmReader();
54
|
55 mike 1.7 void setHideEmptyTags(Boolean flag);
56
|
57 kumpf 1.2 Boolean getXmlDeclaration(
58 const char*& xmlVersion, const char*& xmlEncoding);
59
60 Boolean testStartTag(
61 XmlEntry& entry,
62 int nsType,
63 const char* tagName = 0);
64 Boolean testStartOrEmptyTag(
65 XmlEntry& entry,
66 int nsType,
67 const char* tagName = 0);
68 Boolean testEndTag(int nsType, const char* tagName = 0);
69
70 void expectStartTag(
71 XmlEntry& entry,
72 int nsType,
73 const char* tagName);
|
74 mike 1.7
75 // Expect a start tag with the given name and return the namespace id.
76 int expectStartTag(
77 XmlEntry& entry,
78 const char* tagName);
79
|
80 kumpf 1.2 void expectStartOrEmptyTag(
81 XmlEntry& entry,
82 int nsType,
83 const char* tagName);
|
84 mike 1.7
|
85 kumpf 1.2 void expectEndTag(
86 int nsType,
87 const char* tagName);
88 void expectContentOrCData(XmlEntry& entry);
89
90 Boolean getAttributeValue(
91 Uint32 lineNumber,
92 XmlEntry& entry,
93 const char* attributeName,
94 String& attributeValue,
95 Boolean required = true);
96
97 Boolean mustUnderstand(XmlEntry& entry);
98
|
99 kumpf 1.3 Uint64 getEnumerationContext(XmlEntry& entry);
100 Uint32 getUint32ElementContent(XmlEntry& entry, const char* name);
|
101 kumpf 1.2 const char* getElementContent(XmlEntry& entry);
102 Boolean getElementStringValue(
103 int nsType,
104 const char* tagName,
105 String& stringValue,
106 Boolean required = false);
107
108 Boolean getSelectorElement(WsmSelector& selector);
109 Boolean getSelectorSetElement(WsmSelectorSet& selectorSet);
110 void getEPRElement(WsmEndpointReference& endpointReference);
111 Boolean getSelectorEPRElement(WsmEndpointReference& endpointReference);
112 Boolean getInstanceEPRElement(WsmEndpointReference& endpointReference);
113
114 void skipElement(XmlEntry& entry);
115 Boolean next(XmlEntry& entry);
116
117 void decodeRequestSoapHeaders(
118 String& wsaMessageId,
119 String& wsaTo,
120 String& wsaAction,
121 String& wsaFrom,
122 kumpf 1.2 String& wsaReplyTo,
123 String& wsaFaultTo,
124 String& wsmResourceUri,
125 WsmSelectorSet& wsmSelectorSet,
126 Uint32& wsmMaxEnvelopeSize,
127 AcceptLanguageList& wsmLocale,
|
128 kumpf 1.3 Boolean& wsmRequestEpr,
|
129 rohini.deshpande 1.9 Boolean& wsmRequestItemCount,
130 String& wseIdentifier);
|
131 kumpf 1.3
132 void decodeEnumerateBody(
|
133 kumpf 1.6 String& expiration,
134 WsmbPolymorphismMode& polymorphismMode,
135 WsenEnumerationMode& enumerationMode,
136 Boolean& optimized,
|
137 mike 1.7 Uint32& maxElements,
|
138 karl 1.8 WsmFilter& wsmFilter);
|
139 kumpf 1.3
140 void decodePullBody(
|
141 kumpf 1.6 Uint64& enumerationContext,
142 String& maxTime,
|
143 kumpf 1.3 Uint32& maxElements,
144 Uint32& maxCharacters);
145
146 void decodeReleaseBody(Uint64& enumerationContext);
|
147 kumpf 1.2
|
148 mike 1.7 void decodeInvokeInputBody(
149 const String& className,
150 const String& methodName,
151 WsmInstance& instance);
152
|
153 kumpf 1.2 void getInstanceElement(WsmInstance& instance);
154 Boolean getPropertyElement(
155 int nsType,
156 String& propName,
157 WsmValue& propValue);
158 void getValueElement(WsmValue& value, int nsType, const char* propNameTag);
159
|
160 rohini.deshpande 1.9 void decodeFilter(WsmFilter& wsmFilter, int nsType = WsmNamespaces::WS_MAN);
|
161 karl 1.8 // Uint32& filterDialect,
162 // String& queryLanguage,
163 // String& query,
164 // SharedPtr<WQLSelectStatement>& selectStatement,
165 // Boolean& associated,
166 // WsmEndpointReference& object,
167 // CIMName& assocClassName,
168 // CIMName& resultClassName,
169 // String& role,
170 // String& resultRole,
171 // CIMPropertyList& propertyList);
172
173 void decodeAssociationFilter(WsmFilter& wsmFilter);
174 // Boolean& associated,
175 // WsmEndpointReference& object,
176 // CIMName& assocClassName,
177 // CIMName& resultClassName,
178 // String& role,
179 // String& resultRole,
180 // CIMPropertyList& propertyList);
|
181 rohini.deshpande 1.9
182 void decodeSubscribeBody(
183 String& deliveryMode,
184 String& notifyTo,
185 String& subExpiration,
186 WsmFilter & wsmFilter);
|
187 anusha.kandepu 1.10
188 void checkDuplicateHeader(
189 const char* elementName,
190 Boolean isDuplicate);
191
192 XmlParser& getParser();
|
193 kumpf 1.2 private:
194
195 XmlParser _parser;
|
196 rohini.deshpande 1.9 void _decodeDeliveryField(
197 String & deliveryMode,
198 String & destination);
|
199 kumpf 1.2 };
200
201 PEGASUS_NAMESPACE_END
202
203 #endif /* Pegasus_WsmReader_h */
|