Better reporting of statistics. Handling of ODR decode improved
[yazpp-moved-to-github.git] / include / yaz++ / proxy.h
index 047f086..78ecf4c 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (c) 1998-2003, Index Data.
  * See the file LICENSE for details.
  * 
- * $Id: proxy.h,v 1.16 2003-10-13 19:16:28 adam Exp $
+ * $Id: proxy.h,v 1.20 2003-10-20 18:31:43 adam Exp $
  */
 
 #include <yaz++/z-assoc.h>
@@ -18,6 +18,11 @@ class Yaz_Proxy;
 
 #define MAX_ZURL_PLEX 10
 
+#define PROXY_LOG_APDU_CLIENT 1
+#define PROXY_LOG_APDU_SERVER 2
+#define PROXY_LOG_REQ_CLIENT 4
+#define PROXY_LOG_REQ_SERVER 8
+
 struct Yaz_RecordCache_Entry;
 
 class YAZ_EXPORT Yaz_ProxyConfig {
@@ -38,6 +43,8 @@ public:
                      int *keepalive_limit_bw,
                      int *keepalive_limit_pdu,
                      int *pre_init);
+    
+    void get_generic_info(int *log_mask, int *max_clients);
 
     void get_target_info(const char *name, const char **url,
                         int *limit_bw, int *limit_pdu, int *limit_req,
@@ -52,6 +59,7 @@ public:
 private:
     void operator=(const Yaz_ProxyConfig &conf);
 #if HAVE_XML2
+    int mycmp(const char *hay, const char *item, size_t len);
     xmlDocPtr m_docPtr;
     xmlNodePtr m_proxyPtr;
     void return_target_info(xmlNodePtr ptr, const char **url,
@@ -169,6 +177,7 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc {
     Yaz_Proxy *m_parent;
     int m_seqno;
     int m_max_clients;
+    int m_log_mask;
     int m_keepalive_limit_bw;
     int m_keepalive_limit_pdu;
     int m_client_idletime;
@@ -225,9 +234,10 @@ class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc {
     void set_target_idletime (int t) { m_target_idletime = (t > 1) ? t : 600; };
     int get_target_idletime () { return m_target_idletime; }
     int set_config(const char *name);
-    int reconfig() { m_reconfig_flag = 1; }
+    void reconfig() { m_reconfig_flag = 1; }
     int send_to_client(Z_APDU *apdu);
     void server(const char *addr);
     void pre_init();
+    int get_log_mask() { return m_log_mask; };
 };