1 /* This file is part of Metaproxy.
2 Copyright (C) 2005-2008 Index Data
4 Metaproxy is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
9 Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef YP2_ORIGIN_HPP
20 #define YP2_ORIGIN_HPP
25 namespace metaproxy_1 {
30 std::ostream& operator<<(std::ostream& os, metaproxy_1::Origin& o);
33 namespace metaproxy_1 {
37 Origin(std::string listen_host = "", unsigned int listen_port = 0);
39 /// get function - right val in assignment
40 std::string listen_host() const;
42 /// set function - left val in assignment
43 std::string & listen_host();
45 /// get function - right val in assignment
46 unsigned int listen_port() const;
48 /// set function - left val in assignment
49 unsigned int & listen_port();
51 /// set client IP info - left val in assignment
52 void set_tcpip_address(std::string addr, unsigned long id);
56 std::operator<<(std::ostream& os, metaproxy_1::Origin& o);
63 std::string m_address; // UNIX+TCPIP
64 unsigned int m_origin_id;
65 std::string m_listen_host;
66 unsigned int m_listen_port;
77 * indent-tabs-mode: nil
78 * c-file-style: "stroustrup"
80 * vim: shiftwidth=4 tabstop=8 expandtab