2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: srw.h,v 1.22 2005-06-25 15:46:03 adam Exp $
9 * \brief Header for SRW/SRU
17 #include <yaz/diagsrw.h>
24 #define Z_SRW_recordPacking_string 0
25 #define Z_SRW_recordPacking_XML 1
39 #define Z_SRW_query_type_cql 1
40 #define Z_SRW_query_type_xcql 2
41 #define Z_SRW_query_type_pqf 3
49 #define Z_SRW_sort_type_none 1
50 #define Z_SRW_sort_type_sort 2
51 #define Z_SRW_sort_type_xSort 3
66 } Z_SRW_searchRetrieveRequest;
69 int * numberOfRecords;
71 int * resultSetIdleTime;
73 Z_SRW_record *records;
76 Z_SRW_diagnostic *diagnostics;
78 int *nextRecordPosition;
79 } Z_SRW_searchRetrieveResponse;
85 } Z_SRW_explainRequest;
89 Z_SRW_diagnostic *diagnostics;
91 } Z_SRW_explainResponse;
100 int *responsePosition;
108 int *numberOfRecords;
114 Z_SRW_scanTerm *terms;
116 Z_SRW_diagnostic *diagnostics;
118 } Z_SRW_scanResponse;
120 #define Z_SRW_searchRetrieve_request 1
121 #define Z_SRW_searchRetrieve_response 2
122 #define Z_SRW_explain_request 3
123 #define Z_SRW_explain_response 4
124 #define Z_SRW_scan_request 5
125 #define Z_SRW_scan_response 6
130 Z_SRW_searchRetrieveRequest *request;
131 Z_SRW_searchRetrieveResponse *response;
132 Z_SRW_explainRequest *explain_request;
133 Z_SRW_explainResponse *explain_response;
134 Z_SRW_scanRequest *scan_request;
135 Z_SRW_scanResponse *scan_response;
140 YAZ_EXPORT int yaz_srw_codec(ODR o, void * pptr,
141 Z_SRW_PDU **handler_data,
142 void *client_data, const char *ns);
143 YAZ_EXPORT Z_SRW_PDU *yaz_srw_get(ODR o, int which);
145 YAZ_EXPORT int yaz_diag_bib1_to_srw (int bib1_code);
147 YAZ_EXPORT int yaz_diag_srw_to_bib1(int srw_code);
149 YAZ_EXPORT char *yaz_uri_val(const char *path, const char *name, ODR o);
150 YAZ_EXPORT void yaz_uri_val_int(const char *path, const char *name,
152 YAZ_EXPORT int yaz_srw_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu,
153 Z_SOAP **soap_package, ODR decode, char **charset);
154 YAZ_EXPORT int yaz_sru_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu,
155 Z_SOAP **soap_package, ODR decode,
157 Z_SRW_diagnostic **, int *num_diagnostic);
159 YAZ_EXPORT void yaz_add_srw_diagnostic(ODR o, Z_SRW_diagnostic **d,
161 const char *addinfo);
163 YAZ_EXPORT void yaz_mk_std_diagnostic(ODR o, Z_SRW_diagnostic *d,
164 int code, const char *details);
171 * indent-tabs-mode: nil
173 * vim: shiftwidth=4 tabstop=8 expandtab