Log_Msg_IPC.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Log_Msg_IPC.h
00006  *
00007  *  Log_Msg_IPC.h,v 4.6 2006/04/27 11:17:55 jwillemsen 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 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00029 typedef ACE_SPIPE_Stream ACE_LOG_MSG_IPC_STREAM;
00030 typedef ACE_SPIPE_Connector ACE_LOG_MSG_IPC_CONNECTOR;
00031 typedef ACE_SPIPE_Addr ACE_LOG_MSG_IPC_ADDR;
00032 ACE_END_VERSIONED_NAMESPACE_DECL
00033 #else
00034 # include "ace/SOCK_Connector.h"
00035 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00036 typedef ACE_SOCK_Stream ACE_LOG_MSG_IPC_STREAM;
00037 typedef ACE_SOCK_Connector ACE_LOG_MSG_IPC_CONNECTOR;
00038 typedef ACE_INET_Addr ACE_LOG_MSG_IPC_ADDR;
00039 ACE_END_VERSIONED_NAMESPACE_DECL
00040 #endif /* ACE_HAS_STREAM_PIPES */
00041 
00042 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00043 
00044 /// Defines the interfaces for ACE_Log_Msg backend.
00045 /**
00046  * Implement an ACE_Log_Msg_Backend that logs to a remote logging
00047  * process.
00048  */
00049 class ACE_Export ACE_Log_Msg_IPC : public ACE_Log_Msg_Backend
00050 {
00051 public:
00052   /// Constructor
00053   ACE_Log_Msg_IPC (void);
00054 
00055   /// Destructor
00056   virtual ~ACE_Log_Msg_IPC (void);
00057 
00058   /// Open a new connection
00059   virtual int open (const ACE_TCHAR *logger_key);
00060   virtual int reset (void);
00061   virtual int close (void);
00062   virtual int log (ACE_Log_Record &log_record);
00063 
00064 private:
00065   ACE_LOG_MSG_IPC_STREAM message_queue_;
00066 };
00067 
00068 ACE_END_VERSIONED_NAMESPACE_DECL
00069 
00070 #include /**/ "ace/post.h"
00071 #endif /* ACE_LOG_MSG_H */

Generated on Thu Nov 9 09:41:53 2006 for ACE by doxygen 1.3.6