X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=include%2Fyaz-proxy.h;h=3d051c9e6221a84c4b107b8c792b609659c77c21;hb=2e14b1af67a2044e73d024bc29445035910a2dd4;hp=edb2c9a492df8c044451cfe89f6cbc9a92149b5b;hpb=bf377ba45c8c1cbcf843fdecc6d5c68fda6bad18;p=yazpp-moved-to-github.git diff --git a/include/yaz-proxy.h b/include/yaz-proxy.h index edb2c9a..3d051c9 100644 --- a/include/yaz-proxy.h +++ b/include/yaz-proxy.h @@ -3,45 +3,55 @@ * See the file LICENSE for details. * Sebastian Hammer, Adam Dickmeiss * - * $Log: yaz-proxy.h,v $ - * Revision 1.1 1999-01-28 09:41:07 adam - * Initial revision - * - * + * $Id: yaz-proxy.h,v 1.8 1999-11-10 10:02:34 adam Exp $ */ -#include +#include +#include class Yaz_Proxy; /// Private class -class Yaz_ProxyClient : public Yaz_IR_Assoc { +class YAZ_EXPORT Yaz_ProxyClient : public Yaz_Z_Assoc { friend Yaz_Proxy; Yaz_ProxyClient(IYaz_PDU_Observable *the_PDU_Observable); + ~Yaz_ProxyClient(); void recv_Z_PDU(Z_APDU *apdu); IYaz_PDU_Observer* clone(IYaz_PDU_Observable *the_PDU_Observable); Yaz_Proxy *m_server; void failNotify(); -}; - -/// Private class -class Yaz_ProxyMap { - friend Yaz_Proxy; - char *m_databaseName; /* from database name */ - char *m_ZURL; /* to this address */ - Yaz_ProxyMap *m_next; + void timeoutNotify(); + char m_cookie[32]; + Yaz_ProxyClient *m_next; + Yaz_ProxyClient **m_prev; + int m_init_flag; + Yaz_Z_Query *m_last_query; + int m_last_resultCount; + int m_sr_transform; }; /// Information Retrieval Proxy Server. -class Yaz_Proxy : public Yaz_IR_Assoc { +class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc { public: Yaz_Proxy(IYaz_PDU_Observable *the_PDU_Observable); ~Yaz_Proxy(); void recv_Z_PDU(Z_APDU *apdu); IYaz_PDU_Observer* clone(IYaz_PDU_Observable *the_PDU_Observable); void failNotify(); + void timeoutNotify(); + void proxyTarget(const char *target); + private: + char *get_cookie(Z_OtherInformation **otherInfo); + char *get_proxy(Z_OtherInformation **otherInfo); + Yaz_ProxyClient *get_client(Z_APDU *apdu); + Z_APDU *result_set_optimize(Z_APDU *apdu); + Yaz_ProxyClient *m_client; IYaz_PDU_Observable *m_PDU_Observable; - private: - Yaz_ProxyMap *m_maps; + Yaz_ProxyClient *m_clientPool; + Yaz_Proxy *m_parent; + int m_seqno; + int m_keepalive; + char *m_proxyTarget; }; +