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

  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 kumpf 1.33 // Overloaded message types
 85            #define ASYNC_HEARTBEAT DUMMY_MESSAGE
 86            #define ASYNC_REPLY DUMMY_MESSAGE
 87 mday  1.1  
 88            
 89            class PEGASUS_COMMON_LINKAGE AsyncMessage : public Message
 90            {
 91 kumpf 1.31 public:
 92                AsyncMessage(
 93 kumpf 1.33         MessageType type,
 94 kumpf 1.31         Uint32 destination,
 95                    Uint32 mask,
 96                    AsyncOpNode* operation);
 97 kumpf 1.28 
 98 kumpf 1.31     virtual ~AsyncMessage();
 99            
100                AsyncOpNode* op;
101 mday  1.1  };
102            
103            
104            class PEGASUS_COMMON_LINKAGE AsyncRequest : public AsyncMessage
105            {
106 kumpf 1.31 public:
107                AsyncRequest(
108 kumpf 1.33         MessageType type,
109 kumpf 1.31         Uint32 mask,
110                    AsyncOpNode* operation,
111                    Uint32 destination,
112                    Uint32 response,
113                    Boolean blocking);
114            
115                virtual ~AsyncRequest();
116            
117                Uint32 resp;
118                Boolean block;
119 mday  1.1  };
120            
121            class PEGASUS_COMMON_LINKAGE AsyncReply : public AsyncMessage
122            {
123 kumpf 1.31 public:
124                AsyncReply(
125 kumpf 1.33         MessageType type,
126 kumpf 1.31         Uint32 mask,
127                    AsyncOpNode* operation,
128                    Uint32 resultCode,
129                    Uint32 destination,
130                    Boolean blocking);
131 mday  1.1  
132 kumpf 1.31     virtual ~AsyncReply() { }
133 mday  1.1  
134 kumpf 1.31     Uint32 result;
135                Boolean block;
136            };
137 mday  1.1  
138            class PEGASUS_COMMON_LINKAGE RegisterCimService : public AsyncRequest
139            {
140 kumpf 1.31 public:
141                RegisterCimService(
142                    AsyncOpNode* operation,
143                    Boolean blocking,
144                    const String& serviceName,
145                    Uint32 serviceCapabilities,
146                    Uint32 serviceMask,
147                    Uint32 serviceQueue);
148            
149                virtual ~RegisterCimService()
150                {
151                }
152            
153                String name;
154                Uint32 capabilities;
155                Uint32 mask;
156                Uint32 queue;
157 mday  1.1  };
158            
159            class PEGASUS_COMMON_LINKAGE DeRegisterCimService : public AsyncRequest
160            {
161 kumpf 1.31 public:
162                DeRegisterCimService(
163                    AsyncOpNode* operation,
164                    Boolean blocking,
165                    Uint32 serviceQueue);
166            
167                virtual ~DeRegisterCimService()
168                {
169                }
170            
171                Uint32 queue;
172            };
173 mday  1.1  
174            class PEGASUS_COMMON_LINKAGE UpdateCimService : public AsyncRequest
175            {
176 kumpf 1.31 public:
177                UpdateCimService(
178                    AsyncOpNode* operation,
179                    Boolean blocking,
180                    Uint32 serviceQueue,
181                    Uint32 serviceCapabilities,
182                    Uint32 serviceMask);
183            
184                virtual ~UpdateCimService()
185                {
186                }
187            
188                Uint32 queue;
189                Uint32 capabilities;
190                Uint32 mask;
191 mday  1.1  };
192            
193 mday  1.14 
194            class PEGASUS_COMMON_LINKAGE RegisteredModule : public AsyncRequest
195            {
196 kumpf 1.31 public:
197                RegisteredModule(
198                    AsyncOpNode* operation,
199                    Boolean blocking,
200                    Uint32 serviceQueue,
201                    const String& newModule);
202            
203                virtual ~RegisteredModule()
204                {
205                }
206            
207                String _module;
208 mday  1.14 };
209            
210            
211            class PEGASUS_COMMON_LINKAGE DeRegisteredModule : public AsyncRequest
212            {
213 kumpf 1.31 public:
214                DeRegisteredModule(
215                    AsyncOpNode* operation,
216                    Boolean blocking,
217                    Uint32 serviceQueue,
218                    const String& removedModule);
219            
220                virtual ~DeRegisteredModule()
221                {
222                }
223            
224                String _module;
225 mday  1.14 };
226            
227            
228            class PEGASUS_COMMON_LINKAGE FindModuleInService : public AsyncRequest
229            {
230 kumpf 1.31 public:
231                FindModuleInService(
232                    AsyncOpNode* operation,
233                    Boolean blocking,
234                    Uint32 responseQueue,
235                    const String& module);
236            
237                virtual ~FindModuleInService()
238                {
239                }
240            
241                String _module;
242 mday  1.14 };
243            
244            class PEGASUS_COMMON_LINKAGE FindModuleInServiceResponse : public AsyncReply
245            {
246 kumpf 1.31 public:
247                FindModuleInServiceResponse(
248                    AsyncOpNode* operation,
249                    Uint32 resultCode,
250                    Uint32 destination,
251                    Boolean blocking,
252                    Uint32 moduleServiceQueue);
253            
254                virtual ~FindModuleInServiceResponse()
255                {
256                }
257            
258                Uint32 _module_service_queue;
259 mday  1.14 };
260 mday  1.1  
261            class PEGASUS_COMMON_LINKAGE AsyncIoctl : public AsyncRequest
262            {
263 kumpf 1.31 public:
264                AsyncIoctl(
265                    AsyncOpNode* operation,
266                    Uint32 destination,
267                    Uint32 response,
268                    Boolean blocking,
269                    Uint32 code,
270                    Uint32 intParam,
271                    void* pParam);
272            
273                virtual ~AsyncIoctl()
274                {
275                }
276            
277                enum
278                {
279                    IO_CLOSE,
280                    IO_OPEN,
281                    IO_SOURCE_QUENCH,
282                    IO_SERVICE_DEFINED,
283                    IO_IDLE_CONTROL
284 kumpf 1.31     };
285            
286                Uint32 ctl;
287                Uint32 intp;
288                void* voidp;
289 mday  1.1  };
290            
291            class PEGASUS_COMMON_LINKAGE CimServiceStart : public AsyncRequest
292            {
293 kumpf 1.31 public:
294                CimServiceStart(
295                    AsyncOpNode* operation,
296                    Uint32 destination,
297                    Uint32 response,
298                    Boolean blocking);
299            
300                virtual ~CimServiceStart()
301                {
302                }
303 mday  1.1  };
304            
305            class PEGASUS_COMMON_LINKAGE CimServiceStop : public AsyncRequest
306            {
307 kumpf 1.31 public:
308                CimServiceStop(
309                    AsyncOpNode* operation,
310                    Uint32 destination,
311                    Uint32 response,
312                    Boolean blocking);
313            
314                virtual ~CimServiceStop()
315                {
316                }
317 mday  1.1  };
318            
319            class PEGASUS_COMMON_LINKAGE CimServicePause : public AsyncRequest
320            {
321 kumpf 1.31 public:
322                CimServicePause(
323                    AsyncOpNode* operation,
324                    Uint32 destination,
325                    Uint32 response,
326                    Boolean blocking);
327            
328                virtual ~CimServicePause()
329                {
330                }
331 mday  1.1  };
332            
333            class PEGASUS_COMMON_LINKAGE CimServiceResume : public AsyncRequest
334            {
335 kumpf 1.31 public:
336                CimServiceResume(
337                    AsyncOpNode* operation,
338                    Uint32 destination,
339                    Uint32 response,
340                    Boolean blocking);
341            
342                virtual ~CimServiceResume()
343                {
344                }
345 kumpf 1.18 };
346            
347            class PEGASUS_COMMON_LINKAGE CimProvidersStop : public AsyncRequest
348            {
349 kumpf 1.31 public:
350                CimProvidersStop(
351                    AsyncOpNode* operation,
352                    Uint32 destination,
353                    Uint32 response,
354                    Boolean blocking);
355            
356                virtual ~CimProvidersStop()
357                {
358                }
359 mday  1.1  };
360            
361            class PEGASUS_COMMON_LINKAGE AsyncOperationStart : public AsyncRequest
362            {
363 kumpf 1.31 public:
364                AsyncOperationStart(
365                    AsyncOpNode* operation,
366                    Uint32 destination,
367                    Uint32 response,
368                    Boolean blocking,
369                    Message* action);
370            
371                virtual ~AsyncOperationStart()
372                {
373                    delete _act;
374                }
375            
376                Message* get_action();
377            
378            private:
379                friend class MessageQueueService;
380                friend class cimom;
381                Message* _act;
382 mday  1.1  };
383            
384            class PEGASUS_COMMON_LINKAGE AsyncOperationResult : public AsyncReply
385            {
386 kumpf 1.31 public:
387                AsyncOperationResult(
388                    AsyncOpNode* operation,
389                    Uint32 resultCode,
390                    Uint32 destination,
391                    Boolean blocking);
392            
393                virtual ~AsyncOperationResult()
394                {
395                }
396 mday  1.1  };
397 mday  1.16 
398            
399            class PEGASUS_COMMON_LINKAGE AsyncModuleOperationStart : public AsyncRequest
400            {
401 kumpf 1.31 public:
402                AsyncModuleOperationStart(
403                    AsyncOpNode* operation,
404                    Uint32 destination,
405                    Uint32 response,
406                    Boolean blocking,
407                    const String& targetModule,
408                    Message* action);
409            
410                virtual ~AsyncModuleOperationStart()
411                {
412                    delete _act;
413                }
414            
415                Message* get_action();
416            
417            private:
418                friend class MessageQueueService;
419                friend class cimom;
420                friend class ModuleController;
421                String _target_module;
422 kumpf 1.31     Message* _act;
423 mday  1.16 };
424            
425            class PEGASUS_COMMON_LINKAGE AsyncModuleOperationResult : public AsyncReply
426            {
427 kumpf 1.31 public:
428                AsyncModuleOperationResult(
429                    AsyncOpNode* operation,
430                    Uint32 resultCode,
431                    Uint32 destination,
432                    Boolean blocking,
433                    const String& targetModule,
434                    Message* action);
435            
436                virtual ~AsyncModuleOperationResult()
437                {
438                    delete _res;
439                }
440            
441                Message* get_result();
442            
443             private:
444                friend class MessageQueueService;
445                friend class cimom;
446                friend class ModuleController;
447                String _targetModule;
448 kumpf 1.31     Message* _res;
449 mday  1.16 };
450            
451 mday  1.1  class PEGASUS_COMMON_LINKAGE AsyncLegacyOperationStart : public AsyncRequest
452            {
453 kumpf 1.31 public:
454                AsyncLegacyOperationStart(
455                    AsyncOpNode* operation,
456                    Uint32 destination,
457                    Message* action,
458                    Uint32 actionDestination);
459            
460                virtual ~AsyncLegacyOperationStart()
461                {
462                    delete _act;
463                }
464            
465                Message* get_action();
466            
467            private:
468                friend class MessageQueueService;
469                friend class cimom;
470                Message* _act;
471                Uint32 _legacy_destination;
472 mday  1.1  };
473            
474            class PEGASUS_COMMON_LINKAGE AsyncLegacyOperationResult : public AsyncReply
475            {
476 kumpf 1.31 public:
477                AsyncLegacyOperationResult(
478                    AsyncOpNode* operation,
479                    Message* result);
480            
481                virtual ~AsyncLegacyOperationResult()
482                {
483                    delete _res;
484                }
485            
486                Message* get_result();
487            
488            private:
489                friend class MessageQueueService;
490                friend class cimom;
491                Message* _res;
492 mday  1.1  };
493            
494            class PEGASUS_COMMON_LINKAGE FindServiceQueue : public AsyncRequest
495            {
496 kumpf 1.31 public:
497                FindServiceQueue(
498                    AsyncOpNode* operation,
499                    Uint32 response,
500                    Boolean blocking,
501                    const String& serviceName,
502                    Uint32 serviceCapabilities,
503                    Uint32 serviceMask);
504            
505                virtual ~FindServiceQueue()
506                {
507                }
508            
509                String name;
510                Uint32 capabilities;
511                Uint32 mask;
512            };
513 mday  1.1  
514            class PEGASUS_COMMON_LINKAGE FindServiceQueueResult : public AsyncReply
515            {
516 kumpf 1.31 public:
517                FindServiceQueueResult(
518                    AsyncOpNode* operation,
519                    Uint32 resultCode,
520                    Uint32 destination,
521                    Boolean blocking,
522                    Array<Uint32> queueIds);
523            
524                virtual ~FindServiceQueueResult()
525                {
526                }
527            
528                Array<Uint32> qids;
529            };
530 mday  1.1  
531            class PEGASUS_COMMON_LINKAGE EnumerateService : public AsyncRequest
532            {
533 kumpf 1.31 public:
534                EnumerateService(
535                    AsyncOpNode* operation,
536                    Uint32 response,
537                    Boolean blocking,
538                    Uint32 queueId);
539            
540                virtual ~EnumerateService()
541                {
542                }
543            
544                Uint32 qid;
545 mday  1.1  };
546            
547            class PEGASUS_COMMON_LINKAGE EnumerateServiceResponse : public AsyncReply
548            {
549 kumpf 1.31 public:
550                EnumerateServiceResponse(
551                    AsyncOpNode* operation,
552                    Uint32 resultCode,
553                    Uint32 response,
554                    Boolean blocking,
555                    const String& serviceName,
556                    Uint32 serviceCapabilities,
557                    Uint32 serviceMask,
558                    Uint32 serviceQid);
559            
560                virtual ~EnumerateServiceResponse()
561                {
562                }
563            
564                String name;
565                Uint32 capabilities;
566                Uint32 mask;
567                Uint32 qid;
568 mday  1.1  };
569            
570            PEGASUS_NAMESPACE_END
571            
572 kumpf 1.31 #endif // Pegasus_CimomMessage_h

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2