Added object Yaz_Z_Assoc. Much more functional client.
[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  * $Log: yaz-proxy.h,v $
7  * Revision 1.3  1999-04-09 11:47:23  adam
8  * Added object Yaz_Z_Assoc. Much more functional client.
9  *
10  * Revision 1.2  1999/02/02 14:01:15  adam
11  * First WIN32 port of YAZ++.
12  *
13  * Revision 1.1.1.1  1999/01/28 09:41:07  adam
14  * First implementation of YAZ++.
15  *
16  *
17  */
18
19 #include <yaz-z-assoc.h>
20
21 class Yaz_Proxy;
22
23 /// Private class
24 class YAZ_EXPORT Yaz_ProxyClient : public Yaz_Z_Assoc {
25     friend Yaz_Proxy;
26     Yaz_ProxyClient(IYaz_PDU_Observable *the_PDU_Observable);
27     void recv_Z_PDU(Z_APDU *apdu);
28     IYaz_PDU_Observer* clone(IYaz_PDU_Observable *the_PDU_Observable);
29     Yaz_Proxy *m_server;
30     void failNotify();
31 };
32
33 /// Private class
34 class YAZ_EXPORT Yaz_ProxyMap {
35     friend Yaz_Proxy;
36     char *m_databaseName;      /* from database name */
37     char *m_ZURL;              /* to this address */
38     Yaz_ProxyMap *m_next;
39 };
40
41 /// Information Retrieval Proxy Server.
42 class YAZ_EXPORT Yaz_Proxy : public Yaz_Z_Assoc {
43  public:
44     Yaz_Proxy(IYaz_PDU_Observable *the_PDU_Observable);
45     ~Yaz_Proxy();
46     void recv_Z_PDU(Z_APDU *apdu);
47     IYaz_PDU_Observer* clone(IYaz_PDU_Observable *the_PDU_Observable);
48     void failNotify();
49     Yaz_ProxyClient *m_client;
50     IYaz_PDU_Observable *m_PDU_Observable;
51  private:
52     Yaz_ProxyMap *m_maps;
53 };