openMSX
|
#include <CliConnection.hh>
Public Member Functions | |
void | setUpdateEnable (CliComm::UpdateType type, bool value) |
bool | getUpdateEnable (CliComm::UpdateType type) const |
void | start () |
Starts the helper thread. | |
Public Member Functions inherited from openmsx::CliListener | |
CliListener (const CliListener &)=delete | |
CliListener (CliListener &&)=delete | |
CliListener & | operator= (const CliListener &)=delete |
CliListener & | operator= (CliListener &&)=delete |
virtual | ~CliListener ()=default |
Protected Member Functions | |
CliConnection (CommandController &commandController, EventDistributor &eventDistributor) | |
~CliConnection () override | |
virtual void | output (std::string_view message)=0 |
void | end () |
End this connection by sending the closing tag and then closing the stream. | |
virtual void | close ()=0 |
Close the connection. | |
void | startOutput () |
Send opening XML tag, should be called exactly once by a subclass shortly after opening a connection. | |
Protected Member Functions inherited from openmsx::CliListener | |
CliListener ()=default | |
Protected Attributes | |
AdhocCliCommParser | parser |
Poller | poller |
Definition at line 23 of file CliConnection.hh.
|
protected |
Definition at line 32 of file CliConnection.cc.
|
overrideprotected |
Definition at line 43 of file CliConnection.cc.
References openmsx::CLICOMMAND, and openmsx::EventDistributor::unregisterEventListener().
|
protectedpure virtual |
|
protected |
End this connection by sending the closing tag and then closing the stream.
Subclasses should call this method at the start of their destructor.
Definition at line 85 of file CliConnection.cc.
References openmsx::Poller::abort(), close(), output(), and poller.
Referenced by openmsx::SocketConnection::~SocketConnection(), and openmsx::StdioConnection::~StdioConnection().
|
inline |
Definition at line 29 of file CliConnection.hh.
|
protectedpure virtual |
Implemented in openmsx::StdioConnection, and openmsx::SocketConnection.
Referenced by end(), and startOutput().
|
inline |
Definition at line 26 of file CliConnection.hh.
void openmsx::CliConnection::start | ( | ) |
Starts the helper thread.
Called when this CliConnection is added to GlobalCliComm (and after it's allowed to respond to external commands). Subclasses should themself send the opening tag (startOutput()).
Definition at line 80 of file CliConnection.cc.
|
protected |
Send opening XML tag, should be called exactly once by a subclass shortly after opening a connection.
Cannot be implemented in the base class because some subclasses (want to send data before this tag).
Definition at line 75 of file CliConnection.cc.
References output().
Referenced by openmsx::StdioConnection::StdioConnection().
|
protected |
Definition at line 65 of file CliConnection.hh.
|
protected |
Definition at line 66 of file CliConnection.hh.
Referenced by end(), and openmsx::SocketConnection::output().