1 karl 1.27 //%2006////////////////////////////////////////////////////////////////////////
|
2 mday 1.1 //
|
3 karl 1.24 // 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 karl 1.23 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.24 // 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.26 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.27 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 mday 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 kumpf 1.19 //
|
21 mday 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_CimomMessage_h
35 #define Pegasus_CimomMessage_h
36
37 #include <Pegasus/Common/Config.h>
|
38 kumpf 1.21 #include <Pegasus/Common/InternalException.h>
|
39 mday 1.1 #include <Pegasus/Common/MessageQueue.h>
40 #include <Pegasus/Common/AsyncOpNode.h>
|
41 kumpf 1.32 #include <Pegasus/Common/Array.h>
|
42 kumpf 1.20 #include <Pegasus/Common/Linkage.h>
|
43 mday 1.1
44 PEGASUS_NAMESPACE_BEGIN
|
45 kumpf 1.31
|
46 mday 1.1 //
47 // This identifier is the queue id for CIMOM queue. It is initialized in
48 // CimomMessage.cpp by calling MessageQueue::getNextQueueId(). Note that
49 // this value is passed in the constructor for the CIMOM queue.
50 //
51 extern const Uint32 CIMOM_Q_ID;
52
53 class PEGASUS_COMMON_LINKAGE async_results
54 {
|
55 kumpf 1.31 public:
56 static const Uint32 OK;
57 static const Uint32 PARAMETER_ERROR;
58 static const Uint32 MODULE_ALREADY_REGISTERED;
59 static const Uint32 MODULE_NOT_FOUND;
60 static const Uint32 INTERNAL_ERROR;
61
62 static const Uint32 ASYNC_STARTED;
63 static const Uint32 ASYNC_PROCESSING;
64 static const Uint32 ASYNC_COMPLETE;
65 static const Uint32 ASYNC_CANCELLED;
66 static const Uint32 ASYNC_PAUSED;
67 static const Uint32 ASYNC_RESUMED;
68
69 static const Uint32 CIM_SERVICE_STARTED;
70 static const Uint32 CIM_SERVICE_STOPPED;
71 static const Uint32 CIM_SERVICE_PAUSED;
72
73 static const Uint32 CIM_SERVICE_RESUMED;
74 static const Uint32 CIM_NAK;
75
76 kumpf 1.31 static const Uint32 ASYNC_PHASE_COMPLETE;
77 static const Uint32 ASYNC_CHILD_COMPLETE;
78 static const Uint32 ASYNC_PHASE_STARTED;
79 static const Uint32 ASYNC_CHILD_STARTED;
80 static const Uint32 CIM_PAUSED;
81 static const Uint32 CIM_STOPPED;
|
82 mday 1.1 };
83
84 class PEGASUS_COMMON_LINKAGE async_messages
85 {
|
86 kumpf 1.31 public:
87 static const Uint32 HEARTBEAT;
88 static const Uint32 REPLY;
89 static const Uint32 REGISTER_CIM_SERVICE;
90 static const Uint32 DEREGISTER_CIM_SERVICE;
91 static const Uint32 UPDATE_CIM_SERVICE;
92 static const Uint32 IOCTL;
93 static const Uint32 CIMSERVICE_START;
94 static const Uint32 CIMSERVICE_STOP;
95 static const Uint32 CIMSERVICE_PAUSE;
96 static const Uint32 CIMSERVICE_RESUME;
97 static const Uint32 PROVIDERS_STOP;
98
99 static const Uint32 ASYNC_OP_START;
100 static const Uint32 ASYNC_OP_RESULT;
101 static const Uint32 ASYNC_LEGACY_OP_START;
102 static const Uint32 ASYNC_LEGACY_OP_RESULT;
103
104 static const Uint32 FIND_SERVICE_Q;
105 static const Uint32 FIND_SERVICE_Q_RESULT;
106 static const Uint32 ENUMERATE_SERVICE;
107 kumpf 1.31 static const Uint32 ENUMERATE_SERVICE_RESULT;
108
109 static const Uint32 REGISTERED_MODULE;
110 static const Uint32 DEREGISTERED_MODULE;
111 static const Uint32 FIND_MODULE_IN_SERVICE;
112 static const Uint32 FIND_MODULE_IN_SERVICE_RESPONSE;
|
113 mday 1.16
|
114 kumpf 1.31 static const Uint32 ASYNC_MODULE_OP_START;
115 static const Uint32 ASYNC_MODULE_OP_RESULT;
|
116 mday 1.1 };
117
118
119 class PEGASUS_COMMON_LINKAGE AsyncMessage : public Message
120 {
|
121 kumpf 1.31 public:
122 AsyncMessage(
123 Uint32 type,
124 Uint32 destination,
125 Uint32 mask,
126 AsyncOpNode* operation);
|
127 kumpf 1.28
|
128 kumpf 1.31 virtual ~AsyncMessage();
129
130 AsyncOpNode* op;
|
131 mday 1.1 };
132
133
134 class PEGASUS_COMMON_LINKAGE AsyncRequest : public AsyncMessage
135 {
|
136 kumpf 1.31 public:
137 AsyncRequest(
138 Uint32 type,
139 Uint32 mask,
140 AsyncOpNode* operation,
141 Uint32 destination,
142 Uint32 response,
143 Boolean blocking);
144
145 virtual ~AsyncRequest();
146
147 Uint32 resp;
148 Boolean block;
|
149 mday 1.1 };
150
151 class PEGASUS_COMMON_LINKAGE AsyncReply : public AsyncMessage
152 {
|
153 kumpf 1.31 public:
154 AsyncReply(
155 Uint32 type,
156 Uint32 mask,
157 AsyncOpNode* operation,
158 Uint32 resultCode,
159 Uint32 destination,
160 Boolean blocking);
|
161 mday 1.1
|
162 kumpf 1.31 virtual ~AsyncReply() { }
|
163 mday 1.1
|
164 kumpf 1.31 Uint32 result;
165 Boolean block;
166 };
|
167 mday 1.1
168 class PEGASUS_COMMON_LINKAGE RegisterCimService : public AsyncRequest
169 {
|
170 kumpf 1.31 public:
171 RegisterCimService(
172 AsyncOpNode* operation,
173 Boolean blocking,
174 const String& serviceName,
175 Uint32 serviceCapabilities,
176 Uint32 serviceMask,
177 Uint32 serviceQueue);
178
179 virtual ~RegisterCimService()
180 {
181 }
182
183 String name;
184 Uint32 capabilities;
185 Uint32 mask;
186 Uint32 queue;
|
187 mday 1.1 };
188
189 class PEGASUS_COMMON_LINKAGE DeRegisterCimService : public AsyncRequest
190 {
|
191 kumpf 1.31 public:
192 DeRegisterCimService(
193 AsyncOpNode* operation,
194 Boolean blocking,
195 Uint32 serviceQueue);
196
197 virtual ~DeRegisterCimService()
198 {
199 }
200
201 Uint32 queue;
202 };
|
203 mday 1.1
204 class PEGASUS_COMMON_LINKAGE UpdateCimService : public AsyncRequest
205 {
|
206 kumpf 1.31 public:
207 UpdateCimService(
208 AsyncOpNode* operation,
209 Boolean blocking,
210 Uint32 serviceQueue,
211 Uint32 serviceCapabilities,
212 Uint32 serviceMask);
213
214 virtual ~UpdateCimService()
215 {
216 }
217
218 Uint32 queue;
219 Uint32 capabilities;
220 Uint32 mask;
|
221 mday 1.1 };
222
|
223 mday 1.14
224 class PEGASUS_COMMON_LINKAGE RegisteredModule : public AsyncRequest
225 {
|
226 kumpf 1.31 public:
227 RegisteredModule(
228 AsyncOpNode* operation,
229 Boolean blocking,
230 Uint32 serviceQueue,
231 const String& newModule);
232
233 virtual ~RegisteredModule()
234 {
235 }
236
237 String _module;
|
238 mday 1.14 };
239
240
241 class PEGASUS_COMMON_LINKAGE DeRegisteredModule : public AsyncRequest
242 {
|
243 kumpf 1.31 public:
244 DeRegisteredModule(
245 AsyncOpNode* operation,
246 Boolean blocking,
247 Uint32 serviceQueue,
248 const String& removedModule);
249
250 virtual ~DeRegisteredModule()
251 {
252 }
253
254 String _module;
|
255 mday 1.14 };
256
257
258 class PEGASUS_COMMON_LINKAGE FindModuleInService : public AsyncRequest
259 {
|
260 kumpf 1.31 public:
261 FindModuleInService(
262 AsyncOpNode* operation,
263 Boolean blocking,
264 Uint32 responseQueue,
265 const String& module);
266
267 virtual ~FindModuleInService()
268 {
269 }
270
271 String _module;
|
272 mday 1.14 };
273
274 class PEGASUS_COMMON_LINKAGE FindModuleInServiceResponse : public AsyncReply
275 {
|
276 kumpf 1.31 public:
277 FindModuleInServiceResponse(
278 AsyncOpNode* operation,
279 Uint32 resultCode,
280 Uint32 destination,
281 Boolean blocking,
282 Uint32 moduleServiceQueue);
283
284 virtual ~FindModuleInServiceResponse()
285 {
286 }
287
288 Uint32 _module_service_queue;
|
289 mday 1.14 };
|
290 mday 1.1
291 class PEGASUS_COMMON_LINKAGE AsyncIoctl : public AsyncRequest
292 {
|
293 kumpf 1.31 public:
294 AsyncIoctl(
295 AsyncOpNode* operation,
296 Uint32 destination,
297 Uint32 response,
298 Boolean blocking,
299 Uint32 code,
300 Uint32 intParam,
301 void* pParam);
302
303 virtual ~AsyncIoctl()
304 {
305 }
306
307 enum
308 {
309 IO_CLOSE,
310 IO_OPEN,
311 IO_SOURCE_QUENCH,
312 IO_SERVICE_DEFINED,
313 IO_IDLE_CONTROL
314 kumpf 1.31 };
315
316 Uint32 ctl;
317 Uint32 intp;
318 void* voidp;
|
319 mday 1.1 };
320
321 class PEGASUS_COMMON_LINKAGE CimServiceStart : public AsyncRequest
322 {
|
323 kumpf 1.31 public:
324 CimServiceStart(
325 AsyncOpNode* operation,
326 Uint32 destination,
327 Uint32 response,
328 Boolean blocking);
329
330 virtual ~CimServiceStart()
331 {
332 }
|
333 mday 1.1 };
334
335 class PEGASUS_COMMON_LINKAGE CimServiceStop : public AsyncRequest
336 {
|
337 kumpf 1.31 public:
338 CimServiceStop(
339 AsyncOpNode* operation,
340 Uint32 destination,
341 Uint32 response,
342 Boolean blocking);
343
344 virtual ~CimServiceStop()
345 {
346 }
|
347 mday 1.1 };
348
349 class PEGASUS_COMMON_LINKAGE CimServicePause : public AsyncRequest
350 {
|
351 kumpf 1.31 public:
352 CimServicePause(
353 AsyncOpNode* operation,
354 Uint32 destination,
355 Uint32 response,
356 Boolean blocking);
357
358 virtual ~CimServicePause()
359 {
360 }
|
361 mday 1.1 };
362
363 class PEGASUS_COMMON_LINKAGE CimServiceResume : public AsyncRequest
364 {
|
365 kumpf 1.31 public:
366 CimServiceResume(
367 AsyncOpNode* operation,
368 Uint32 destination,
369 Uint32 response,
370 Boolean blocking);
371
372 virtual ~CimServiceResume()
373 {
374 }
|
375 kumpf 1.18 };
376
377 class PEGASUS_COMMON_LINKAGE CimProvidersStop : public AsyncRequest
378 {
|
379 kumpf 1.31 public:
380 CimProvidersStop(
381 AsyncOpNode* operation,
382 Uint32 destination,
383 Uint32 response,
384 Boolean blocking);
385
386 virtual ~CimProvidersStop()
387 {
388 }
|
389 mday 1.1 };
390
391 class PEGASUS_COMMON_LINKAGE AsyncOperationStart : public AsyncRequest
392 {
|
393 kumpf 1.31 public:
394 AsyncOperationStart(
395 AsyncOpNode* operation,
396 Uint32 destination,
397 Uint32 response,
398 Boolean blocking,
399 Message* action);
400
401 virtual ~AsyncOperationStart()
402 {
403 delete _act;
404 }
405
406 Message* get_action();
407
408 private:
409 friend class MessageQueueService;
410 friend class cimom;
411 Message* _act;
|
412 mday 1.1 };
413
414 class PEGASUS_COMMON_LINKAGE AsyncOperationResult : public AsyncReply
415 {
|
416 kumpf 1.31 public:
417 AsyncOperationResult(
418 AsyncOpNode* operation,
419 Uint32 resultCode,
420 Uint32 destination,
421 Boolean blocking);
422
423 virtual ~AsyncOperationResult()
424 {
425 }
|
426 mday 1.1 };
|
427 mday 1.16
428
429 class PEGASUS_COMMON_LINKAGE AsyncModuleOperationStart : public AsyncRequest
430 {
|
431 kumpf 1.31 public:
432 AsyncModuleOperationStart(
433 AsyncOpNode* operation,
434 Uint32 destination,
435 Uint32 response,
436 Boolean blocking,
437 const String& targetModule,
438 Message* action);
439
440 virtual ~AsyncModuleOperationStart()
441 {
442 delete _act;
443 }
444
445 Message* get_action();
446
447 private:
448 friend class MessageQueueService;
449 friend class cimom;
450 friend class ModuleController;
451 String _target_module;
452 kumpf 1.31 Message* _act;
|
453 mday 1.16 };
454
455 class PEGASUS_COMMON_LINKAGE AsyncModuleOperationResult : public AsyncReply
456 {
|
457 kumpf 1.31 public:
458 AsyncModuleOperationResult(
459 AsyncOpNode* operation,
460 Uint32 resultCode,
461 Uint32 destination,
462 Boolean blocking,
463 const String& targetModule,
464 Message* action);
465
466 virtual ~AsyncModuleOperationResult()
467 {
468 delete _res;
469 }
470
471 Message* get_result();
472
473 private:
474 friend class MessageQueueService;
475 friend class cimom;
476 friend class ModuleController;
477 String _targetModule;
478 kumpf 1.31 Message* _res;
|
479 mday 1.16 };
480
|
481 mday 1.1 class PEGASUS_COMMON_LINKAGE AsyncLegacyOperationStart : public AsyncRequest
482 {
|
483 kumpf 1.31 public:
484 AsyncLegacyOperationStart(
485 AsyncOpNode* operation,
486 Uint32 destination,
487 Message* action,
488 Uint32 actionDestination);
489
490 virtual ~AsyncLegacyOperationStart()
491 {
492 delete _act;
493 }
494
495 Message* get_action();
496
497 private:
498 friend class MessageQueueService;
499 friend class cimom;
500 Message* _act;
501 Uint32 _legacy_destination;
|
502 mday 1.1 };
503
504 class PEGASUS_COMMON_LINKAGE AsyncLegacyOperationResult : public AsyncReply
505 {
|
506 kumpf 1.31 public:
507 AsyncLegacyOperationResult(
508 AsyncOpNode* operation,
509 Message* result);
510
511 virtual ~AsyncLegacyOperationResult()
512 {
513 delete _res;
514 }
515
516 Message* get_result();
517
518 private:
519 friend class MessageQueueService;
520 friend class cimom;
521 Message* _res;
|
522 mday 1.1 };
523
524 class PEGASUS_COMMON_LINKAGE FindServiceQueue : public AsyncRequest
525 {
|
526 kumpf 1.31 public:
527 FindServiceQueue(
528 AsyncOpNode* operation,
529 Uint32 response,
530 Boolean blocking,
531 const String& serviceName,
532 Uint32 serviceCapabilities,
533 Uint32 serviceMask);
534
535 virtual ~FindServiceQueue()
536 {
537 }
538
539 String name;
540 Uint32 capabilities;
541 Uint32 mask;
542 };
|
543 mday 1.1
544 class PEGASUS_COMMON_LINKAGE FindServiceQueueResult : public AsyncReply
545 {
|
546 kumpf 1.31 public:
547 FindServiceQueueResult(
548 AsyncOpNode* operation,
549 Uint32 resultCode,
550 Uint32 destination,
551 Boolean blocking,
552 Array<Uint32> queueIds);
553
554 virtual ~FindServiceQueueResult()
555 {
556 }
557
558 Array<Uint32> qids;
559 };
|
560 mday 1.1
561 class PEGASUS_COMMON_LINKAGE EnumerateService : public AsyncRequest
562 {
|
563 kumpf 1.31 public:
564 EnumerateService(
565 AsyncOpNode* operation,
566 Uint32 response,
567 Boolean blocking,
568 Uint32 queueId);
569
570 virtual ~EnumerateService()
571 {
572 }
573
574 Uint32 qid;
|
575 mday 1.1 };
576
577 class PEGASUS_COMMON_LINKAGE EnumerateServiceResponse : public AsyncReply
578 {
|
579 kumpf 1.31 public:
580 EnumerateServiceResponse(
581 AsyncOpNode* operation,
582 Uint32 resultCode,
583 Uint32 response,
584 Boolean blocking,
585 const String& serviceName,
586 Uint32 serviceCapabilities,
587 Uint32 serviceMask,
588 Uint32 serviceQid);
589
590 virtual ~EnumerateServiceResponse()
591 {
592 }
593
594 String name;
595 Uint32 capabilities;
596 Uint32 mask;
597 Uint32 qid;
|
598 mday 1.1 };
599
600 PEGASUS_NAMESPACE_END
601
|
602 kumpf 1.31 #endif // Pegasus_CimomMessage_h
|