3 //==========================================================================
5 * @file SV_Message_Queue.h
7 * @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
9 //===========================================================================
11 #ifndef ACE_SV_MESSAGE_QUEUE_H
12 #define ACE_SV_MESSAGE_QUEUE_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "ace/config-all.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "ace/SV_Message.h"
23 #include "ace/os_include/sys/os_stat.h"
24 #include "ace/os_include/sys/os_ipc.h"
25 #include "ace/Default_Constants.h"
27 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
30 * @class ACE_SV_Message_Queue
32 * @brief Defines the header file for the C++ wrapper for System V IPC
35 class ACE_Export ACE_SV_Message_Queue
38 // = Useful symbolic constants.
41 ACE_CREATE
= IPC_CREAT
,
43 ACE_NOWAIT
= IPC_NOWAIT
46 /// Open a message queue using the <external_id>.
47 ACE_SV_Message_Queue ();
48 ACE_SV_Message_Queue (key_t external_id
,
49 int create
= ACE_SV_Message_Queue::ACE_OPEN
,
50 int perms
= ACE_DEFAULT_FILE_PERMS
);
51 int open (key_t external_id
,
52 int create
= ACE_SV_Message_Queue::ACE_OPEN
,
53 int perms
= ACE_DEFAULT_FILE_PERMS
);
55 ~ACE_SV_Message_Queue ();
57 /// Close down this instance of the message queue without removing it
61 /// Close down and remove the message queue from the system.
64 // = Message transfer methods.
65 ssize_t
recv (ACE_SV_Message
&mb
,
70 int send (const ACE_SV_Message
&mb
,
74 /// Access the underlying control operations.
75 int control (int option
, void *arg
= 0);
77 /// Get the underly internal id.
80 /// Set the underly internal id.
83 /// Dump the state of an object.
86 /// Declare the dynamic allocation hooks.
87 ACE_ALLOC_HOOK_DECLARE
;
90 /// Returned from the underlying <msgget> system call.
94 ACE_END_VERSIONED_NAMESPACE_DECL
96 #if defined (__ACE_INLINE__)
97 #include "ace/SV_Message_Queue.inl"
98 #endif /* __ACE_INLINE__ */
100 #include /**/ "ace/post.h"
102 #endif /* ACE_SV_MESSAGE_QUEUE_H */