Fix: proxy doesn't cache searches/result sets when errors occur.
[yazpp-moved-to-github.git] / include / yaz++ / yaz-proxy.h
index e4f3e5e..f05f2fe 100644 (file)
@@ -2,11 +2,12 @@
  * Copyright (c) 1998-2000, Index Data.
  * See the file LICENSE for details.
  * 
- * $Id: yaz-proxy.h,v 1.3 2001-03-26 14:43:49 adam Exp $
+ * $Id: yaz-proxy.h,v 1.5 2002-01-14 12:01:27 adam Exp $
  */
 
 #include <yaz++/yaz-z-assoc.h>
 #include <yaz++/yaz-z-query.h>
+#include <yaz++/yaz-z-databases.h>
 
 class Yaz_Proxy;
 
@@ -28,6 +29,8 @@ class YAZ_EXPORT Yaz_ProxyClient : public Yaz_Z_Assoc {
     Yaz_ProxyClient **m_prev;
     int m_init_flag;
     Yaz_Z_Query *m_last_query;
+    Yaz_Z_Databases m_last_databases;
+    int m_last_ok;
     int m_last_resultCount;
     int m_sr_transform;
     int m_seqno;
@@ -51,7 +54,9 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc {
     int m_max_clients;
     int m_keepalive;
     char *m_proxyTarget;
+    char *m_proxy_authentication;
     long m_seed;
+    char *m_optimize;
  public:
     Yaz_Proxy(IYaz_PDU_Observable *the_PDU_Observable);
     ~Yaz_Proxy();
@@ -61,8 +66,10 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc {
     void failNotify();
     void timeoutNotify();
     void connectNotify();
-    void set_proxyTarget(const char *target);
-    char *get_proxyTarget() { return m_proxyTarget; };
+    const char *option(const char *name, const char *value);
+    void set_proxy_target(const char *target);
+    void set_proxy_authentication (const char *auth);
+    char *get_proxy_target() { return m_proxyTarget; };
     void set_max_clients(int m) { m_max_clients = m; };
 };