net_displayer.h

Go to the documentation of this file.
00001 
00005 /* Copyright, 2000 Nevrax Ltd.
00006  *
00007  * This file is part of NEVRAX NEL.
00008  * NEVRAX NEL is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2, or (at your option)
00011  * any later version.
00012 
00013  * NEVRAX NEL is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * General Public License for more details.
00017 
00018  * You should have received a copy of the GNU General Public License
00019  * along with NEVRAX NEL; see the file COPYING. If not, write to the
00020  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
00021  * MA 02111-1307, USA.
00022  */
00023 
00024 #ifndef NL_NET_DISPLAYER_H
00025 #define NL_NET_DISPLAYER_H
00026 
00027 #include "nel/misc/log.h"
00028 #include "nel/misc/displayer.h"
00029 
00030 #include "callback_client.h"
00031 
00032 namespace NLNET {
00033 
00034 
00043 class CNetDisplayer : public NLMISC::IDisplayer
00044 {
00045 public:
00046 
00048     CNetDisplayer(bool autoConnect = true);
00049 
00053     void setLogServer( const CInetAddress& logServerAddr );
00054 
00057     void setLogServer( CCallbackClient *server );
00058 
00060     bool connected () { return _Server->connected(); }
00061 
00063     virtual ~CNetDisplayer();
00064 
00065 protected:
00066 
00070     virtual void doDisplay ( const NLMISC::CLog::TDisplayInfo& args, const char *message);
00071 
00073     void findAndConnect();
00074 
00075 private:
00076 
00077     CInetAddress    _ServerAddr;
00078 //  CCallbackClient _Server;
00079     CCallbackClient *_Server;
00080     bool            _ServerAllocated;
00081 //  uint32          _ServerNumber;
00082 };
00083 
00084 
00085 } // NLNET
00086 
00087 
00088 #endif // NL_NET_DISPLAYER_H
00089 
00090 /* End of net_displayer.h */

Generated on Thu Jan 7 08:26:23 2010 for NeL by  doxygen 1.6.1