1 /* $Id: origin.hpp,v 1.4 2007-05-09 21:23:09 adam Exp $
2 Copyright (c) 2005-2007, Index Data.
4 This file is part of Metaproxy.
6 Metaproxy is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
11 Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 You should have received a copy of the GNU General Public License
17 along with Metaproxy; see the file LICENSE. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #ifndef YP2_ORIGIN_HPP
23 #define YP2_ORIGIN_HPP
28 namespace metaproxy_1 {
33 std::ostream& operator<<(std::ostream& os, metaproxy_1::Origin& o);
36 namespace metaproxy_1 {
40 Origin(std::string listen_host = "", unsigned int listen_port = 0);
42 /// get function - right val in assignment
43 std::string listen_host() const;
45 /// set function - left val in assignment
46 std::string & listen_host();
48 /// get function - right val in assignment
49 unsigned int listen_port() const;
51 /// set function - left val in assignment
52 unsigned int & listen_port();
54 /// set client IP info - left val in assignment
55 void set_tcpip_address(std::string addr, unsigned long id);
59 std::operator<<(std::ostream& os, metaproxy_1::Origin& o);
66 std::string m_address; // UNIX+TCPIP
67 unsigned int m_origin_id;
68 std::string m_listen_host;
69 unsigned int m_listen_port;
80 * indent-tabs-mode: nil
81 * c-file-style: "stroustrup"
83 * vim: shiftwidth=4 tabstop=8 expandtab