2 * Copyright (c) 1998-2005, Index Data.
3 * See the file LICENSE for details.
5 * $Id: ir-assoc.h,v 1.1 2006-03-29 13:14:15 adam Exp $
8 #include <yazpp/z-assoc.h>
9 #include <yazpp/z-query.h>
12 /** Information Retrieval Assocation.
13 This object implements the client - and server role of a generic
16 class YAZ_EXPORT IR_Assoc: public Z_Assoc {
18 /// Create object using the PDU Observer specified
19 IR_Assoc(IPDU_Observable *the_PDU_Observable);
20 /// Destroy assocation and close PDU Observer
22 /// Receive Z39.50 PDU
23 void recv_Z_PDU(Z_APDU *apdu, int len);
24 void recv_GDU(Z_GDU *apdu, int len);
25 /// Set Database Names
26 void set_databaseNames (int num, const char **list);
27 void set_databaseNames(const char *dblist, const char *sep);
28 /// Get Database Names
29 void get_databaseNames (int *num, char ***list);
31 void client(const char *addr);
33 /// Set Preferred Record Syntax
34 void set_preferredRecordSyntax (int value);
35 void set_preferredRecordSyntax (const char *syntax);
36 /// Get Preferred Record Syntax
37 void get_preferredRecordSyntax (int *val);
38 void get_preferredRecordSyntax (const char **syntax);
40 /// Set ElementSetName
41 void set_elementSetName (const char *elementSetName);
42 /// Get ElementSetName
43 void get_elementSetName (const char **elementSetName);
44 void get_elementSetName (Z_ElementSetNames **elementSetNames);
46 int get_lastReceived();
47 void set_lastReceived(int lastReceived);
50 void set_proxy(const char *str);
51 const char *get_proxy();
52 const char *get_host();
54 void set_cookie(const char *str);
55 const char *get_cookie();
58 int send_initRequest(char* pRefId=NULL);
59 int send_searchRequest(Yaz_Z_Query *query, char* pResultSetId = NULL, char* pRefId = NULL);
60 int send_presentRequest(int start, int number, char* pResultSetId = NULL, char* pRefId = NULL);
61 int send_deleteResultSetRequest(char* pResultSetId = 0, char* pRefId = 0);
64 virtual void recv_initRequest(Z_InitRequest *initRequest);
65 virtual void recv_initResponse(Z_InitResponse *initResponse);
66 virtual void recv_searchRequest(Z_SearchRequest *searchRequest);
67 virtual void recv_presentRequest(Z_PresentRequest *presentRequest);
68 virtual void recv_searchResponse(Z_SearchResponse *searchResponse);
69 virtual void recv_presentResponse(Z_PresentResponse *presentResponse);
70 virtual void recv_extendedServicesResponse(Z_ExtendedServicesResponse *extendedServicesResponse);
75 int m_num_databaseNames;
76 char **m_databaseNames;
77 int m_preferredRecordSyntax;
78 Z_ElementSetNames *m_elementSetNames;
86 * indent-tabs-mode: nil
88 * vim: shiftwidth=4 tabstop=8 expandtab