version 1.29, 2006/08/30 19:10:02
|
version 1.30, 2006/11/07 21:30:36
|
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Mike Day (mdday@us.ibm.com |
|
// |
|
// Modified By: David Dillard, VERITAS Software Corp. |
|
// (david.dillard@veritas.com) |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#ifndef CIMOM_include |
#ifndef Pegasus_Cimom_h |
#define CIMOM_include |
#define Pegasus_Cimom_h |
| |
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
#include <Pegasus/Common/InternalException.h> | #include <Pegasus/Common/InternalException.h> |
|
|
static Uint32 paused; | static Uint32 paused; |
static Uint32 stopped; | static Uint32 stopped; |
static Uint32 module_controller; | static Uint32 module_controller; |
|
|
} ; | } ; |
| |
class PEGASUS_COMMON_LINKAGE message_module : public Linkable | class PEGASUS_COMMON_LINKAGE message_module : public Linkable |
{ | { |
public: | public: |
message_module() |
message_module() : _name(), _capabilities(0), _mask(0), _q_id(0) { } |
: _name(), _capabilities(0), |
|
_mask(0), _q_id(0) { } |
|
| |
message_module(const String & name, |
message_module( |
|
const String & name, |
Uint32 capabilities, | Uint32 capabilities, |
Uint32 mask, | Uint32 mask, |
Uint32 queue) | Uint32 queue) |
|
|
Uint32 _mask; | Uint32 _mask; |
struct timeval _heartbeat; | struct timeval _heartbeat; |
| |
|
|
Uint32 _q_id; | Uint32 _q_id; |
friend class cimom; | friend class cimom; |
}; | }; |
| |
class MessageQueueService; | class MessageQueueService; |
| |
|
|
class PEGASUS_COMMON_LINKAGE cimom : public MessageQueue | class PEGASUS_COMMON_LINKAGE cimom : public MessageQueue |
{ | { |
public : | public : |
cimom(); | cimom(); |
|
|
virtual ~cimom() ; | virtual ~cimom() ; |
| |
Boolean moduleChange(struct timeval last); | Boolean moduleChange(struct timeval last); |
|
|
void set_default_op_timeout(const struct timeval *buffer); | void set_default_op_timeout(const struct timeval *buffer); |
void get_default_op_timeout(struct timeval *timeout) const ; | void get_default_op_timeout(struct timeval *timeout) const ; |
| |
|
|
|
|
protected: | protected: |
Uint32 get_module_q(const String & name); | Uint32 get_module_q(const String & name); |
static void _make_response(Message *req, Uint32 code); | static void _make_response(Message *req, Uint32 code); |
static void _completeAsyncResponse(AsyncRequest *request, |
static void _completeAsyncResponse( |
|
AsyncRequest* request, |
AsyncReply *reply, | AsyncReply *reply, |
Uint32 state, | Uint32 state, |
Uint32 flag); | Uint32 flag); |
static void _complete_op_node(AsyncOpNode *op, Uint32 state, Uint32 flag, Uint32 code); |
static void _complete_op_node( |
|
AsyncOpNode* op, |
|
Uint32 state, |
|
Uint32 flag, |
|
Uint32 code); |
static void _default_callback(AsyncOpNode *, MessageQueue *, void *); | static void _default_callback(AsyncOpNode *, MessageQueue *, void *); |
| |
private: | private: |
|
|
| |
Thread _routing_thread; | Thread _routing_thread; |
| |
void _handle_cimom_op(AsyncOpNode *op, Thread *thread, MessageQueue *queue); |
void _handle_cimom_op( |
|
AsyncOpNode* op, |
|
Thread* thread, |
|
MessageQueue* queue); |
Uint32 _ioctl(Uint32, Uint32, void *); | Uint32 _ioctl(Uint32, Uint32, void *); |
| |
virtual void handleEnqueue(); | virtual void handleEnqueue(); |
|
|
void _deregistered_module_in_service(DeRegisteredModule *msg); | void _deregistered_module_in_service(DeRegisteredModule *msg); |
void _find_module_in_service(FindModuleInService *msg); | void _find_module_in_service(FindModuleInService *msg); |
| |
|
|
AtomicInt _die; | AtomicInt _die; |
AtomicInt _routed_queue_shutdown; | AtomicInt _routed_queue_shutdown; |
| |
|
|
friend class MessageQueueService; | friend class MessageQueueService; |
}; | }; |
| |
|
|
|
|
|
|
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
| |
#endif // CIMOM_include |
#endif // Pegasus_Cimom_h |