summaryrefslogtreecommitdiff
path: root/ace/Log_Msg_IPC.h
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-10-14 05:17:41 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-10-14 05:17:41 +0000
commit1c2a195c13869e7a3cc5005a537c089e14a100d3 (patch)
treed45c7a1bb91dad0fd7eb57e062de64442a22d247 /ace/Log_Msg_IPC.h
parent619a8d9519a5f68281fb2f01dd4c977dc3386201 (diff)
downloadATCD-1c2a195c13869e7a3cc5005a537c089e14a100d3.tar.gz
ChangeLogTag:Fri Oct 13 21:49:54 2000 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'ace/Log_Msg_IPC.h')
-rw-r--r--ace/Log_Msg_IPC.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/ace/Log_Msg_IPC.h b/ace/Log_Msg_IPC.h
new file mode 100644
index 00000000000..8d40b5098f4
--- /dev/null
+++ b/ace/Log_Msg_IPC.h
@@ -0,0 +1,67 @@
+// -*- C++ -*-
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// ace
+//
+// = FILENAME
+// Log_Msg_IPC.h
+//
+// = AUTHOR
+// Carlos O'Ryan
+//
+// ============================================================================
+
+#ifndef ACE_LOG_MSG_LOGGER_H
+#define ACE_LOG_MSG_LOGGER_H
+#include "ace/pre.h"
+
+#include "ace/Log_Msg_Backend.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+// IPC conduit between sender and client daemon. This should be
+// included in the <ACE_Log_Msg> class, but due to "order of include"
+// problems it can't be...
+#if defined (ACE_HAS_STREAM_PIPES)
+# include "ace/SPIPE_Connector.h"
+typedef ACE_SPIPE_Stream ACE_LOG_MSG_IPC_STREAM;
+typedef ACE_SPIPE_Connector ACE_LOG_MSG_IPC_CONNECTOR;
+typedef ACE_SPIPE_Addr ACE_LOG_MSG_IPC_ADDR;
+#else
+# include "ace/SOCK_Connector.h"
+typedef ACE_SOCK_Stream ACE_LOG_MSG_IPC_STREAM;
+typedef ACE_SOCK_Connector ACE_LOG_MSG_IPC_CONNECTOR;
+typedef ACE_INET_Addr ACE_LOG_MSG_IPC_ADDR;
+#endif /* ACE_HAS_STREAM_PIPES */
+
+/// Defines the interfaces for ACE_Log_Msg backend.
+/**
+ * Implement an ACE_Log_Msg_Backend that logs to a remote logging
+ * process.
+ */
+class ACE_Export ACE_Log_Msg_IPC : public ACE_Log_Msg_Backend
+{
+public:
+ /// Constructor
+ ACE_Log_Msg_IPC (void);
+
+ /// Destructor
+ virtual ~ACE_Log_Msg_IPC (void);
+
+ /// Open a new connection
+ virtual int open (const ACE_TCHAR *logger_key);
+ virtual int reset (void);
+ virtual int close (void);
+ virtual int log (ACE_Log_Record &log_record);
+
+private:
+ ACE_LOG_MSG_IPC_STREAM message_queue_;
+};
+
+#include "ace/post.h"
+#endif /* ACE_LOG_MSG_H */