2 * Copyright (c) 2002-2004, Index Data.
3 * See the file LICENSE for details.
5 * $Id: srw.h,v 1.18 2005-01-08 01:20:18 adam Exp $
9 * \brief Header for SRW/SRU
23 #define Z_SRW_recordPacking_string 0
24 #define Z_SRW_recordPacking_XML 1
38 #define Z_SRW_query_type_cql 1
39 #define Z_SRW_query_type_xcql 2
40 #define Z_SRW_query_type_pqf 3
48 #define Z_SRW_sort_type_none 1
49 #define Z_SRW_sort_type_sort 2
50 #define Z_SRW_sort_type_xSort 3
65 } Z_SRW_searchRetrieveRequest;
68 int * numberOfRecords;
70 int * resultSetIdleTime;
72 Z_SRW_record *records;
75 Z_SRW_diagnostic *diagnostics;
77 int *nextRecordPosition;
78 } Z_SRW_searchRetrieveResponse;
84 } Z_SRW_explainRequest;
88 Z_SRW_diagnostic *diagnostics;
90 } Z_SRW_explainResponse;
99 int *responsePosition;
107 int *numberOfRecords;
112 Z_SRW_scanTerm *terms;
114 Z_SRW_diagnostic *diagnostics;
116 } Z_SRW_scanResponse;
118 #define Z_SRW_searchRetrieve_request 1
119 #define Z_SRW_searchRetrieve_response 2
120 #define Z_SRW_explain_request 3
121 #define Z_SRW_explain_response 4
122 #define Z_SRW_scan_request 5
123 #define Z_SRW_scan_response 6
128 Z_SRW_searchRetrieveRequest *request;
129 Z_SRW_searchRetrieveResponse *response;
130 Z_SRW_explainRequest *explain_request;
131 Z_SRW_explainResponse *explain_response;
132 Z_SRW_scanRequest *scan_request;
133 Z_SRW_scanResponse *scan_response;
138 YAZ_EXPORT int yaz_srw_codec(ODR o, void * pptr,
139 Z_SRW_PDU **handler_data,
140 void *client_data, const char *ns);
141 YAZ_EXPORT Z_SRW_PDU *yaz_srw_get(ODR o, int which);
143 YAZ_EXPORT const char *yaz_diag_srw_str (int code);
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);