X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fmetaproxy%2Forigin.hpp;h=603f378fea33f7f882c7be8f37a0f7753bbb3337;hb=b6ea100d3fb9f64ca9fd88606c77ba1d715224ea;hp=955476f28bd5fef958345a498c9447423805a507;hpb=cdb9d2053fa54a0a2d7da1514164de3bbe52edb3;p=metaproxy-moved-to-github.git diff --git a/include/metaproxy/origin.hpp b/include/metaproxy/origin.hpp index 955476f..603f378 100644 --- a/include/metaproxy/origin.hpp +++ b/include/metaproxy/origin.hpp @@ -27,27 +27,15 @@ namespace metaproxy_1 { } namespace std { - std::ostream& operator<<(std::ostream& os, metaproxy_1::Origin& o); + std::ostream& operator<<(std::ostream& os, const metaproxy_1::Origin& o); } namespace metaproxy_1 { class Origin { public: - Origin(std::string listen_host = "", unsigned int listen_port = 0); + Origin(); - /// get function - right val in assignment - std::string listen_host() const; - - /// set function - left val in assignment - std::string & listen_host(); - - /// get function - right val in assignment - unsigned int listen_port() const; - - /// set function - left val in assignment - unsigned int & listen_port(); - /// set client IP info - left val in assignment void set_tcpip_address(std::string addr, unsigned long id); @@ -63,25 +51,15 @@ namespace metaproxy_1 { void set_custom_session(const std::string &s); private: friend std::ostream& - std::operator<<(std::ostream& os, metaproxy_1::Origin& o); + std::operator<<(std::ostream& os, const metaproxy_1::Origin& o); - enum origin_t { - API, - UNIX, - TCPIP - } m_type; - std::string m_address; // UNIX+TCPIP + std::string m_address; unsigned int m_origin_id; - std::string m_listen_host; - unsigned int m_listen_port; int m_max_sockets; std::string m_custom_session; }; - } - - #endif /* * Local variables: