1 #ifndef CLICONNECTION_HH
2 #define CLICONNECTION_HH
16 class CommandController;
17 class EventDistributor;
23 updateEnabled[type] = value;
26 return updateEnabled[type];
41 virtual void output(std::string_view message) = 0;
65 virtual void run() = 0;
67 void execute(
const std::string& command);
72 std::string_view name, std::string_view value) noexcept
override;
75 int signalEvent(
const std::shared_ptr<const Event>& event) noexcept
override;
92 void output(std::string_view message)
override;
95 void close()
override;
105 std::string_view name);
106 ~PipeConnection()
override;
108 void output(std::string_view message)
override;
111 void close()
override;
115 HANDLE shutdownEvent;
127 void output(std::string_view message)
override;
130 void close()
override;
void end()
End this connection by sending the closing tag and then closing the stream.
~CliConnection() override
virtual void close()=0
Close the connection.
void start()
Starts the helper thread.
void setUpdateEnable(CliComm::UpdateType type, bool value)
AdhocCliCommParser parser
void startOutput()
Send opening XML tag, should be called exactly once by a subclass shortly after opening a connection.
virtual void output(std::string_view message)=0
bool getUpdateEnable(CliComm::UpdateType type) const
CliConnection(CommandController &commandController, EventDistributor &eventDistributor)
Polls for events on a given file descriptor.
SocketConnection(CommandController &commandController, EventDistributor &eventDistributor, SOCKET sd)
~SocketConnection() override
void output(std::string_view message) override
void output(std::string_view message) override
~StdioConnection() override
StdioConnection(CommandController &commandController, EventDistributor &eventDistributor)
This file implemented 3 utility functions: