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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2