31 #ifndef STRUCT_SERVERCOMMANDRESPONSE_HPP_ 32 #define STRUCT_SERVERCOMMANDRESPONSE_HPP_ 81 : text(response),
id(newId) {}
94 :
fail(failed),
confirm(toBeConfirmed), text(response) {}
ServerCommandResponse(bool failed, bool toBeConfirmed, const std::string &response)
Constructor initializing a possibly failed or possibly to be confirmed response with text...
Definition: ServerCommandResponse.hpp:93
Response from the command-and-control server.
Definition: ServerCommandResponse.hpp:40
ServerCommandResponse(const std::string &response)
Constructor initializing a successful response with text.
Definition: ServerCommandResponse.hpp:69
ServerCommandResponse()=default
Default constructor.
ServerCommandResponse(const std::string &response, std::uint64_t newId)
Constructor initializing a successful response with text and ID.
Definition: ServerCommandResponse.hpp:80
static ServerCommandResponse toBeConfirmed(const std::string &response)
Helper to initialize a "to be confirmed" response with text.
Definition: ServerCommandResponse.hpp:116
bool confirm
Indicates whether the server command needs to be confirmed.
Definition: ServerCommandResponse.hpp:48
bool fail
Indicates whether the server command failed.
Definition: ServerCommandResponse.hpp:45
std::uint64_t id
Optional ID returned by the server.
Definition: ServerCommandResponse.hpp:54
static ServerCommandResponse failed(const std::string &response)
Helper to initialize a "failed" response with text.
Definition: ServerCommandResponse.hpp:106
Namespace for data structures.
Definition: AlgoThreadProperties.hpp:43
std::string text
The text of the response by the server.
Definition: ServerCommandResponse.hpp:51