1 martin 1.13 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.14 //
|
3 martin 1.13 // 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.14 //
|
10 martin 1.13 // 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.14 //
|
17 martin 1.13 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.14 //
|
20 martin 1.13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.14 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.13 // 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.14 //
|
28 martin 1.13 //////////////////////////////////////////////////////////////////////////
|
29 schuur 1.1 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #ifndef Pegasus_SimpleResponseHandler_h
33 #define Pegasus_SimpleResponseHandler_h
34
35 #include <Pegasus/Common/Config.h>
36 #include <Pegasus/Common/ResponseHandler.h>
37
38 #include <Pegasus/ProviderManager2/Linkage.h>
39
40 PEGASUS_NAMESPACE_BEGIN
41
|
42 kumpf 1.3 //
43 // ValueResponseHandler (used internally to implement property operations)
44 //
45 class PEGASUS_PPM_LINKAGE ValueResponseHandler : virtual public ResponseHandler
46 {
47 public:
|
48 kumpf 1.12 virtual void deliver(const CIMValue& value) = 0;
|
49 kumpf 1.3
|
50 kumpf 1.12 virtual void deliver(const Array<CIMValue>& values) = 0;
|
51 kumpf 1.3 };
52
53
54 //
55 // SimpleResponseHandler
56 //
|
57 schuur 1.1 class PEGASUS_PPM_LINKAGE SimpleResponseHandler : virtual public ResponseHandler
58 {
59 public:
|
60 kumpf 1.12 SimpleResponseHandler();
61 virtual ~SimpleResponseHandler();
|
62 schuur 1.1
|
63 kumpf 1.12 virtual void processing();
|
64 chip 1.9
|
65 kumpf 1.12 virtual void complete();
|
66 schuur 1.1
|
67 chip 1.8 // return the number of objects in this handler
|
68 kumpf 1.12 virtual Uint32 size() const;
|
69 brian.campbell 1.6
|
70 chip 1.8 // clear any objects in this handler
|
71 kumpf 1.12 virtual void clear();
|
72 brian.campbell 1.6
|
73 kumpf 1.12 ContentLanguageList getLanguages();
|
74 schuur 1.1
|
75 brian.campbell 1.6 protected:
|
76 chip 1.8 virtual void send(Boolean isComplete);
|
77 schuur 1.1
78 };
79
|
80 kumpf 1.12 class PEGASUS_PPM_LINKAGE SimpleInstanceResponseHandler :
81 public SimpleResponseHandler, public InstanceResponseHandler
|
82 schuur 1.1 {
83 public:
|
84 kumpf 1.12 SimpleInstanceResponseHandler();
|
85 chip 1.9
|
86 kumpf 1.12 virtual void processing();
|
87 chip 1.9
|
88 kumpf 1.12 virtual void complete();
|
89 chip 1.9
|
90 kumpf 1.12 virtual Uint32 size() const;
|
91 chip 1.9
|
92 kumpf 1.12 virtual void clear();
|
93 chip 1.9
|
94 kumpf 1.12 virtual void deliver(const CIMInstance& instance);
|
95 chip 1.9
|
96 kumpf 1.12 virtual void deliver(const Array<CIMInstance>& instances);
|
97 chip 1.9
|
98 kumpf 1.12 const Array<CIMInstance> getObjects() const;
|
99 schuur 1.1
100 private:
101 Array<CIMInstance> _objects;
102
103 };
104
|
105 kumpf 1.12 class PEGASUS_PPM_LINKAGE SimpleObjectPathResponseHandler :
106 public SimpleResponseHandler, public ObjectPathResponseHandler
|
107 schuur 1.1 {
108 public:
|
109 kumpf 1.12 SimpleObjectPathResponseHandler();
|
110 chip 1.9
|
111 kumpf 1.12 virtual void processing();
|
112 chip 1.9
|
113 kumpf 1.12 virtual void complete();
|
114 chip 1.9
|
115 kumpf 1.12 virtual Uint32 size() const;
|
116 chip 1.9
|
117 kumpf 1.12 virtual void clear();
|
118 chip 1.9
|
119 kumpf 1.12 virtual void deliver(const CIMObjectPath& objectPath);
|
120 chip 1.9
|
121 kumpf 1.12 virtual void deliver(const Array<CIMObjectPath>& objectPaths);
|
122 chip 1.9
|
123 kumpf 1.12 const Array<CIMObjectPath> getObjects() const;
|
124 schuur 1.1
125 private:
126 Array<CIMObjectPath> _objects;
127
128 };
129
|
130 kumpf 1.12 class PEGASUS_PPM_LINKAGE SimpleMethodResultResponseHandler :
131 public SimpleResponseHandler, public MethodResultResponseHandler
|
132 schuur 1.1 {
133 public:
|
134 kumpf 1.12 SimpleMethodResultResponseHandler();
|
135 chip 1.9
|
136 kumpf 1.12 virtual void processing();
|
137 chip 1.9
|
138 kumpf 1.12 virtual void complete();
|
139 chip 1.8
140 // NOTE: this is the total size (count) of ALL parameters!
|
141 kumpf 1.12 virtual Uint32 size() const;
|
142 chip 1.9
|
143 kumpf 1.12 virtual void clear();
|
144 chip 1.9
|
145 kumpf 1.12 virtual void deliverParamValue(const CIMParamValue& outParamValue);
|
146 chip 1.9
|
147 kumpf 1.12 virtual void deliverParamValue(const Array<CIMParamValue>& outParamValues);
|
148 chip 1.9
|
149 kumpf 1.12 virtual void deliver(const CIMValue& returnValue);
|
150 chip 1.9
|
151 kumpf 1.12 const Array<CIMParamValue> getParamValues() const;
|
152 chip 1.9
|
153 kumpf 1.12 const CIMValue getReturnValue() const;
|
154 schuur 1.1
155 private:
156 Array<CIMParamValue> _objects;
157
158 CIMValue _returnValue;
159
160 };
161
|
162 kumpf 1.12 class PEGASUS_PPM_LINKAGE SimpleIndicationResponseHandler :
163 public SimpleResponseHandler, public IndicationResponseHandler
|
164 schuur 1.1 {
165 public:
|
166 kumpf 1.12 SimpleIndicationResponseHandler();
|
167 chip 1.9
|
168 kumpf 1.12 virtual void processing();
|
169 chip 1.9
|
170 kumpf 1.12 virtual void complete();
|
171 chip 1.9
|
172 kumpf 1.12 virtual Uint32 size() const;
|
173 chip 1.9
|
174 kumpf 1.12 virtual void clear();
|
175 chip 1.9
|
176 kumpf 1.12 virtual void deliver(const CIMIndication& indication);
|
177 chip 1.9
|
178 kumpf 1.12 virtual void deliver(const Array<CIMIndication>& indications);
|
179 schuur 1.1
180 virtual void deliver(
|
181 kumpf 1.12 const OperationContext& context,
182 const CIMIndication& indication);
|
183 schuur 1.1
184 virtual void deliver(
|
185 kumpf 1.12 const OperationContext& context,
186 const Array<CIMIndication>& indications);
|
187 chip 1.9
|
188 kumpf 1.12 const Array<CIMIndication> getObjects() const;
|
189 schuur 1.1
|
190 chip 1.8 // ATTN: why is this variable public?
|
191 schuur 1.1 CIMInstance _provider;
192
193 private:
194 Array<CIMIndication> _objects;
195
196 };
197
|
198 kumpf 1.12 class PEGASUS_PPM_LINKAGE SimpleObjectResponseHandler :
199 public SimpleResponseHandler, public ObjectResponseHandler
|
200 schuur 1.1 {
201 public:
|
202 kumpf 1.12 SimpleObjectResponseHandler();
|
203 chip 1.9
|
204 kumpf 1.12 virtual void processing();
|
205 chip 1.9
|
206 kumpf 1.12 virtual void complete();
|
207 chip 1.9
|
208 kumpf 1.12 virtual Uint32 size() const;
|
209 chip 1.9
|
210 kumpf 1.12 virtual void clear();
|
211 chip 1.9
|
212 kumpf 1.12 virtual void deliver(const CIMObject& object);
|
213 chip 1.9
|
214 kumpf 1.12 virtual void deliver(const Array<CIMObject>& objects);
|
215 chip 1.9
|
216 kumpf 1.12 const Array<CIMObject> getObjects() const;
|
217 schuur 1.1
218 private:
219 Array<CIMObject> _objects;
220
221 };
222
|
223 kumpf 1.12 class PEGASUS_PPM_LINKAGE SimpleInstance2ObjectResponseHandler :
224 public SimpleResponseHandler, public InstanceResponseHandler
|
225 schuur 1.1 {
226 public:
|
227 kumpf 1.12 SimpleInstance2ObjectResponseHandler();
|
228 chip 1.9
|
229 kumpf 1.12 virtual void processing();
|
230 chip 1.9
|
231 kumpf 1.12 virtual void complete();
|
232 chip 1.9
|
233 kumpf 1.12 virtual Uint32 size() const;
|
234 chip 1.9
|
235 kumpf 1.12 virtual void clear();
|
236 chip 1.9
|
237 kumpf 1.12 virtual void deliver(const CIMInstance& object);
|
238 chip 1.9
|
239 kumpf 1.12 virtual void deliver(const Array<CIMInstance>& objects);
|
240 chip 1.9
|
241 kumpf 1.12 const Array<CIMObject> getObjects() const;
|
242 schuur 1.1
243 private:
244 Array<CIMObject> _objects;
245
246 };
247
|
248 kumpf 1.12 class PEGASUS_PPM_LINKAGE SimpleValueResponseHandler :
249 public SimpleResponseHandler, public ValueResponseHandler
|
250 schuur 1.1 {
251 public:
|
252 kumpf 1.12 SimpleValueResponseHandler();
|
253 chip 1.9
|
254 kumpf 1.12 virtual void processing();
|
255 chip 1.9
|
256 kumpf 1.12 virtual void complete();
|
257 chip 1.9
|
258 kumpf 1.12 virtual Uint32 size() const;
|
259 chip 1.9
|
260 kumpf 1.12 virtual void clear();
|
261 chip 1.9
|
262 kumpf 1.12 virtual void deliver(const CIMValue& value);
|
263 chip 1.9
|
264 kumpf 1.12 virtual void deliver(const Array<CIMValue>& values);
|
265 chip 1.9
|
266 kumpf 1.12 const Array<CIMValue> getObjects() const;
|
267 schuur 1.1
268 private:
269 Array<CIMValue> _objects;
270
271 };
272
273 PEGASUS_NAMESPACE_END
274
275 #endif
|