Implemented various stuff for client and proxy. Updated calls
[yazpp-moved-to-github.git] / include / yaz-proxy.h
1 /*
2  * Copyright (c) 1998-1999, Index Data.
3  * See the file LICENSE for details.
4  * Sebastian Hammer, Adam Dickmeiss
5  * 
6  * $Id: yaz-proxy.h,v 1.4 1999-04-20 10:30:05 adam Exp $
7  */
8
9 #include <yaz-z-assoc.h>
10
11 class Yaz_Proxy;
12
13 /// Private class
14 class YAZ_EXPORT Yaz_ProxyClient : public Yaz_Z_Assoc {
15     friend Yaz_Proxy;
16     Yaz_ProxyClient(IYaz_PDU_Observable *the_PDU_Observable);
17     void recv_Z_PDU(Z_APDU *apdu);
18     IYaz_PDU_Observer* clone(IYaz_PDU_Observable *the_PDU_Observable);
19     Yaz_Proxy *m_server;
20     void failNotify();
21     char *m_cookie;
22     Yaz_ProxyClient *m_next;
23 };
24
25 /// Information Retrieval Proxy Server.
26 class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc {
27  public:
28     Yaz_Proxy(IYaz_PDU_Observable *the_PDU_Observable);
29     ~Yaz_Proxy();
30     void recv_Z_PDU(Z_APDU *apdu);
31     IYaz_PDU_Observer* clone(IYaz_PDU_Observable *the_PDU_Observable);
32     void failNotify();
33  private:
34     char *get_cookie(Z_OtherInformation **otherInfo);
35     char *get_proxy(Z_OtherInformation **otherInfo);
36     
37     Yaz_ProxyClient *m_client;
38     IYaz_PDU_Observable *m_PDU_Observable;
39 };