X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FConsole%2FServer.hh;h=4c5e66ff5a78ee6d28a23cd3613c30b11374a591;hb=9a4ab28bb53bc1a7719141a2263282d4cf73b258;hp=ef38917a2c382726e827cb8a5dc9b9e8889b8fc0;hpb=958bdb52c39fa39f4ef91cafd9628bcb4f85a03c;p=senf.git diff --git a/Utils/Console/Server.hh b/Utils/Console/Server.hh index ef38917..4c5e66f 100644 --- a/Utils/Console/Server.hh +++ b/Utils/Console/Server.hh @@ -173,7 +173,11 @@ namespace console { std::ostream & stream(); std::string promptString() const; DirectoryNode & root() const; + DirectoryNode & cwd() const; Server::Mode mode() const; + void write(std::string const & data) const; + std::string const & backtrace() const; + unsigned width() const; static Client & get(std::ostream & os); @@ -184,8 +188,7 @@ namespace console { void setInteractive(); void setNoninteractive(); - - void translate(std::string & data); + size_t handleInput(std::string input, bool incremental = false); virtual void v_write(senf::log::time_type timestamp, std::string const & stream, std::string const & area, unsigned level, @@ -201,10 +204,19 @@ namespace console { std::string lastCommand_; boost::scoped_ptr reader_; Server::Mode mode_; + std::string backtrace_; friend class Server; friend class detail::ClientReader; friend class detail::NonblockingSocketSink; + + class SysBacktrace + { + SysBacktrace(); + static void backtrace(std::ostream & os); + static SysBacktrace instance_; + }; + }; /** \brief Output Console Client instance as it's string representation