00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Log_Msg_IPC.h 00006 * 00007 * $Id: Log_Msg_IPC.h,v 1.1.1.2 2003/02/21 18:36:32 chad Exp $ 00008 * 00009 * @author Carlos O'Ryan <coryan@uci.edu> 00010 */ 00011 //============================================================================= 00012 00013 #ifndef ACE_LOG_MSG_LOGGER_H 00014 #define ACE_LOG_MSG_LOGGER_H 00015 #include "ace/pre.h" 00016 00017 #include "ace/Log_Msg_Backend.h" 00018 00019 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00020 # pragma once 00021 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00022 00023 // IPC conduit between sender and client daemon. This should be 00024 // included in the <ACE_Log_Msg> class, but due to "order of include" 00025 // problems it can't be... 00026 #if defined (ACE_HAS_STREAM_PIPES) 00027 # include "ace/SPIPE_Connector.h" 00028 typedef ACE_SPIPE_Stream ACE_LOG_MSG_IPC_STREAM; 00029 typedef ACE_SPIPE_Connector ACE_LOG_MSG_IPC_CONNECTOR; 00030 typedef ACE_SPIPE_Addr ACE_LOG_MSG_IPC_ADDR; 00031 #else 00032 # include "ace/SOCK_Connector.h" 00033 typedef ACE_SOCK_Stream ACE_LOG_MSG_IPC_STREAM; 00034 typedef ACE_SOCK_Connector ACE_LOG_MSG_IPC_CONNECTOR; 00035 typedef ACE_INET_Addr ACE_LOG_MSG_IPC_ADDR; 00036 #endif /* ACE_HAS_STREAM_PIPES */ 00037 00038 /// Defines the interfaces for ACE_Log_Msg backend. 00039 /** 00040 * Implement an ACE_Log_Msg_Backend that logs to a remote logging 00041 * process. 00042 */ 00043 class ACE_Export ACE_Log_Msg_IPC : public ACE_Log_Msg_Backend 00044 { 00045 public: 00046 /// Constructor 00047 ACE_Log_Msg_IPC (void); 00048 00049 /// Destructor 00050 virtual ~ACE_Log_Msg_IPC (void); 00051 00052 /// Open a new connection 00053 virtual int open (const ACE_TCHAR *logger_key); 00054 virtual int reset (void); 00055 virtual int close (void); 00056 virtual int log (ACE_Log_Record &log_record); 00057 00058 private: 00059 ACE_LOG_MSG_IPC_STREAM message_queue_; 00060 }; 00061 00062 #include "ace/post.h" 00063 #endif /* ACE_LOG_MSG_H */
1.2.14 written by Dimitri van Heesch,
© 1997-2002