1 karl 1.11 //%2006////////////////////////////////////////////////////////////////////////
|
2 schuur 1.1 //
|
3 karl 1.5 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
6 schuur 1.1 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.5 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 karl 1.7 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.11 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 schuur 1.1 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
15 // of this software and associated documentation files (the "Software"), to
16 // deal in the Software without restriction, including without limitation the
17 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
18 // sell copies of the Software, and to permit persons to whom the Software is
19 // furnished to do so, subject to the following conditions:
|
20 karl 1.11 //
|
21 schuur 1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
22 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
24 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 //==============================================================================
31 //
32 //%/////////////////////////////////////////////////////////////////////////////
33
34 #ifndef Pegasus_SimpleResponseHandler_h
35 #define Pegasus_SimpleResponseHandler_h
36
37 #include <Pegasus/Common/Config.h>
38 #include <Pegasus/Common/ResponseHandler.h>
39
40 #include <Pegasus/ProviderManager2/Linkage.h>
41
42 schuur 1.1 PEGASUS_NAMESPACE_BEGIN
43
|
44 kumpf 1.3 //
45 // ValueResponseHandler (used internally to implement property operations)
46 //
47 class PEGASUS_PPM_LINKAGE ValueResponseHandler : virtual public ResponseHandler
48 {
49 public:
|
50 kumpf 1.12 virtual void deliver(const CIMValue& value) = 0;
|
51 kumpf 1.3
|
52 kumpf 1.12 virtual void deliver(const Array<CIMValue>& values) = 0;
|
53 kumpf 1.3 };
54
55
56 //
57 // SimpleResponseHandler
58 //
|
59 schuur 1.1 class PEGASUS_PPM_LINKAGE SimpleResponseHandler : virtual public ResponseHandler
60 {
61 public:
|
62 kumpf 1.12 SimpleResponseHandler();
63 virtual ~SimpleResponseHandler();
|
64 schuur 1.1
|
65 kumpf 1.12 virtual void processing();
|
66 chip 1.9
|
67 kumpf 1.12 virtual void complete();
|
68 schuur 1.1
|
69 chip 1.8 // return the number of objects in this handler
|
70 kumpf 1.12 virtual Uint32 size() const;
|
71 brian.campbell 1.6
|
72 chip 1.8 // clear any objects in this handler
|
73 kumpf 1.12 virtual void clear();
|
74 brian.campbell 1.6
|
75 kumpf 1.12 ContentLanguageList getLanguages();
|
76 schuur 1.1
|
77 brian.campbell 1.6 protected:
|
78 chip 1.8 virtual void send(Boolean isComplete);
|
79 schuur 1.1
80 };
81
|
82 kumpf 1.12 class PEGASUS_PPM_LINKAGE SimpleInstanceResponseHandler :
83 public SimpleResponseHandler, public InstanceResponseHandler
|
84 schuur 1.1 {
85 public:
|
86 kumpf 1.12 SimpleInstanceResponseHandler();
|
87 chip 1.9
|
88 kumpf 1.12 virtual void processing();
|
89 chip 1.9
|
90 kumpf 1.12 virtual void complete();
|
91 chip 1.9
|
92 kumpf 1.12 virtual Uint32 size() const;
|
93 chip 1.9
|
94 kumpf 1.12 virtual void clear();
|
95 chip 1.9
|
96 kumpf 1.12 virtual void deliver(const CIMInstance& instance);
|
97 chip 1.9
|
98 kumpf 1.12 virtual void deliver(const Array<CIMInstance>& instances);
|
99 chip 1.9
|
100 kumpf 1.12 const Array<CIMInstance> getObjects() const;
|
101 schuur 1.1
102 private:
103 Array<CIMInstance> _objects;
104
105 };
106
|
107 kumpf 1.12 class PEGASUS_PPM_LINKAGE SimpleObjectPathResponseHandler :
108 public SimpleResponseHandler, public ObjectPathResponseHandler
|
109 schuur 1.1 {
110 public:
|
111 kumpf 1.12 SimpleObjectPathResponseHandler();
|
112 chip 1.9
|
113 kumpf 1.12 virtual void processing();
|
114 chip 1.9
|
115 kumpf 1.12 virtual void complete();
|
116 chip 1.9
|
117 kumpf 1.12 virtual Uint32 size() const;
|
118 chip 1.9
|
119 kumpf 1.12 virtual void clear();
|
120 chip 1.9
|
121 kumpf 1.12 virtual void deliver(const CIMObjectPath& objectPath);
|
122 chip 1.9
|
123 kumpf 1.12 virtual void deliver(const Array<CIMObjectPath>& objectPaths);
|
124 chip 1.9
|
125 kumpf 1.12 const Array<CIMObjectPath> getObjects() const;
|
126 schuur 1.1
127 private:
128 Array<CIMObjectPath> _objects;
129
130 };
131
|
132 kumpf 1.12 class PEGASUS_PPM_LINKAGE SimpleMethodResultResponseHandler :
133 public SimpleResponseHandler, public MethodResultResponseHandler
|
134 schuur 1.1 {
135 public:
|
136 kumpf 1.12 SimpleMethodResultResponseHandler();
|
137 chip 1.9
|
138 kumpf 1.12 virtual void processing();
|
139 chip 1.9
|
140 kumpf 1.12 virtual void complete();
|
141 chip 1.8
142 // NOTE: this is the total size (count) of ALL parameters!
|
143 kumpf 1.12 virtual Uint32 size() const;
|
144 chip 1.9
|
145 kumpf 1.12 virtual void clear();
|
146 chip 1.9
|
147 kumpf 1.12 virtual void deliverParamValue(const CIMParamValue& outParamValue);
|
148 chip 1.9
|
149 kumpf 1.12 virtual void deliverParamValue(const Array<CIMParamValue>& outParamValues);
|
150 chip 1.9
|
151 kumpf 1.12 virtual void deliver(const CIMValue& returnValue);
|
152 chip 1.9
|
153 kumpf 1.12 const Array<CIMParamValue> getParamValues() const;
|
154 chip 1.9
|
155 kumpf 1.12 const CIMValue getReturnValue() const;
|
156 schuur 1.1
157 private:
158 Array<CIMParamValue> _objects;
159
160 CIMValue _returnValue;
161
162 };
163
|
164 kumpf 1.12 class PEGASUS_PPM_LINKAGE SimpleIndicationResponseHandler :
165 public SimpleResponseHandler, public IndicationResponseHandler
|
166 schuur 1.1 {
167 public:
|
168 kumpf 1.12 SimpleIndicationResponseHandler();
|
169 chip 1.9
|
170 kumpf 1.12 virtual void processing();
|
171 chip 1.9
|
172 kumpf 1.12 virtual void complete();
|
173 chip 1.9
|
174 kumpf 1.12 virtual Uint32 size() const;
|
175 chip 1.9
|
176 kumpf 1.12 virtual void clear();
|
177 chip 1.9
|
178 kumpf 1.12 virtual void deliver(const CIMIndication& indication);
|
179 chip 1.9
|
180 kumpf 1.12 virtual void deliver(const Array<CIMIndication>& indications);
|
181 schuur 1.1
182 virtual void deliver(
|
183 kumpf 1.12 const OperationContext& context,
184 const CIMIndication& indication);
|
185 schuur 1.1
186 virtual void deliver(
|
187 kumpf 1.12 const OperationContext& context,
188 const Array<CIMIndication>& indications);
|
189 chip 1.9
|
190 kumpf 1.12 const Array<CIMIndication> getObjects() const;
|
191 schuur 1.1
|
192 chip 1.8 // ATTN: why is this variable public?
|
193 schuur 1.1 CIMInstance _provider;
194
195 private:
196 Array<CIMIndication> _objects;
197
198 };
199
|
200 kumpf 1.12 class PEGASUS_PPM_LINKAGE SimpleObjectResponseHandler :
201 public SimpleResponseHandler, public ObjectResponseHandler
|
202 schuur 1.1 {
203 public:
|
204 kumpf 1.12 SimpleObjectResponseHandler();
|
205 chip 1.9
|
206 kumpf 1.12 virtual void processing();
|
207 chip 1.9
|
208 kumpf 1.12 virtual void complete();
|
209 chip 1.9
|
210 kumpf 1.12 virtual Uint32 size() const;
|
211 chip 1.9
|
212 kumpf 1.12 virtual void clear();
|
213 chip 1.9
|
214 kumpf 1.12 virtual void deliver(const CIMObject& object);
|
215 chip 1.9
|
216 kumpf 1.12 virtual void deliver(const Array<CIMObject>& objects);
|
217 chip 1.9
|
218 kumpf 1.12 const Array<CIMObject> getObjects() const;
|
219 schuur 1.1
220 private:
221 Array<CIMObject> _objects;
222
223 };
224
|
225 kumpf 1.12 class PEGASUS_PPM_LINKAGE SimpleInstance2ObjectResponseHandler :
226 public SimpleResponseHandler, public InstanceResponseHandler
|
227 schuur 1.1 {
228 public:
|
229 kumpf 1.12 SimpleInstance2ObjectResponseHandler();
|
230 chip 1.9
|
231 kumpf 1.12 virtual void processing();
|
232 chip 1.9
|
233 kumpf 1.12 virtual void complete();
|
234 chip 1.9
|
235 kumpf 1.12 virtual Uint32 size() const;
|
236 chip 1.9
|
237 kumpf 1.12 virtual void clear();
|
238 chip 1.9
|
239 kumpf 1.12 virtual void deliver(const CIMInstance& object);
|
240 chip 1.9
|
241 kumpf 1.12 virtual void deliver(const Array<CIMInstance>& objects);
|
242 chip 1.9
|
243 kumpf 1.12 const Array<CIMObject> getObjects() const;
|
244 schuur 1.1
245 private:
246 Array<CIMObject> _objects;
247
248 };
249
|
250 kumpf 1.12 class PEGASUS_PPM_LINKAGE SimpleValueResponseHandler :
251 public SimpleResponseHandler, public ValueResponseHandler
|
252 schuur 1.1 {
253 public:
|
254 kumpf 1.12 SimpleValueResponseHandler();
|
255 chip 1.9
|
256 kumpf 1.12 virtual void processing();
|
257 chip 1.9
|
258 kumpf 1.12 virtual void complete();
|
259 chip 1.9
|
260 kumpf 1.12 virtual Uint32 size() const;
|
261 chip 1.9
|
262 kumpf 1.12 virtual void clear();
|
263 chip 1.9
|
264 kumpf 1.12 virtual void deliver(const CIMValue& value);
|
265 chip 1.9
|
266 kumpf 1.12 virtual void deliver(const Array<CIMValue>& values);
|
267 chip 1.9
|
268 kumpf 1.12 const Array<CIMValue> getObjects() const;
|
269 schuur 1.1
270 private:
271 Array<CIMValue> _objects;
272
273 };
274
275 PEGASUS_NAMESPACE_END
276
277 #endif
|