2 #define _ACMP_CLIENT_H 1
12 ACMPClient(const std::string &host, int port);
14 void add_init_command(const std::string &cmd);
17 void send_command(const std::string &cmd); // Thread-safe.
18 void change_server(const std::string &host, int port); // Thread-safe.
19 void set_connection_callback(const std::function<void(bool)> &callback);
25 std::vector<std::string> init_commands;
26 std::function<void(bool)> connection_callback;
29 std::string host; // Protected by mu.
30 int port; // Protected by mu.
31 std::vector<std::string> queued_commands; // Protected by mu.
34 #endif // !defined(_ACMP_CLIENT_H)