X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FTermlib%2FTelnetTerminal.hh;h=8d315838ed2ddfbe658cf533f51f7ed3631d63a4;hb=79e54eda6a7fb5ac3fa5b37f408dd386454c5bbd;hp=98cab315518e7a80a05ba5b46cf59765af06a5e7;hpb=844c117cb04bc73a5b920c2c49efbf14515da3e2;p=senf.git diff --git a/Utils/Termlib/TelnetTerminal.hh b/Utils/Termlib/TelnetTerminal.hh index 98cab31..8d31583 100644 --- a/Utils/Termlib/TelnetTerminal.hh +++ b/Utils/Termlib/TelnetTerminal.hh @@ -36,6 +36,18 @@ namespace senf { namespace term { + /** \brief AbstractTerminal interface implementation based on telnet + + This class provides a telnet server implementation implementing the AbstractTerminal + interface. + + TelnetTerminal provides one additional callback which needs to be implemented in a derived + class: v_setupFailed(). This member will be called, when not all required telnet options are + supported by the telnet client. In this case, the communication will be switched back into + line-oriented mode and v_setupFailed() is called. + + \ingroup telnet_group + */ class TelnetTerminal : public telnethandler::TerminalType, public telnethandler::NAWS, @@ -44,11 +56,21 @@ namespace term { public: TelnetTerminal(); + ///\name AbstractTerminal interface implementation + ///\{ virtual void setCallbacks(AbstractTerminal::Callbacks & cb); virtual std::string terminalType(); virtual unsigned width(); virtual unsigned height(); virtual void write(char ch); + ///\} + + protected: + +# ifndef DOXYGEN + private: +# endif + virtual void v_setupFailed() = 0; ///< Called when the telnet setup has failed private: virtual void v_setupComplete(); @@ -56,6 +78,7 @@ namespace term { virtual void v_windowSizeChanged(); AbstractTerminal::Callbacks * callbacks_; + bool setupFailed_; }; }}