2 * Copyright (c) 1998-1999, Index Data.
3 * See the file LICENSE for details.
4 * Sebastian Hammer, Adam Dickmeiss
6 * $Log: yaz-ir-assoc.h,v $
7 * Revision 1.1 1999-01-28 09:41:07 adam
15 #include <yaz-pdu-observer.h>
17 /** Information Retrieval Assocation.
18 This object implements the client - and server role of a generic
21 class Yaz_IR_Assoc : public IYaz_PDU_Observer {
23 /// Create object using the PDU Observer specified
24 Yaz_IR_Assoc(IYaz_PDU_Observable *the_PDU_Observable);
25 /// Destroy assocation and close PDU Observer
26 virtual ~Yaz_IR_Assoc();
28 void recv_PDU(const char *buf, int len);
29 /// Connect notification
31 /// Failure notification
33 /// Begin Z39.50 client role
34 void client(const char *addr);
35 /// Begin Z39.50 server role
36 void server(const char *addr);
37 /// Decode Z39.50 PDU.
38 Z_APDU *decode_Z_PDU(const char *buf, int len);
39 /// Encode Z39.50 PDU.
40 int encode_Z_PDU(Z_APDU *apdu, char **buf, int *len);
42 int send_Z_PDU(Z_APDU *apdu);
43 /// Receive Z39.50 PDU
44 virtual void recv_Z_PDU (Z_APDU *apdu) = 0;
45 /// Create Z39.50 with reasonable defaults
46 Z_APDU *create_Z_PDU(int type);
48 IYaz_PDU_Observable *m_PDU_Observable;