Fixes for SRW/U responses
[yazproxy-moved-to-github.git] / include / yazproxy / proxy.h
index 7473539..69aeb45 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: proxy.h,v 1.23 2005-08-15 12:54:02 adam Exp $
+/* $Id: proxy.h,v 1.26 2005-11-30 11:48:19 adam Exp $
    Copyright (c) 1998-2005, Index Data.
 
 This file is part of the yaz-proxy.
@@ -29,6 +29,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include <yaz++/cql2rpn.h>
 #include <yaz/cql.h>
 #include <yaz++/gdu.h>
+#include <yaz++/gduqueue.h>
 #include <yazproxy/bw.h>
 
 class Yaz_Proxy;
@@ -58,6 +59,7 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc {
  private:
     char *m_peername;
     int m_ref_count;
+    bool m_main_ptr_dec;
     char *get_cookie(Z_OtherInformation **otherInfo);
     char *get_proxy(Z_OtherInformation **otherInfo);
     void get_charset_and_lang_negotiation(Z_OtherInformation **otherInfo,
@@ -102,10 +104,11 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc {
         timeout_xsl
     } m_timeout_mode;
 
+    int m_connect_max;
+    int m_search_max;
     Yaz_bw m_bw_stat;
     int m_pdu_max;
     Yaz_bw m_pdu_stat;
-    Z_GDU *m_bw_hold_PDU;
     int m_max_record_retrieve;
     void handle_max_record_retrieve(Z_APDU *apdu);
     void display_diagrecs(Z_DiagRec **pp, int num);
@@ -168,6 +171,8 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc {
     int send_to_srw_client_ok(int hits, Z_Records *records, int start);
     int send_http_response(int code);
     int send_srw_response(Z_SRW_PDU *srw_pdu);
+    int send_srw_search_response(Z_SRW_diagnostic *diagnostics,
+                                 int num_diagnostics);
     int send_srw_explain_response(Z_SRW_diagnostic *diagnostics,
                                   int num_diagnostics);
     int z_to_srw_diag(ODR o, Z_SRW_searchRetrieveResponse *srw_res,
@@ -198,7 +203,7 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc {
 
 
     void inc_ref();
-    bool dec_ref();
+    bool dec_ref(bool main_ptr);
 
 
     int handle_authentication(Z_APDU *apdu);
@@ -236,6 +241,7 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc {
     int get_log_mask() { return m_log_mask; };
     int handle_init_response_for_invalid_session(Z_APDU *apdu);
     void set_debug_mode(int mode);
+    void send_response_fail_client(const char *addr);
     Msg_Thread *m_my_thread;
 };