From 1d41574c6e8e7bbf3705645feb429df6281ccb83 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Tue, 12 Feb 2013 20:36:08 +0200 Subject: working on service support --- proto_lib/utilities.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'proto_lib/utilities.cpp') diff --git a/proto_lib/utilities.cpp b/proto_lib/utilities.cpp index befa203..64f69bb 100644 --- a/proto_lib/utilities.cpp +++ b/proto_lib/utilities.cpp @@ -21,6 +21,9 @@ #include #include "utilities.h" +namespace proto +{ + void pack_cli_header(std::vector &v) { pack_buffer(proto_header, sizeof(proto_header), v); @@ -63,17 +66,19 @@ const unsigned char *to_internal_type(packet_type t) const unsigned char *type = NULL; switch(t) { - case AUTH_REPLY: case AUTH_REQUEST: + case TYPE_AUTH_REPLY: case TYPE_AUTH_REQUEST: type = type_auth; break; - case SERVICES_REPLY: case SERVICES_REQUEST: + case TYPE_SERVICES_REPLY: case TYPE_SERVICES_REQUEST: type = type_services; break; - case COMMAND_REPLY: case COMMAND_REQUEST: + case TYPE_COMMAND_REPLY: case TYPE_COMMAND_REQUEST: type = type_command; break; - case UNKNOWN: default: + case TYPE_UNKNOWN: default: break; }; return type; } + +}; -- cgit v1.2.3