X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Console%2FServer.ih;h=d31f7133f4187512a421d5cd23c98e69ae7d846d;hb=feeec0e9cd78825120bd52f9ef4e115d383bf6a8;hp=6bbaf5a4d5c0e475bb8372a8fe01dc3193094ad5;hpb=69e4a07eea4a95a83d226d7b7095b7d310dc4a06;p=senf.git diff --git a/Console/Server.ih b/Console/Server.ih index 6bbaf5a..d31f713 100644 --- a/Console/Server.ih +++ b/Console/Server.ih @@ -90,7 +90,7 @@ namespace detail { // Called by subclasses to perform actions in the Client void stopClient(); - void handleInput(std::string const & input) const; + std::string::size_type handleInput(std::string const & input, bool incremental=false) const; // Called by the Client @@ -132,6 +132,28 @@ namespace detail { unsigned promptLen_; bool promptActive_; }; + + /** \brief Internal: Primitive ClientReader implementation + + This implementation uses the cooked telnet mode to read lines from the console. It does not + support explicit line editing or any other advanced features. + */ + class NoninteractiveClientReader + : public ClientReader + { + public: + NoninteractiveClientReader(Client & client); + + private: + virtual void v_disablePrompt(); + virtual void v_enablePrompt(); + virtual void v_translate(std::string & data); + + void newData(senf::Scheduler::EventId event); + + SchedulerBinding binding_; + std::string buffer_; + }; }}}