X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FTermlib%2FTelnetTerminal.hh;h=98cab315518e7a80a05ba5b46cf59765af06a5e7;hb=844c117cb04bc73a5b920c2c49efbf14515da3e2;hp=0514c6388563d7537d296701710f85e2447c8e0c;hpb=45f1f7608c81c1d5e417c97a3e9273e0282d6a0d;p=senf.git diff --git a/Utils/Termlib/TelnetTerminal.hh b/Utils/Termlib/TelnetTerminal.hh index 0514c63..98cab31 100644 --- a/Utils/Termlib/TelnetTerminal.hh +++ b/Utils/Termlib/TelnetTerminal.hh @@ -27,10 +27,8 @@ #define HH_SENF_Utils_Termlib_TelnetTerminal_ 1 // Custom includes -#include -#include #include "Telnet.hh" -#include "Terminfo.hh" +#include "AbstractTerminal.hh" //#include "TelnetTerminal.mpp" ///////////////////////////////hh.p//////////////////////////////////////// @@ -40,31 +38,26 @@ namespace term { class TelnetTerminal : public telnethandler::TerminalType, - public telnethandler::NAWS + public telnethandler::NAWS, + public AbstractTerminal { public: - typedef KeyParser::keycode_t keycode_t; - - static unsigned const DEFAULT_KEY_TIMEOUT_MS = 500u; - TelnetTerminal(); - protected: - virtual void v_setupComplete(); + virtual void setCallbacks(AbstractTerminal::Callbacks & cb); + virtual std::string terminalType(); + virtual unsigned width(); + virtual unsigned height(); + virtual void write(char ch); private: - virtual void v_keyReceived(keycode_t key) = 0; - - virtual void v_charReceived(char c); - void keySequenceTimeout(); - void processKeys(); + virtual void v_setupComplete(); + virtual void v_charReceived(char ch); + virtual void v_windowSizeChanged(); - senf::term::Terminfo tifo_; - senf::term::KeyParser keyParser_; - std::string inputBuffer_; - senf::ClockService::clock_type keyTimeout_; - senf::scheduler::TimerEvent timer_; + AbstractTerminal::Callbacks * callbacks_; }; + }} ///////////////////////////////hh.e////////////////////////////////////////