BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
#include <Console.h>
Public Types | |
typedef Poco::SharedPtr < ConsoleSessionImpl > | Ptr |
Public Member Functions | |
virtual std::string | readUntil (const char c)=0 |
virtual std::string | readBytes (const unsigned int length)=0 |
virtual void | print (const std::string &text, bool newline=true)=0 |
virtual bool | eof () |
Protected Member Functions | |
std::string | iosReadUntil (std::istream &in, const char c) |
std::string | iosReadBytes (std::istream &in, const unsigned int length) |
void | iosPrint (std::ostream &out, const std::string &text, bool newline) |
Implementation specific console session. The session can represent a user that has logged into the system, an open socket or some other context.
|
virtual |
Return true if the session cannot read any data anymore.
Reimplemented in BeeeOn::Console::ClosedConsoleSessionImpl, BeeeOn::TCPConsoleSessionImpl, and BeeeOn::StreamConsoleSessionImpl.
|
protected |
Implementation of the print for std::ostream.
|
protected |
Implementation of the readBytes for std::istream.
|
protected |
Implementation of the readUntil for std::istream.
|
pure virtual |
Print the given string. The newline can be optionally appended.
Implemented in BeeeOn::Console::ClosedConsoleSessionImpl, BeeeOn::TCPConsoleSessionImpl, and BeeeOn::StreamConsoleSessionImpl.
|
pure virtual |
Read the given amount of bytes.
Implemented in BeeeOn::Console::ClosedConsoleSessionImpl, BeeeOn::TCPConsoleSessionImpl, and BeeeOn::StreamConsoleSessionImpl.
|
pure virtual |
Read and return data until the character c is reached.
Implemented in BeeeOn::Console::ClosedConsoleSessionImpl, BeeeOn::TCPConsoleSessionImpl, and BeeeOn::StreamConsoleSessionImpl.