2 * Copyright (c) 1998-2000, Index Data.
3 * See the file LICENSE for details.
5 * $Id: yaz-proxy.h,v 1.6 2002-09-10 11:58:13 adam Exp $
8 #include <yaz++/yaz-z-assoc.h>
9 #include <yaz++/yaz-z-query.h>
10 #include <yaz++/yaz-z-databases.h>
15 class YAZ_EXPORT Yaz_ProxyClient : public Yaz_Z_Assoc {
17 Yaz_ProxyClient(IYaz_PDU_Observable *the_PDU_Observable);
19 void recv_Z_PDU(Z_APDU *apdu);
20 IYaz_PDU_Observer* sessionNotify
21 (IYaz_PDU_Observable *the_PDU_Observable, int fd);
28 Yaz_ProxyClient *m_next;
29 Yaz_ProxyClient **m_prev;
31 Yaz_Z_Query *m_last_query;
32 Yaz_Z_Databases m_last_databases;
34 int m_last_resultCount;
39 Z_APDU *m_initResponse;
42 /// Information Retrieval Proxy Server.
43 class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc {
45 char *get_cookie(Z_OtherInformation **otherInfo);
46 char *get_proxy(Z_OtherInformation **otherInfo);
47 Yaz_ProxyClient *get_client(Z_APDU *apdu);
48 Z_APDU *result_set_optimize(Z_APDU *apdu);
51 Yaz_ProxyClient *m_client;
52 IYaz_PDU_Observable *m_PDU_Observable;
53 Yaz_ProxyClient *m_clientPool;
59 char *m_proxy_authentication;
63 Yaz_Proxy(IYaz_PDU_Observable *the_PDU_Observable);
65 void recv_Z_PDU(Z_APDU *apdu);
66 IYaz_PDU_Observer* sessionNotify
67 (IYaz_PDU_Observable *the_PDU_Observable, int fd);
71 const char *option(const char *name, const char *value);
72 void set_proxy_target(const char *target);
73 void set_proxy_authentication (const char *auth);
74 char *get_proxy_target() { return m_proxyTarget; };
75 void set_max_clients(int m) { m_max_clients = m; };