diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2013-02-13 03:20:52 +0200 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2013-02-13 03:20:52 +0200 |
commit | e255c37eca94d4d9c23f689b473b106575b9e2fa (patch) | |
tree | 0d7916bcd872d3da2367acbec6d0594c837193fd /proto_lib/api_protocol.h | |
parent | 85a13d70cc5249e2f583bb16f0914646aefe4fe6 (diff) |
some testing code
Diffstat (limited to 'proto_lib/api_protocol.h')
-rw-r--r-- | proto_lib/api_protocol.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/proto_lib/api_protocol.h b/proto_lib/api_protocol.h index b18d2e7..bebd401 100644 --- a/proto_lib/api_protocol.h +++ b/proto_lib/api_protocol.h @@ -24,9 +24,16 @@ struct service_s struct cmd { std::string command, description; +#ifdef DEBUG + bool operator==(const cmd&); +#endif }; std::string service; std::list<cmd> cmds; +#ifdef DEBUG + bool operator==(service_s&); + bool operator!=(service_s&); +#endif }; struct svc_cmd @@ -55,6 +62,7 @@ public: //client functions static packet *cli_make_init_packet(); //should be first packet to server static packet *cli_make_command_packet(std::string &service, std::string &command); + static packet *cli_make_command_packet(const char* service, const char* command); static packet *cli_make_request_services_packet(); static std::list<service_s> *cli_extract_services(packet&); |