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

  1 karl  1.72 //%2006////////////////////////////////////////////////////////////////////////
  2 mike  1.4  //
  3 karl  1.58 // 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.48 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.58 // 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.62 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.72 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12            // EMC Corporation; Symantec Corporation; The Open Group.
 13 mike  1.4  //
 14            // Permission is hereby granted, free of charge, to any person obtaining a copy
 15 chip  1.24 // 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 mike  1.4  // 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 ms.aruran 1.74.2.4 //
 21 chip      1.24     // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22 mike      1.4      // 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 chip      1.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 mike      1.4      // 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                    // Author: Mike Brasher (mbrasher@bmc.com)
 33                    //
 34 mike      1.6      // Modified By: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
 35 kumpf     1.27     //              Carol Ann Krug Graves, Hewlett-Packard Company
 36                    //                  (carolann_graves@hp.com)
 37                    //              Mike Day (mdday@us.ibm.com)
 38                    //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 39 sage      1.30     //              Arthur Pichlkostner (via Markus: sedgewick_de@yahoo.de)
 40 w.white   1.56     //				Willis White (whiwill@us.ibm.com) PEP 127 and 128
 41 brian.campbell 1.55     //         Brian G. Campbell, EMC (campbell_brian@emc.com) - PEP140/phase1
 42 a.arora        1.57     //              Amit K Arora, IBM (amita@in.ibm.com) for Bug#1090
 43 j.alex         1.70     //              John Alex, IBM (johnalex@us.ibm.com) - Bug#2290
 44 ms.aruran      1.74.2.4 //
 45 mike           1.4      //
 46                         //%/////////////////////////////////////////////////////////////////////////////
 47                         
 48                         #ifndef Pegasus_Message_h
 49                         #define Pegasus_Message_h
 50                         
 51 mike           1.6      #include <Pegasus/Common/Config.h>
 52 mike           1.4      #include <iostream>
 53 mike           1.6      #include <cstring>
 54 kumpf          1.39     #include <Pegasus/Common/InternalException.h>
 55 mike           1.6      #include <Pegasus/Common/IPC.h>
 56 sage           1.30     #include <Pegasus/Common/StatisticalData.h>
 57 kumpf          1.38     #include <Pegasus/Common/Linkage.h>
 58 w.white        1.68     #include <Pegasus/Common/TimeValue.h>
 59 w.white        1.63     #include <Pegasus/Common/CIMOperationType.h>
 60 mike           1.4      
 61                         PEGASUS_NAMESPACE_BEGIN
 62                         
 63 mday           1.18     // REVIEW: could class be renamed to MessageMask (coding standard)
 64 mike           1.11     
 65 chip           1.24     class PEGASUS_COMMON_LINKAGE message_mask
 66 mike           1.6      {
 67                            public:
 68 mike           1.11     
 69 mike           1.6            static Uint32 type_legacy;
 70 mday           1.9            static Uint32 type_CIMOperation;
 71                               static Uint32 type_CIMAsyncOperation;
 72                               static Uint32 type_export;
 73                               static Uint32 type_lifetime;
 74 mike           1.6            static Uint32 type_socket;
 75                               static Uint32 type_connection;
 76                               static Uint32 type_http;
 77 kumpf          1.27           static Uint32 type_http_error;
 78 mike           1.6            static Uint32 type_cimom;
 79 mday           1.9            static Uint32 type_control;
 80                               static Uint32 type_service;
 81                               static Uint32 type_broadcast;
 82 kumpf          1.28           static Uint32 type_client_exception;
 83 chip           1.24     
 84 mday           1.9            static Uint32 ha_no_delete;
 85                               static Uint32 ha_request;
 86                               static Uint32 ha_reply;
 87 mday           1.10           static Uint32 ha_synchronous;
 88 mday           1.13           static Uint32 ha_async;
 89 mday           1.22           static Uint32 ha_wait;
 90 chip           1.24     
 91                         
 92                               // more for documentation than for use
 93 mike           1.7      
 94 mday           1.9            inline Uint32 get_type(Uint32 flags)
 95 mike           1.6            {
 96                         	 return (flags & 0x000fffff);
 97                               }
 98                         
 99                               inline Uint32 get_handling(Uint32 flags)
100                               {
101                         	 return( flags & 0xfff00000);
102                               }
103                         };
104                         
105 mday           1.20     class cimom;
106 mike           1.4      class MessageQueue;
107 mday           1.19     class MessageQueueService;
108                         class AsyncLegacyOperationStart;
109                         class AsyncLegacyOperationResult;
110 mike           1.4      
111 kumpf          1.40     enum HttpMethod
112                         {
113                             HTTP_METHOD__POST,
114                             HTTP_METHOD_M_POST
115                         };
116                         
117 chip           1.24     /** The Message class and derived classes are used to pass messages between
118 mike           1.4          modules. Messages are passed between modules using the message queues
119                             (see MessageQueue class). Derived classes may add their own fields.
120                             This base class defines two common fields: type, which is the type of
121                             the message, and key which is a key value whose meaning is defined by
122                             the derived class. The MessageQueue class provides methods for finding
123                             messages by both type and key.
124                         
125                             The Message class also provides previous and next pointers which are
126                             used to place the messages on a queue by the MessageQueue class.
127                         */
128 mike           1.5      class PEGASUS_COMMON_LINKAGE Message
129 mike           1.4      {
130 mday           1.8         public:
131 mike           1.4      
132 mday           1.8            Message(
133 mday           1.20     	 Uint32 type,
134                         	 Uint32 destination = 0,
135 chip           1.24     	 Uint32 key = getNextKey(),
136 mday           1.8      	 Uint32 routing_code = 0,
137 j.alex         1.70     	 Uint32 mask = message_mask::type_legacy)
138 chip           1.24     	 :
139                         	 _type(type),
140                         	 _key(key),
141                         	 _routing_code(routing_code),
142 mday           1.8      	 _mask(mask),
143 kumpf          1.45              _httpMethod (HTTP_METHOD__POST),
144 j.alex         1.70              _close_connect(false),
145 mday           1.44     	_last_thread_id(pegasus_thread_self()),
146 chip           1.24     	 _next(0),
147 mday           1.19     	 _prev(0),
148 mday           1.20     	 _async(0),
149 brian.campbell 1.55     	 dest(destination),
150 ms.aruran      1.74.2.4 	 _isComplete(true),
151 brian.campbell 1.55     	 _index(0)
152 chip           1.24           {
153 mday           1.8      
154                               }
155 mike           1.6      
156 mday           1.32           Message & operator = ( const Message & msg)
157                               {
158                         	 if (this != &msg)
159                         	 {
160                         	    _type = msg._type;
161                         	    _key = msg._key;
162                         	    _routing_code = msg._routing_code;
163                         	    _mask = msg._mask;
164 mday           1.44     	    _last_thread_id = msg._last_thread_id;
165 mday           1.32     	    _next = _prev = _async = 0;
166                         	    dest = msg.dest;
167 brian.campbell 1.55     			_httpMethod = msg._httpMethod;
168                         			_index = msg._index;
169                         			_isComplete = msg._isComplete;
170 ms.aruran      1.74.2.4 
171 mday           1.32     	 }
172                         	 return *this;
173                               }
174 chip           1.34     
175 chip           1.24     
176                               virtual ~Message();
177 j.alex         1.70           Boolean getCloseConnect() const { return _close_connect; }
178                               void setCloseConnect(Boolean close_connect)
179                               {
180                                   _close_connect = close_connect;
181                               }
182 mike           1.4      
183 mday           1.8            Uint32 getType() const { return _type; }
184 mike           1.4      
185 mday           1.8            void setType(Uint32 type) { _type = type; }
186 mike           1.4      
187 mday           1.8            Uint32 getKey() const { return _key; }
188 mike           1.4      
189 mday           1.8            void setKey(Uint32 key) { _key = key; }
190 mike           1.4      
191 mday           1.8            Uint32 getRouting() const { return _routing_code; }
192                               void setRouting(Uint32 routing) { _routing_code = routing; }
193 mike           1.4      
194 mday           1.8            Uint32 getMask() const { return _mask; }
195 chip           1.24     
196 mday           1.8            void setMask(Uint32 mask) { _mask = mask; }
197 chip           1.24     
198 kumpf          1.40           HttpMethod getHttpMethod() const { return _httpMethod; }
199                         
200                               void setHttpMethod(HttpMethod httpMethod) {_httpMethod = httpMethod;}
201                         
202 ms.aruran      1.74.2.4 
203 karl           1.61     #ifndef PEGASUS_DISABLE_PERFINST
204 sage           1.30     //
205                         // Needed for performance measurement
206                         //
207                         
208                               void startServer();
209                         
210                               void endServer();
211                         
212                               void startProvider();
213                         
214                               void endProvider();
215                         
216 w.white        1.68           TimeValue getStartServerTime() const { return _timeServerStart; }
217 sage           1.30     
218 w.white        1.68           void setStartServerTime(TimeValue timeServerStart)
219 sage           1.30           {
220                                    _timeServerStart = timeServerStart;
221                               }
222                         
223 w.white        1.68           TimeValue getStartProviderTime() const { return _timeProviderStart; }
224 sage           1.30     
225 w.white        1.68           void setStartProviderTime(TimeValue timeProviderStart)
226 sage           1.30           {
227                                   _timeProviderStart = timeProviderStart;
228                               }
229                         
230 w.white        1.68           TimeValue getEndServerTime() const { return _timeServerEnd; }
231 sage           1.30     
232 w.white        1.68           void setEndServerTime (TimeValue timeServerEnd)
233 sage           1.30           {
234                                   _timeServerEnd = timeServerEnd;
235                               }
236                         
237 w.white        1.68           TimeValue getEndProviderTime() const { return _timeProviderEnd; }
238 sage           1.30     
239 w.white        1.68           void setEndProviderTime(TimeValue timeProviderEnd)
240 sage           1.30           {
241                                   _timeProviderEnd = timeProviderEnd;
242                               }
243                         
244 w.white        1.68     	  TimeValue getServerTime() { return _serverTime; }
245 sage           1.30     //
246 sage           1.31     #endif
247 sage           1.30     
248 mday           1.8            Message* getNext() { return _next; }
249 mike           1.4      
250 mday           1.8            const Message* getNext() const { return _next; }
251 mike           1.4      
252 mday           1.8            Message* getPrevious() { return _prev; }
253 mike           1.4      
254 mday           1.8            const Message* getPrevious() const { return _prev; }
255 mike           1.4      
256 chip           1.24           static Uint32 getNextKey()
257                               {
258 a.arora        1.57               AutoMutex autoMut(_mut);
259                                   Uint32 ret = _nextKey++;
260                                   return ret;
261 mike           1.6            }
262 chip           1.24     
263 a.dunfey       1.67           static CIMOperationType convertMessageTypetoCIMOpType(Uint32 type);
264 w.white        1.63     
265 joyce.j        1.69     #ifdef PEGASUS_DEBUG
266 mike           1.36           virtual void print(
267 ms.aruran      1.74.2.4 	  PEGASUS_STD(ostream)& os,
268 mike           1.36     	  Boolean printHeader = true) const;
269 joyce.j        1.69     #endif
270 mike           1.4      
271 chip           1.24           // << Thu Dec 27 10:46:04 2001 mdd >> for use with DQueue container
272                               // as used by AsyncOpNode
273 kumpf          1.23           Boolean operator == (const void *msg )
274 mday           1.13           {
275 mday           1.16     	 if (reinterpret_cast<void *>(this) == msg )
276 mday           1.13     	    return true;
277                         	 return false;
278                               }
279 chip           1.24     
280 mday           1.22           Message *get_async(void)
281                               {
282                         	 Message *ret = _async;
283                         	 _async = 0;
284                         	 return ret;
285 ms.aruran      1.74.2.4 
286 mday           1.22           }
287 chip           1.24     
288 mday           1.22           void put_async(Message * msg)
289                               {
290                         	 _async = msg;
291                               }
292 chip           1.24     
293 mday           1.44           // << Tue Jul  1 11:02:49 2003 mdd >> pep_88 and helper for i18n and l10n
294                               Boolean thread_changed(void)
295                               {
296                         	 if(_last_thread_id != pegasus_thread_self())
297                         	 {
298                         	    _last_thread_id = pegasus_thread_self();
299                         	    return true;
300                         	 }
301                         
302                         	 return false;
303                               }
304 ms.aruran      1.74.2.4 
305                               // << Tue Jul  1 13:41:02 2003 mdd >> pep_88 -
306 mday           1.44           // assist in synchronizing responses with requests
307                         
308                               void synch_response(Message *req)
309                               {
310                         	 _key = req->_key;
311                         	 _routing_code = req->_routing_code;
312                               }
313 ms.aruran      1.74.2.4 
314 brian.campbell 1.55     			// set the message index indicating what piece (or sequence) this is
315                         			// message indexes start at zero
316                         			void setIndex(Uint32 index) { _index = index; }
317                         
318                         			// increment the message index
319                         			void incrementIndex() { _index++; }
320                         
321 ms.aruran      1.74.2.4 			// set the complete flag indicating if this message piece is the
322 brian.campbell 1.55     			// last or not
323 ms.aruran      1.74.2.4 			void setComplete(Boolean isComplete)
324 brian.campbell 1.55     				{ _isComplete = isComplete ? true:false; }
325                         
326                         			// get the message index (or sequence number)
327                         			Uint32 getIndex() const { return _index; }
328                         
329                         			// is this the first piece of the message ?
330                         			Boolean isFirst() const { return _index == 0 ? true : false; }
331                         
332                         			// is this message complete? (i.e the last in a one or more sequence)
333                         			Boolean isComplete() const { return _isComplete; }
334 chip           1.24     
335 mday           1.8         private:
336 mike           1.6            Uint32 _type;
337                               Uint32 _key;
338 mday           1.8            Uint32 _routing_code;
339 mike           1.6            Uint32 _mask;
340 kumpf          1.40           HttpMethod _httpMethod;
341 sage           1.30     // Needed for performance measurement
342 w.white        1.68           TimeValue _timeServerStart;
343                               TimeValue _timeServerEnd;
344                               TimeValue _timeProviderStart;
345                               TimeValue _timeProviderEnd;
346 ms.aruran      1.74.2.4 	  TimeValue _serverTime;
347                               Boolean   _close_connect;
348 j.alex         1.70     
349 sage           1.30     //
350 mday           1.44     
351                               // << Tue Jul  1 11:02:35 2003 mdd >> pep_88 and helper for i18n and l10n
352                               PEGASUS_THREAD_TYPE _last_thread_id;
353 ms.aruran      1.74.2.4 
354 mike           1.6            Message* _next;
355                               Message* _prev;
356 mday           1.32     
357 mday           1.19        protected:
358 mday           1.32     
359                            public:
360 mday           1.19           Message *_async;
361 mday           1.20           Uint32 dest;
362 w.white        1.56     	  //needed for PEP 128 - transmitting Server Response Time to Client
363                               Uint64 totServerTime;
364                         
365 mday           1.19        private:
366 mike           1.6            MessageQueue* _owner;
367 brian.campbell 1.55           Boolean _isComplete;
368                               Uint32 _index;
369 mike           1.6            static Uint32 _nextKey;
370                               static Mutex _mut;
371 mday           1.44     
372                         
373                         
374 mday           1.20           friend class cimom;
375 mike           1.6            friend class MessageQueue;
376 mday           1.19           friend class MessageQueueService;
377                               friend class AsyncLegacyOperationStart;
378                               friend class AsyncLegacyOperationResult;
379 chip           1.24     
380 mike           1.4      };
381 mike           1.5      
382 mike           1.6      
383 mike           1.5      enum MessageType
384                         {
385                             DUMMY_MESSAGE,
386                         
387                             // CIM Message types:
388                         
389                             CIM_GET_CLASS_REQUEST_MESSAGE,
390                             CIM_GET_INSTANCE_REQUEST_MESSAGE,
391 mike           1.6          CIM_EXPORT_INDICATION_REQUEST_MESSAGE,
392 mike           1.5          CIM_DELETE_CLASS_REQUEST_MESSAGE,
393                             CIM_DELETE_INSTANCE_REQUEST_MESSAGE,
394                             CIM_CREATE_CLASS_REQUEST_MESSAGE,
395                             CIM_CREATE_INSTANCE_REQUEST_MESSAGE,
396                             CIM_MODIFY_CLASS_REQUEST_MESSAGE,
397                             CIM_MODIFY_INSTANCE_REQUEST_MESSAGE,
398 mday           1.32         CIM_ENUMERATE_CLASSES_REQUEST_MESSAGE, //10
399 mike           1.5          CIM_ENUMERATE_CLASS_NAMES_REQUEST_MESSAGE,
400                             CIM_ENUMERATE_INSTANCES_REQUEST_MESSAGE,
401                             CIM_ENUMERATE_INSTANCE_NAMES_REQUEST_MESSAGE,
402                             CIM_EXEC_QUERY_REQUEST_MESSAGE,
403                             CIM_ASSOCIATORS_REQUEST_MESSAGE,
404                             CIM_ASSOCIATOR_NAMES_REQUEST_MESSAGE,
405                             CIM_REFERENCES_REQUEST_MESSAGE,
406                             CIM_REFERENCE_NAMES_REQUEST_MESSAGE,
407                             CIM_GET_PROPERTY_REQUEST_MESSAGE,
408 mday           1.32         CIM_SET_PROPERTY_REQUEST_MESSAGE, //20
409 mike           1.5          CIM_GET_QUALIFIER_REQUEST_MESSAGE,
410                             CIM_SET_QUALIFIER_REQUEST_MESSAGE,
411                             CIM_DELETE_QUALIFIER_REQUEST_MESSAGE,
412                             CIM_ENUMERATE_QUALIFIERS_REQUEST_MESSAGE,
413                             CIM_INVOKE_METHOD_REQUEST_MESSAGE,
414 mike           1.6          CIM_ENABLE_INDICATION_SUBSCRIPTION_REQUEST_MESSAGE,
415                             CIM_MODIFY_INDICATION_SUBSCRIPTION_REQUEST_MESSAGE,
416 kumpf          1.15         CIM_PROCESS_INDICATION_REQUEST_MESSAGE,
417 w.white        1.74.2.2     CIM_HANDLE_INDICATION_REQUEST_MESSAGE,
418                             CIM_NOTIFY_PROVIDER_REGISTRATION_REQUEST_MESSAGE,  // 30
419 kumpf          1.15         CIM_NOTIFY_PROVIDER_TERMINATION_REQUEST_MESSAGE,
420 chip           1.25         CIM_CREATE_SUBSCRIPTION_REQUEST_MESSAGE,
421                             CIM_MODIFY_SUBSCRIPTION_REQUEST_MESSAGE,
422                             CIM_DELETE_SUBSCRIPTION_REQUEST_MESSAGE,
423 kumpf          1.29         CIM_DISABLE_MODULE_REQUEST_MESSAGE,
424                             CIM_ENABLE_MODULE_REQUEST_MESSAGE,
425 carolann.graves 1.64         CIM_STOP_ALL_PROVIDERS_REQUEST_MESSAGE,
426 kumpf           1.35     
427 kumpf           1.43         CIM_GET_CLASS_RESPONSE_MESSAGE,
428 w.white         1.74.2.2     CIM_GET_INSTANCE_RESPONSE_MESSAGE,
429                              CIM_EXPORT_INDICATION_RESPONSE_MESSAGE,  // 40
430 mike            1.5          CIM_DELETE_CLASS_RESPONSE_MESSAGE,
431                              CIM_DELETE_INSTANCE_RESPONSE_MESSAGE,
432                              CIM_CREATE_CLASS_RESPONSE_MESSAGE,
433                              CIM_CREATE_INSTANCE_RESPONSE_MESSAGE,
434                              CIM_MODIFY_CLASS_RESPONSE_MESSAGE,
435                              CIM_MODIFY_INSTANCE_RESPONSE_MESSAGE,
436 carolann.graves 1.64         CIM_ENUMERATE_CLASSES_RESPONSE_MESSAGE,
437 mike            1.5          CIM_ENUMERATE_CLASS_NAMES_RESPONSE_MESSAGE,
438 w.white         1.74.2.2     CIM_ENUMERATE_INSTANCES_RESPONSE_MESSAGE,
439                              CIM_ENUMERATE_INSTANCE_NAMES_RESPONSE_MESSAGE,  // 50
440 mike            1.5          CIM_EXEC_QUERY_RESPONSE_MESSAGE,
441                              CIM_ASSOCIATORS_RESPONSE_MESSAGE,
442                              CIM_ASSOCIATOR_NAMES_RESPONSE_MESSAGE,
443                              CIM_REFERENCES_RESPONSE_MESSAGE,
444                              CIM_REFERENCE_NAMES_RESPONSE_MESSAGE,
445                              CIM_GET_PROPERTY_RESPONSE_MESSAGE,
446 carolann.graves 1.64         CIM_SET_PROPERTY_RESPONSE_MESSAGE,
447 mike            1.5          CIM_GET_QUALIFIER_RESPONSE_MESSAGE,
448 w.white         1.74.2.2     CIM_SET_QUALIFIER_RESPONSE_MESSAGE,
449                              CIM_DELETE_QUALIFIER_RESPONSE_MESSAGE,  // 60
450 mike            1.5          CIM_ENUMERATE_QUALIFIERS_RESPONSE_MESSAGE,
451                              CIM_INVOKE_METHOD_RESPONSE_MESSAGE,
452 mike            1.6          CIM_ENABLE_INDICATION_SUBSCRIPTION_RESPONSE_MESSAGE,
453                              CIM_MODIFY_INDICATION_SUBSCRIPTION_RESPONSE_MESSAGE,
454 kumpf           1.15         CIM_PROCESS_INDICATION_RESPONSE_MESSAGE,
455 carolann.graves 1.64         CIM_NOTIFY_PROVIDER_REGISTRATION_RESPONSE_MESSAGE,
456 kumpf           1.15         CIM_NOTIFY_PROVIDER_TERMINATION_RESPONSE_MESSAGE,
457 w.white         1.74.2.2     CIM_HANDLE_INDICATION_RESPONSE_MESSAGE,
458 chip            1.25         CIM_CREATE_SUBSCRIPTION_RESPONSE_MESSAGE,
459 w.white         1.74.2.2     CIM_MODIFY_SUBSCRIPTION_RESPONSE_MESSAGE,  // 70
460 chip            1.25         CIM_DELETE_SUBSCRIPTION_RESPONSE_MESSAGE,
461 kumpf           1.29         CIM_DISABLE_MODULE_RESPONSE_MESSAGE,
462                              CIM_ENABLE_MODULE_RESPONSE_MESSAGE,
463 carolann.graves 1.64         CIM_STOP_ALL_PROVIDERS_RESPONSE_MESSAGE,
464 chip            1.24     
465 mike            1.6          // Monitor-related messages:
466                          
467                              SOCKET_MESSAGE,
468                          
469                              // Connection-oriented messages:
470                          
471                              CLOSE_CONNECTION_MESSAGE,
472                          
473                              // HTTP messages:
474                          
475                              HTTP_MESSAGE,
476 w.white         1.74.2.2     HTTP_ERROR_MESSAGE,
477 kumpf           1.28     
478                              // Exception messages to be passed to a CIM client application:
479                          
480                              CLIENT_EXCEPTION_MESSAGE,
481 mike            1.5      
482 w.white         1.74.2.2     ASYNC_REGISTER_CIM_SERVICE,  // 80
483 mday            1.33         ASYNC_DEREGISTER_CIM_SERVICE,
484                              ASYNC_UPDATE_CIM_SERVICE,
485                              ASYNC_IOCTL,
486 carolann.graves 1.64         ASYNC_CIMSERVICE_START,
487 mday            1.33         ASYNC_CIMSERVICE_STOP,
488                              ASYNC_CIMSERVICE_PAUSE,
489                              ASYNC_CIMSERVICE_RESUME,
490                          
491 w.white         1.74.2.2     ASYNC_ASYNC_OP_START,
492 mday            1.33         ASYNC_ASYNC_OP_RESULT,
493 w.white         1.74.2.2     ASYNC_ASYNC_LEGACY_OP_START,  // 90
494 chip            1.34         ASYNC_ASYNC_LEGACY_OP_RESULT,
495                          
496 mday            1.33         ASYNC_FIND_SERVICE_Q,
497                              ASYNC_FIND_SERVICE_Q_RESULT,
498 carolann.graves 1.64         ASYNC_ENUMERATE_SERVICE,
499 mday            1.33         ASYNC_ENUMERATE_SERVICE_RESULT,
500 chip            1.34     
501 mday            1.33         ASYNC_REGISTERED_MODULE,
502                              ASYNC_DEREGISTERED_MODULE,
503 w.white         1.74.2.2     ASYNC_FIND_MODULE_IN_SERVICE,
504 mday            1.33         ASYNC_FIND_MODULE_IN_SERVICE_RESPONSE,
505 chip            1.34     
506 w.white         1.74.2.2     ASYNC_ASYNC_MODULE_OP_START,  // 100
507 mday            1.33         ASYNC_ASYNC_MODULE_OP_RESULT,
508                          
509 kumpf           1.53         CIM_NOTIFY_PROVIDER_ENABLE_REQUEST_MESSAGE,
510                              CIM_NOTIFY_PROVIDER_ENABLE_RESPONSE_MESSAGE,
511                          
512 w.white         1.74.2.2     CIM_NOTIFY_PROVIDER_FAIL_REQUEST_MESSAGE,
513                              CIM_NOTIFY_PROVIDER_FAIL_RESPONSE_MESSAGE,
514                          
515 kumpf           1.53         CIM_INITIALIZE_PROVIDER_REQUEST_MESSAGE,
516 w.white         1.52         CIM_INITIALIZE_PROVIDER_RESPONSE_MESSAGE,
517                          
518 kumpf           1.53         CIM_INITIALIZE_PROVIDER_AGENT_REQUEST_MESSAGE,
519                              CIM_INITIALIZE_PROVIDER_AGENT_RESPONSE_MESSAGE,
520 kumpf           1.47     
521 kumpf           1.54         CIM_NOTIFY_CONFIG_CHANGE_REQUEST_MESSAGE,
522                              CIM_NOTIFY_CONFIG_CHANGE_RESPONSE_MESSAGE,
523                          
524 carolann.graves 1.64         CIM_SUBSCRIPTION_INIT_COMPLETE_REQUEST_MESSAGE,
525                              CIM_SUBSCRIPTION_INIT_COMPLETE_RESPONSE_MESSAGE,
526                          
527 ms.aruran       1.74.2.4 // Added for NamedPipe implementation for windows
528                          #if defined PEGASUS_OS_TYPE_WINDOWS && !defined(PEGASUS_DISABLE_LOCAL_DOMAIN_SOCKET)
529 w.white         1.74.2.1     // Monitor-related messages:
530 j.alex          1.74.2.3     NAMEDPIPE_MESSAGE,
531 ms.aruran       1.74.2.4 #endif
532 w.white         1.74.2.1 
533 mike            1.5          NUMBER_OF_MESSAGES
534                          };
535                          
536                          PEGASUS_COMMON_LINKAGE const char* MessageTypeToString(Uint32 messageType);
537 mike            1.6      
538                          /** This class implements a stack of queue-ids. Many messages must keep a
539                              stack of queue-ids of queues which they must be returned to. This provides
540                              a light efficient stack for this purpose.
541                          */
542 karl            1.60     class PEGASUS_COMMON_LINKAGE QueueIdStack
543 mike            1.6      {
544                          public:
545                          
546 chip            1.24         QueueIdStack() : _size(0)
547                              {
548 mike            1.6          }
549                          
550 karl            1.59         QueueIdStack(const QueueIdStack& x);
551 mike            1.6      
552 karl            1.59         PEGASUS_EXPLICIT QueueIdStack(Uint32 x);
553 mike            1.6      
554 karl            1.59         PEGASUS_EXPLICIT QueueIdStack(Uint32 x1, Uint32 x2);
555 mike            1.6      
556 chip            1.24         ~QueueIdStack()
557                              {
558 mike            1.6          }
559                          
560 karl            1.59         QueueIdStack& operator=(const QueueIdStack& x);
561 mike            1.6      
562 chip            1.24         Uint32 size() const
563                              {
564                          	return _size;
565 mike            1.6          }
566                          
567 chip            1.24         Boolean isEmpty() const
568                              {
569                          	return _size == 0;
570 mike            1.6          }
571                          
572 chip            1.24         void push(Uint32 x)
573 mike            1.6          {
574 karl            1.59     #ifdef PEGASUS_DEBUG
575 mike            1.6      	if (_size == MAX_SIZE)
576                          	    throw StackOverflow();
577 karl            1.59     #endif
578 mike            1.6      	_items[_size++] = x;
579                              }
580                          
581                              Uint32& top()
582                              {
583 karl            1.59     #ifdef PEGASUS_DEBUG
584 mike            1.6      	if (_size == 0)
585                          	    throw StackUnderflow();
586 karl            1.59     #endif
587 mike            1.6      	return _items[_size-1];
588                              }
589                          
590 chip            1.24         Uint32 top() const
591 mike            1.6          {
592 chip            1.24     	return ((QueueIdStack*)this)->top();
593 mike            1.6          }
594                          
595 chip            1.24         void pop()
596 mike            1.6          {
597 karl            1.59     #ifdef PEGASUS_DEBUG
598 mike            1.6      	if (_size == 0)
599                          	    throw StackUnderflow();
600 karl            1.59     #endif
601 mike            1.6      	_size--;
602                              }
603                          
604                              /** Make a copy of this stack and then pop the top element. */
605 karl            1.59         QueueIdStack copyAndPop() const;
606 mike            1.6      
607                          private:
608                          
609                              // Copy the given stack but then pop the top element:
610 karl            1.59         QueueIdStack(const QueueIdStack& x, int);
611 mike            1.6      
612                              enum { MAX_SIZE = 5 };
613                              Uint32 _items[MAX_SIZE];
614                              Uint32 _size;
615                          };
616 mike            1.4      
617                          PEGASUS_NAMESPACE_END
618                          
619                          #endif /* Pegasus_Message_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2