ircproxy The Ultimate Cyborg |
00001 // ircproxy -- An IRC bouncer. 00002 // 00003 //! @file ServerSessionInput.h 00004 //! @brief This file contains the declaration of class ServerSessionInput. 00005 // 00006 // Copyright (C) 2006, 2007 by 00007 // 00008 // Carlo Wood, Run on IRC <carlo@alinoe.com> 00009 // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt 00010 // Fingerprint16 = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF 61 00011 // 00012 // This file may be distributed under the terms of the Q Public License 00013 // version 1.0 as appearing in the file LICENSE.QPL included in the 00014 // packaging of this file. 00015 00016 #ifndef SERVERSESSIONINPUT_H 00017 #define SERVERSESSIONINPUT_H 00018 00019 #ifndef USE_PCH 00020 #include <libcw/traits.h> 00021 #include <libcw/eomf.h> 00022 #endif 00023 00024 #include "MessageIn.h" 00025 00026 /*! @brief Server session input decoder. 00027 * 00028 * This class is responsible for decoding messages received from a server. 00029 */ 00030 class ServerSessionInput : public read_input_tct<text> { 00031 private: 00032 ServerMessageIn M_current_msg; //!< The IRC message currently being decoded. 00033 00034 public: 00035 ServerSessionInput(input_buffer_ct* ibuf); 00036 00037 protected: 00038 // Incoming event from read_input_tct<text>. 00039 void decode(msg_block_ct msg_block); 00040 00041 // Incoming event from read_input_tct<text>. 00042 void read_returned_zero(void) { network_connection_terminated(); del(); } 00043 00044 protected: 00045 // Outgoing event to ServerSession (derived from this class). 00046 virtual void new_message_received(ServerMessageIn const&) = 0; 00047 00048 // Outgoing event to ServerSession (derived from this class). 00049 virtual void network_connection_terminated(void) = 0; 00050 }; 00051 00052 #endif // SERVERSESSIONINPUT_H
Copyright © 2005-2007 Carlo Wood. All rights reserved. |
---|