From: Marc Cromme Date: Tue, 26 Sep 2006 13:04:07 +0000 (+0000) Subject: added header file X-Git-Tag: METAPROXY.1.0.7~48 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=dec223c79181a3a899c1239f3aa6c6461e177462;p=metaproxy-moved-to-github.git added header file --- diff --git a/src/Makefile.am b/src/Makefile.am index 0223e76..c3488de 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.55 2006-09-26 13:02:50 marc Exp $ +## $Id: Makefile.am,v 1.56 2006-09-26 13:04:07 marc Exp $ MAINTAINERCLEANFILES = Makefile.in config.in config.hpp @@ -36,6 +36,7 @@ libmetaproxy_la_SOURCES = \ router.hpp router_chain.hpp router_chain.cpp \ router_flexml.hpp router_flexml.cpp \ session.cpp session.hpp \ + sru_util.cpp sru_util.hpp \ thread_pool_observer.cpp thread_pool_observer.hpp \ util.cpp util.hpp \ xmlutil.cpp xmlutil.hpp diff --git a/src/origin.hpp b/src/origin.hpp new file mode 100644 index 0000000..00df465 --- /dev/null +++ b/src/origin.hpp @@ -0,0 +1,63 @@ +/* $Id: origin.hpp,v 1.1 2006-09-26 13:04:07 marc Exp $ + Copyright (c) 2005-2006, Index Data. + + See the LICENSE file for details + */ + +#ifndef YP2_ORIGIN_HPP +#define YP2_ORIGIN_HPP + +#include +#include + +namespace metaproxy_1 { + class Origin; +} + +namespace std { + std::ostream& operator<<(std::ostream& os, metaproxy_1::Origin& o); +} + +namespace metaproxy_1 { + + class Origin { + public: + Origin(std::string server_host = "", unsigned int server_port = 0); + + /// get function - right val in assignment + std::string server_host() const; + + /// get function - right val in assignment + unsigned int server_port() const; + + /// set client IP info - left val in assignment + void set_tcpip_address(std::string addr, unsigned long id); + + private: + friend std::ostream& + std::operator<<(std::ostream& os, metaproxy_1::Origin& o); + + enum origin_t { + API, + UNIX, + TCPIP + } m_type; + std::string m_address; // UNIX+TCPIP + unsigned long m_origin_id; + std::string m_server_host; + unsigned int m_server_port; + }; + +} + + + +#endif +/* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * c-file-style: "stroustrup" + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */