Use move_way_gdu method from GDU clas. Minor update due to size_t != int
[yazproxy-moved-to-github.git] / include / yazproxy / proxy.h
index dc56028..372d9c0 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: proxy.h,v 1.21 2005-06-21 18:46:04 adam Exp $
+/* $Id: proxy.h,v 1.25 2005-10-13 09:58:52 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;
@@ -61,9 +62,9 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc {
     char *get_cookie(Z_OtherInformation **otherInfo);
     char *get_proxy(Z_OtherInformation **otherInfo);
     void get_charset_and_lang_negotiation(Z_OtherInformation **otherInfo,
-       char **charstes, char **langs, int *selected);
+        char **charstes, char **langs, int *selected);
     Yaz_ProxyClient *get_client(Z_APDU *apdu, const char *cookie,
-                               const char *proxy_host);
+                                const char *proxy_host);
     void srw_get_client(const char *db, const char **backend_db);
     Z_APDU *result_set_optimize(Z_APDU *apdu);
     void releaseClient();    
@@ -96,20 +97,22 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc {
 
     yazpp_1::GDU *m_timeout_gdu;
     enum timeout_mode {
-       timeout_normal,
-       timeout_reduce,
-       timeout_xsl
+        timeout_busy,
+        timeout_normal,
+        timeout_reduce,
+        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);
     Z_Records *create_nonSurrogateDiagnostics(ODR o, int error,
-                                             const char *addinfo);
+                                              const char *addinfo);
 
     Z_APDU *handle_query_validation(Z_APDU *apdu);
     Z_APDU *handle_query_transformation(Z_APDU *apdu);
@@ -168,9 +171,9 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc {
     int send_http_response(int code);
     int send_srw_response(Z_SRW_PDU *srw_pdu);
     int send_srw_explain_response(Z_SRW_diagnostic *diagnostics,
-                                 int num_diagnostics);
+                                  int num_diagnostics);
     int z_to_srw_diag(ODR o, Z_SRW_searchRetrieveResponse *srw_res,
-                     Z_DefaultDiagFormat *ddf);
+                      Z_DefaultDiagFormat *ddf);
     int m_http_keepalive;
     const char *m_http_version;
     yazpp_1::Yaz_cql2rpn m_cql2rpn;
@@ -191,8 +194,8 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc {
     yazpp_1::GDUQueue m_in_queue;
  public:
     Yaz_Proxy(yazpp_1::IPDU_Observable *the_PDU_Observable,
-             yazpp_1::ISocketObservable *the_socket_observable,
-             Yaz_Proxy *parent = 0);
+              yazpp_1::ISocketObservable *the_socket_observable,
+              Yaz_Proxy *parent = 0);
     ~Yaz_Proxy();
 
 
@@ -207,12 +210,12 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc {
     void recv_GDU(Z_GDU *apdu, int len);
     void recv_GDU_reduce(yazpp_1::GDU *gdu);
     void recv_GDU_normal(yazpp_1::GDU *gdu);
-    void recv_GDU_more();
+    void recv_GDU_more(bool normal);
     void handle_incoming_HTTP(Z_HTTP_Request *req);
     void handle_incoming_Z_PDU(Z_APDU *apdu);
     void handle_incoming_Z_PDU_2(Z_APDU *apdu);
     IPDU_Observer *sessionNotify(yazpp_1::IPDU_Observable *the_PDU_Observable,
-                                int fd);
+                                 int fd);
     void failNotify();
     void timeoutNotify();
     void connectNotify();
@@ -239,3 +242,11 @@ class YAZ_EXPORT Yaz_Proxy : public yazpp_1::Z_Assoc {
 };
 
 #endif
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+