X-Git-Url: https://git.syn-net.org/debian/?a=blobdiff_plain;f=src%2Fanyrtpproxy%2FcommandHandler.h;h=954efc798e0e1f9b83632e5c4b21daba6a4edab8;hb=bd02a5f6be4815d46524d613f727199ca756c971;hp=6bd802a48cc542bf674e5edf44151f88b5f831b1;hpb=058ae090a970436caec3b3059e9e18b310dd6b0d;p=anytun.git diff --git a/src/anyrtpproxy/commandHandler.h b/src/anyrtpproxy/commandHandler.h index 6bd802a..954efc7 100644 --- a/src/anyrtpproxy/commandHandler.h +++ b/src/anyrtpproxy/commandHandler.h @@ -11,14 +11,15 @@ * tunneling and relaying of packets of any protocol. * * - * Copyright (C) 2007-2008 Othmar Gsenger, Erwin Nindl, + * Copyright (C) 2007-2009 Othmar Gsenger, Erwin Nindl, * Christian Pointner * * This file is part of Anytun. * * Anytun is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 3 as - * published by the Free Software Foundation. + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. * * Anytun is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -45,31 +46,31 @@ class CommandHandler public: typedef boost::asio::ip::udp proto; - CommandHandler(SyncQueue& q, std::string lp, PortWindow &); - CommandHandler(SyncQueue& q, std::string la, std::string lp, PortWindow &); - + CommandHandler(SyncQueue& q, std::string lp, PortWindow&); + CommandHandler(SyncQueue& q, std::string la, std::string lp, PortWindow&); + bool isRunning(); - #define CMD_REQUEST 'U' - #define CMD_RESPONSE 'L' - #define CMD_DELETE 'D' - #define CMD_VERSION 'V' - #define CMD_INFO 'I' +#define CMD_REQUEST 'U' +#define CMD_RESPONSE 'L' +#define CMD_DELETE 'D' +#define CMD_VERSION 'V' +#define CMD_INFO 'I' - #define RET_OK "0" - #define RET_ERR_SYNTAX "E1" - #define RET_ERR_UNKNOWN "E2" +#define RET_OK "0" +#define RET_ERR_SYNTAX "E1" +#define RET_ERR_UNKNOWN "E2" - #define BASE_VERSION "20040107" - #define SUP_VERSION "20050322" +#define BASE_VERSION "20040107" +#define SUP_VERSION "20050322" private: - CommandHandler(const CommandHandler &c); - void operator=(const CommandHandler &c); + CommandHandler(const CommandHandler& c); + void operator=(const CommandHandler& c); static void run(void* s); std::string handle(std::string command); - + std::string handleRequest(std::string modifiers, std::string call_id, std::string addr, std::string port, std::string from_tag, std::string to_tag); std::string handleResponse(std::string modifiers, std::string call_id, std::string addr, std::string port, std::string from_tag, std::string to_tag); std::string handleDelete(std::string call_id, std::string from_tag, std::string to_tag); @@ -85,7 +86,7 @@ private: proto::socket control_sock_; std::string local_address_; std::string local_port_; - PortWindow& port_window_; + PortWindow& port_window_; };