HTTP X-Forwarded-For/Z39.50 Client-IP support
[metaproxy-moved-to-github.git] / include / metaproxy / origin.hpp
index eb6ac08..d129e71 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2012 Index Data
+   Copyright (C) Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -31,11 +31,11 @@ namespace std {
 }
 
 namespace metaproxy_1 {
-    
+
     class Origin {
     public:
         Origin();
-        
+
         /// set client IP info - left val in assignment
         void set_tcpip_address(std::string addr, unsigned long id);
 
@@ -44,19 +44,20 @@ namespace metaproxy_1 {
 
         /// set max sockets (for outgoing connections to a given target)
         int get_max_sockets();
-        
+
         /// get tcpip address
         std::string get_address();
 
         void set_custom_session(const std::string &s);
     private:
-        friend std::ostream& 
+        friend std::ostream&
         std::operator<<(std::ostream& os, const metaproxy_1::Origin& o);
-        
+
         std::string m_address;
         unsigned int m_origin_id;
         int m_max_sockets;
         std::string m_custom_session;
+        std::string get_forward_address() const;
     };
 }