1 /* $Id: origin.cpp,v 1.6 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 //#include "config.hpp"
27 namespace mp = metaproxy_1;
29 mp::Origin::Origin(std::string listen_host,
30 unsigned int listen_port)
31 : m_type(API), m_address(""), m_origin_id(0),
32 m_listen_host(listen_host), m_listen_port(listen_port)
36 std::string mp::Origin::listen_host() const
41 std::string & mp::Origin::listen_host()
46 unsigned int mp::Origin::listen_port() const
51 unsigned int & mp::Origin::listen_port()
58 void mp::Origin::set_tcpip_address(std::string addr, unsigned long s)
65 std::ostream& std::operator<<(std::ostream& os, mp::Origin& o)
67 if (o.m_address != "")
71 os << ":" << o.m_origin_id;
78 * indent-tabs-mode: nil
79 * c-file-style: "stroustrup"
81 * vim: shiftwidth=4 tabstop=8 expandtab