(file) Return to CimomMessage.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

  1 kumpf 1.19 //%/////////////////////////////////////////////////////////////////////////////
  2 mday  1.1  //
  3 kumpf 1.19 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
  4 mday  1.1  // The Open Group, Tivoli Systems
  5            //
  6            // Permission is hereby granted, free of charge, to any person obtaining a copy
  7            // of this software and associated documentation files (the "Software"), to
  8            // deal in the Software without restriction, including without limitation the
  9            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 10            // sell copies of the Software, and to permit persons to whom the Software is
 11            // furnished to do so, subject to the following conditions:
 12 kumpf 1.19 // 
 13 mday  1.1  // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 14            // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 15            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 16            // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 17            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 18            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 19            // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 20            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 21            //
 22            //==============================================================================
 23            //
 24            // Author: Mike Day (mdday@us.ibm.com)
 25            //
 26            // Modified By:
 27            //
 28            //%/////////////////////////////////////////////////////////////////////////////
 29            
 30            #ifndef Pegasus_CimomMessage_h
 31            #define Pegasus_CimomMessage_h
 32            
 33            #include <Pegasus/Common/Config.h>
 34 kumpf 1.21 #include <Pegasus/Common/InternalException.h>
 35 mday  1.1  #include <Pegasus/Common/MessageQueue.h>
 36            #include <Pegasus/Common/AsyncOpNode.h>
 37 kumpf 1.20 #include <Pegasus/Common/Linkage.h>
 38 mday  1.1  
 39            PEGASUS_NAMESPACE_BEGIN
 40            //
 41            // This identifier is the queue id for CIMOM queue. It is initialized in
 42            // CimomMessage.cpp by calling MessageQueue::getNextQueueId(). Note that
 43            // this value is passed in the constructor for the CIMOM queue.
 44            //
 45            extern const Uint32 CIMOM_Q_ID;
 46            
 47            class AsyncOpNode;
 48            
 49            class PEGASUS_COMMON_LINKAGE async_results
 50            {
 51               public:
 52                  static const Uint32 OK;
 53                  static const Uint32 PARAMETER_ERROR;
 54                  static const Uint32 MODULE_ALREADY_REGISTERED;
 55                  static const Uint32 MODULE_NOT_FOUND;
 56                  static const Uint32 INTERNAL_ERROR;
 57            
 58                  static const Uint32 ASYNC_STARTED;
 59 mday  1.1        static const Uint32 ASYNC_PROCESSING;
 60                  static const Uint32 ASYNC_COMPLETE;
 61                  static const Uint32 ASYNC_CANCELLED;
 62                  static const Uint32 ASYNC_PAUSED;
 63                  static const Uint32 ASYNC_RESUMED;
 64            
 65                  static const Uint32 CIM_SERVICE_STARTED;
 66                  static const Uint32 CIM_SERVICE_STOPPED;
 67                  static const Uint32 CIM_SERVICE_PAUSED;
 68            
 69                  static const Uint32 CIM_SERVICE_RESUMED;
 70                  static const Uint32 CIM_NAK;
 71            
 72                  static const Uint32 ASYNC_PHASE_COMPLETE;
 73                  static const Uint32 ASYNC_CHILD_COMPLETE;
 74                  static const Uint32 ASYNC_PHASE_STARTED;
 75                  static const Uint32 ASYNC_CHILD_STARTED;
 76 mday  1.4        static const Uint32 CIM_PAUSED;
 77                  static const Uint32 CIM_STOPPED;
 78 mday  1.1  };
 79            
 80            
 81            class PEGASUS_COMMON_LINKAGE async_messages
 82            {
 83               public:
 84                  static const Uint32 HEARTBEAT;
 85                  static const Uint32 REPLY;
 86                  static const Uint32 REGISTER_CIM_SERVICE;
 87                  static const Uint32 DEREGISTER_CIM_SERVICE;
 88                  static const Uint32 UPDATE_CIM_SERVICE;
 89                  static const Uint32 IOCTL;
 90                  static const Uint32 CIMSERVICE_START;
 91                  static const Uint32 CIMSERVICE_STOP;
 92                  static const Uint32 CIMSERVICE_PAUSE;
 93                  static const Uint32 CIMSERVICE_RESUME;
 94 kumpf 1.18       static const Uint32 PROVIDERS_STOP;
 95 mday  1.1  
 96                  static const Uint32 ASYNC_OP_START;
 97                  static const Uint32 ASYNC_OP_RESULT;
 98                  static const Uint32 ASYNC_LEGACY_OP_START;
 99                  static const Uint32 ASYNC_LEGACY_OP_RESULT;
100            
101                  static const Uint32 FIND_SERVICE_Q;
102                  static const Uint32 FIND_SERVICE_Q_RESULT;
103                  static const Uint32 ENUMERATE_SERVICE;
104                  static const Uint32 ENUMERATE_SERVICE_RESULT;
105 mday  1.14 
106                  static const Uint32 REGISTERED_MODULE;
107                  static const Uint32 DEREGISTERED_MODULE;
108                  static const Uint32 FIND_MODULE_IN_SERVICE;
109                  static const Uint32 FIND_MODULE_IN_SERVICE_RESPONSE;
110 mday  1.16 
111                  static const Uint32 ASYNC_MODULE_OP_START;
112                  static const Uint32 ASYNC_MODULE_OP_RESULT;
113 mday  1.1  };
114            
115            
116            class PEGASUS_COMMON_LINKAGE AsyncMessage : public Message
117            {
118               public:
119                  AsyncMessage(Uint32 type, 
120 mday  1.6  		   Uint32 destination,
121 mday  1.1  		   Uint32 key, 
122            		   Uint32 routing,
123            		   Uint32 mask,
124            		   AsyncOpNode *operation);
125                       
126                  virtual ~AsyncMessage(void) 
127                  {
128            	 
129                  }
130                  
131 kumpf 1.11       Boolean operator ==(const void *key);
132 mday  1.1        Boolean operator ==(const AsyncMessage& msg);
133                  
134                  AsyncOpNode *op;
135 mday  1.13 //      Thread *_myself;
136            //      MessageQueue *_service;
137 mday  1.1  };
138            
139            
140 kumpf 1.11 inline Boolean AsyncMessage::operator ==(const void *key)
141 mday  1.1  {
142               if( key == reinterpret_cast<void *>(this))
143                  return true;
144               return false;
145            }
146            
147            inline Boolean AsyncMessage::operator ==(const AsyncMessage& msg)
148            {
149               return this->operator==(reinterpret_cast<void *>(const_cast<AsyncMessage *>(&msg)));
150            }
151            
152            
153            class PEGASUS_COMMON_LINKAGE AsyncRequest : public AsyncMessage
154            {
155               public:
156                  AsyncRequest(Uint32 type, 
157            		   Uint32 key, 
158            		   Uint32 routing,
159            		   Uint32 mask,
160            		   AsyncOpNode *operation,
161            		   Uint32 destination,
162 mday  1.1  		   Uint32 response,
163            		   Boolean blocking);
164                  
165                  
166                  virtual ~AsyncRequest(void) 
167                  {
168            
169                  }
170                        
171                  Uint32 resp;
172                  Boolean block;
173            };
174            
175            class PEGASUS_COMMON_LINKAGE AsyncReply : public AsyncMessage
176            {
177               public:
178                  AsyncReply(Uint32 type, 
179            		 Uint32 key, 
180            		 Uint32 routing, 
181            		 Uint32 mask,
182            		 AsyncOpNode *operation,
183 mday  1.1  		 Uint32 result_code,
184            		 Uint32 destination,
185            		 Boolean blocking);
186                  
187                  
188                  virtual ~AsyncReply(void)
189                  {
190 mday  1.2  	 
191 mday  1.1        }
192                        
193                  Uint32 result;
194                  Boolean block;
195            };
196            
197            
198            
199            class PEGASUS_COMMON_LINKAGE RegisterCimService : public AsyncRequest
200            {
201               public: 
202                  RegisterCimService(Uint32 routing, 
203            			 AsyncOpNode *operation,
204            			 Boolean blocking,
205            			 String service_name,
206            			 Uint32 service_capabilities, 
207            			 Uint32 service_mask,
208            			 Uint32 service_queue);
209                  
210                  virtual ~RegisterCimService(void) 
211                  {
212 mday  1.1  
213                  }
214                  
215                  String name;
216                  Uint32 capabilities;
217                  Uint32 mask;
218                  Uint32 queue;
219            };
220            
221            class PEGASUS_COMMON_LINKAGE DeRegisterCimService : public AsyncRequest
222            {
223               public:
224                  DeRegisterCimService(Uint32 routing, 
225            			   AsyncOpNode *operation,
226            			   Boolean blocking, 
227            			   Uint32 service_queue);
228                  
229                  
230                  virtual ~DeRegisterCimService(void)
231                  {
232            
233 mday  1.1        }
234                  
235                  Uint32 queue;
236            } ;
237            
238            class PEGASUS_COMMON_LINKAGE UpdateCimService : public AsyncRequest
239            {
240               public:
241                  UpdateCimService(Uint32 routing, 
242            		       AsyncOpNode *operation,
243            		       Boolean blocking, 
244            		       Uint32 service_queue, 
245            		       Uint32 service_capabilities, 
246            		       Uint32 service_mask);
247            
248                  virtual ~UpdateCimService(void) 
249                  {
250            
251                  }
252                  
253                  Uint32 queue;
254 mday  1.1        Uint32 capabilities;
255                  Uint32 mask;
256            };
257            
258 mday  1.14 
259            class PEGASUS_COMMON_LINKAGE RegisteredModule : public AsyncRequest
260            {
261               public:
262                  RegisteredModule(Uint32 routing, 
263            		       AsyncOpNode *operation,
264            		       Boolean blocking, 
265            		       Uint32 service_queue,
266            		       String new_module );
267            
268                  virtual ~RegisteredModule(void)
269                  {
270            
271                  }
272                  
273                  String _module;
274            };
275            
276            
277            class PEGASUS_COMMON_LINKAGE DeRegisteredModule : public AsyncRequest
278            {
279 mday  1.14    public:
280                  DeRegisteredModule(Uint32 routing, 
281            		       AsyncOpNode *operation,
282            		       Boolean blocking, 
283            		       Uint32 service_queue,
284            		       String removed_module );
285            
286                  virtual ~DeRegisteredModule(void)
287                  {
288                  }
289                  
290                  String _module;
291            };
292            
293            
294            class PEGASUS_COMMON_LINKAGE FindModuleInService : public AsyncRequest
295            {
296               public:
297                  FindModuleInService(Uint32 routing, 
298            			  AsyncOpNode *operation, 
299            			  Boolean blocking, 
300 mday  1.14 			  Uint32 response_queue,
301            			  String module);
302 kumpf 1.15       virtual ~FindModuleInService(void)
303                  {
304                  }
305 mday  1.14       
306                  String _module;
307                  
308            };
309            
310            class PEGASUS_COMMON_LINKAGE FindModuleInServiceResponse : public AsyncReply
311            {
312               public:
313                  FindModuleInServiceResponse(Uint32 routing, 
314            				  Uint32 key,
315            				  AsyncOpNode *operation,
316            				  Uint32 result_code, 
317            				  Uint32 destination, 
318            				  Uint32 blocking, 
319            				  Uint32 module_service_queue);
320            
321 kumpf 1.15       virtual ~FindModuleInServiceResponse(void)
322                  {
323                  }
324 mday  1.14       
325                  Uint32 _module_service_queue;
326            };
327 mday  1.1  
328            class PEGASUS_COMMON_LINKAGE AsyncIoctl : public AsyncRequest
329            {
330               public:
331                  AsyncIoctl(Uint32 routing, 
332            		 AsyncOpNode *operation, 
333            		 Uint32 destination, 
334            		 Uint32 response,
335            		 Boolean blocking,
336            		 Uint32 code, 
337            		 Uint32 int_param,
338            		 void *p_param);
339            
340                  virtual ~AsyncIoctl(void)
341                  {
342            
343                  }
344                  
345 mday  1.3        enum 
346                  {
347            	 IO_CLOSE,
348            	 IO_OPEN,
349            	 IO_SOURCE_QUENCH,
350 mday  1.22 	 IO_SERVICE_DEFINED, 
351            	 IO_IDLE_CONTROL
352 mday  1.3        };
353                  
354                  
355            
356 mday  1.1        Uint32 ctl;
357                  Uint32 intp;
358                  void *voidp;
359 mday  1.3  
360 mday  1.1  };
361            
362            class PEGASUS_COMMON_LINKAGE CimServiceStart : public AsyncRequest
363            {
364               public:
365                  CimServiceStart(Uint32 routing, 
366            		      AsyncOpNode *operation, 
367            		      Uint32 destination, 
368            		      Uint32 response, 
369            		      Boolean blocking);
370                  
371                  virtual ~CimServiceStart(void) 
372                  {
373            	 
374                  }
375            };
376            
377            
378            class PEGASUS_COMMON_LINKAGE CimServiceStop : public AsyncRequest
379            {
380               public:
381 mday  1.1        CimServiceStop(Uint32 routing, 
382            		     AsyncOpNode *operation, 
383            		     Uint32 destination, 
384            		     Uint32 response, 
385            		     Boolean blocking);
386                        
387                  virtual ~CimServiceStop(void) 
388                  {
389            
390                  }
391            };
392            
393            class PEGASUS_COMMON_LINKAGE CimServicePause : public AsyncRequest
394            {
395               public:
396                  CimServicePause(Uint32 routing, 
397            		      AsyncOpNode *operation, 
398            		      Uint32 destination, 
399            		      Uint32 response, 
400            		      Boolean blocking);
401                  
402 mday  1.1        
403                  virtual ~CimServicePause(void)
404                  {
405            
406                  }
407            };
408            
409            class PEGASUS_COMMON_LINKAGE CimServiceResume : public AsyncRequest
410            {
411               public:
412                  CimServiceResume(Uint32 routing, 
413            		       AsyncOpNode *operation, 
414            		       Uint32 destination, 
415            		       Uint32 response, 
416            		       Boolean blocking);
417                  
418                  
419                  virtual ~CimServiceResume(void)
420 kumpf 1.18       {
421            
422                  }
423            };
424            
425            class PEGASUS_COMMON_LINKAGE CimProvidersStop : public AsyncRequest
426            {
427               public:
428                  CimProvidersStop(Uint32 routing, 
429            		       AsyncOpNode *operation, 
430            		       Uint32 destination, 
431            		       Uint32 response, 
432            		       Boolean blocking);
433                        
434                  virtual ~CimProvidersStop(void) 
435 mday  1.1        {
436            
437                  }
438            };
439            
440            class PEGASUS_COMMON_LINKAGE AsyncOperationStart : public AsyncRequest
441            {
442               public:
443                  AsyncOperationStart(Uint32 routing, 
444            			  AsyncOpNode *operation, 
445            			  Uint32 destination, 
446            			  Uint32 response, 
447            			  Boolean blocking, 
448            			  Message *action);
449                  
450            
451                  virtual ~AsyncOperationStart(void)
452                  {
453 mday  1.12 	 delete _act;
454 mday  1.1        }
455                  
456 mday  1.8  
457 mday  1.12       Message *get_action(void ) ;
458                  
459 mday  1.8        
460               private:
461 kumpf 1.9        friend class MessageQueueService;
462                  friend class cimom;
463 mday  1.8        Message *_act;
464 mday  1.1  };
465            
466            class PEGASUS_COMMON_LINKAGE AsyncOperationResult : public AsyncReply
467            {
468               public:
469                  AsyncOperationResult(Uint32 key, 
470            			   Uint32 routing, 
471            			   AsyncOpNode *operation,
472            			   Uint32 result_code, 
473            			   Uint32 destination,
474            			   Uint32 blocking);
475                  
476            
477                  virtual ~AsyncOperationResult(void)
478                  {
479            
480                  }
481            };
482 mday  1.16 
483            
484            class PEGASUS_COMMON_LINKAGE AsyncModuleOperationStart : public AsyncRequest
485            {
486               public:
487                  AsyncModuleOperationStart(Uint32 routing, 
488            				AsyncOpNode *operation,
489            				Uint32 destination, 
490            				Uint32 response, 
491            				Boolean blocking, 
492            				String target_module,
493            				Message *action);
494            
495                  virtual ~AsyncModuleOperationStart(void) 
496                  {
497            	 delete _act;
498                  }
499                  
500                  Message *get_action(void);
501            
502               private:
503 mday  1.16       friend class MessageQueueService;
504                  friend class cimom;
505 mday  1.17       friend class ModuleController;
506 mday  1.16       String _target_module;
507                  Message *_act;
508            };
509            
510            class PEGASUS_COMMON_LINKAGE AsyncModuleOperationResult : public AsyncReply
511            {
512               public:
513                  AsyncModuleOperationResult(Uint32 key, 
514            				 Uint32 routing, 
515            				 AsyncOpNode *operation,
516            				 Uint32 result_code, 
517            				 Uint32 destination,
518            				 Uint32 blocking, 
519            				 String target_module, 
520            				 Message *action);
521            
522                  virtual ~AsyncModuleOperationResult(void)
523                  {
524            	 delete _res;
525                  }
526                  
527 mday  1.16       Message *get_result(void);
528               private:
529                  friend class MessageQueueService;
530                  friend class cimom;
531 mday  1.17       friend class ModuleController;
532 mday  1.16       String _target_module;
533                  Message *_res;
534            };
535            
536            
537 mday  1.1  
538            
539            class PEGASUS_COMMON_LINKAGE AsyncLegacyOperationStart : public AsyncRequest
540            {
541               public:
542                  AsyncLegacyOperationStart(Uint32 routing, 
543            				AsyncOpNode *operation, 
544            				Uint32 destination, 
545 mday  1.5  				Message *action, 
546            				Uint32 action_destination);
547 mday  1.1        
548                  
549                  virtual ~AsyncLegacyOperationStart(void)
550                  {
551 mday  1.12 	 delete _act;
552 mday  1.1        }
553 mday  1.8  
554                  Message *get_action(void);
555            
556               private:
557 kumpf 1.10       friend class MessageQueueService;
558                  friend class cimom;
559 mday  1.8        Message *_act;
560                  Uint32 _legacy_destination;
561 mday  1.5        
562 mday  1.1  };
563            
564            class PEGASUS_COMMON_LINKAGE AsyncLegacyOperationResult : public AsyncReply
565            {
566               public:
567                  AsyncLegacyOperationResult(Uint32 key, 
568            				 Uint32 routing, 
569            				 AsyncOpNode *operation,
570            				 Message *result);
571                  
572                  virtual ~AsyncLegacyOperationResult(void)
573                  {
574 mday  1.12 	 delete _res;
575 mday  1.1        }
576            
577 mday  1.8        Message *get_result(void);
578                  
579            
580               private:
581 kumpf 1.10       friend class MessageQueueService;
582                  friend class cimom;
583 mday  1.8        Message *_res;
584 mday  1.1  };
585            
586            
587            class PEGASUS_COMMON_LINKAGE FindServiceQueue : public AsyncRequest
588            {
589               public:
590                  FindServiceQueue(Uint32 routing, 
591            		       AsyncOpNode *operation, 
592            		       Uint32 response,
593            		       Boolean blocking, 
594            		       String service_name, 
595            		       Uint32 service_capabilities, 
596            		       Uint32 service_mask);
597                  
598                  virtual ~FindServiceQueue(void)
599                  {
600            
601                  }
602                  
603                  String name;
604                  Uint32 capabilities;
605 mday  1.1        Uint32 mask;
606            } ;
607            
608            class PEGASUS_COMMON_LINKAGE FindServiceQueueResult : public AsyncReply
609            {
610               public:
611                  FindServiceQueueResult(Uint32 key, 
612            			     Uint32 routing, 
613            			     AsyncOpNode *operation, 
614            			     Uint32 result_code, 
615            			     Uint32 destination, 
616            			     Boolean blocking, 
617            			     Array<Uint32> queue_ids);
618                  
619                  
620                  virtual ~FindServiceQueueResult(void)
621                  {
622            
623                  }
624                  
625                  Array<Uint32> qids;
626 mday  1.1  } ;
627            
628            class PEGASUS_COMMON_LINKAGE EnumerateService : public AsyncRequest
629            {
630               public:
631                  EnumerateService(Uint32 routing, 
632            		       AsyncOpNode *operation, 
633            		       Uint32 response, 
634            		       Boolean blocking, 
635            		       Uint32 queue_id);
636                  
637                  
638                  virtual ~EnumerateService(void)
639                  {
640            
641                  }
642                  
643                  Uint32 qid;
644            };
645            
646            class PEGASUS_COMMON_LINKAGE EnumerateServiceResponse : public AsyncReply
647 mday  1.1  {
648               public:
649                  EnumerateServiceResponse(Uint32 key, 
650            			       Uint32 routing, 
651            			       AsyncOpNode *operation, 
652            			       Uint32 result_code, 
653            			       Uint32 response, 
654            			       Boolean blocking,
655            			       String service_name, 
656            			       Uint32 service_capabilities, 
657            			       Uint32 service_mask, 
658            			       Uint32 service_qid);
659                  
660                  
661                  virtual ~EnumerateServiceResponse(void)
662                  {
663            
664                  }
665                  
666                  String name;
667                  Uint32 capabilities;
668 mday  1.1        Uint32 mask;
669                  Uint32 qid;
670            };
671            
672            
673            PEGASUS_NAMESPACE_END
674            
675            #endif // CIMOM_MESSAGE_include

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2