18 #ifndef SHEVEK_TELNET_HH
19 #define SHEVEK_TELNET_HH
30 static char const SE =
'\xf0';
31 static char const NOP =
'\xf1';
32 static char const MARK =
'\xf2';
33 static char const BREAK =
'\xf3';
34 static char const IP =
'\xf4';
35 static char const AO =
'\xf5';
36 static char const AYT =
'\xf6';
37 static char const EC =
'\xf7';
38 static char const EL =
'\xf8';
39 static char const GA =
'\xf9';
40 static char const SB =
'\xfa';
41 static char const WILL =
'\xfb';
42 static char const WONT =
'\xfc';
43 static char const DO =
'\xfd';
44 static char const DONT =
'\xfe';
45 static char const IAC =
'\xff';
47 static char const BINARY =
'\x00';
48 static char const ECHO =
'\x01';
49 static char const SUPPRESS_GA =
'\x03';
50 static char const STATUS =
'\x05';
51 static char const TIMING_MARK =
'\x06';
52 static char const EXOPL =
'\xff';
62 typedef void (
telnet::*action)(option_t *opt);
66 action will, wont, doo, dont;
67 bool here, there, not_both;
69 static option_t options[6];
71 option_t *s_find (
char opt);
72 void nop (option_t *);
73 void nopwill (option_t *opt);
74 void nopdo (option_t *opt);
75 void l_will (option_t *opt);
76 void l_wont (option_t *opt);
77 void l_do (option_t *opt);
78 void l_dont (option_t *opt);
79 void will_check (option_t *opt);
80 void do_check (option_t *opt);
81 void wont_check (option_t *opt);
82 void dont_check (option_t *opt);
83 void l_do_sub (std::string
const &data, std::string::size_type &pos);
85 void l_in_filter (std::string &data);
86 void l_out_filter (std::string &data);
87 std::string m_am_here, m_inbuffer;
90 telnet (Glib::RefPtr <Glib::MainContext> main);
93 static Glib::RefPtr <telnet>
create (Glib::RefPtr <Glib::MainContext> main = Glib::MainContext::get_default () );