2 * Copyright (c) 2002-2004, Index Data.
3 * See the file LICENSE for details.
5 * $Id: srw.h,v 1.17 2004-10-15 00:18:59 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;
94 int *responsePosition;
102 int *numberOfRecords;
107 Z_SRW_scanTerm *terms;
109 Z_SRW_diagnostic *diagnostics;
111 } Z_SRW_scanResponse;
113 #define Z_SRW_searchRetrieve_request 1
114 #define Z_SRW_searchRetrieve_response 2
115 #define Z_SRW_explain_request 3
116 #define Z_SRW_explain_response 4
117 #define Z_SRW_scan_request 5
118 #define Z_SRW_scan_response 6
123 Z_SRW_searchRetrieveRequest *request;
124 Z_SRW_searchRetrieveResponse *response;
125 Z_SRW_explainRequest *explain_request;
126 Z_SRW_explainResponse *explain_response;
127 Z_SRW_scanRequest *scan_request;
128 Z_SRW_scanResponse *scan_response;
133 YAZ_EXPORT int yaz_srw_codec(ODR o, void * pptr,
134 Z_SRW_PDU **handler_data,
135 void *client_data, const char *ns);
136 YAZ_EXPORT Z_SRW_PDU *yaz_srw_get(ODR o, int which);
138 YAZ_EXPORT const char *yaz_diag_srw_str (int code);
140 YAZ_EXPORT int yaz_diag_bib1_to_srw (int bib1_code);
142 YAZ_EXPORT int yaz_diag_srw_to_bib1(int srw_code);
144 YAZ_EXPORT char *yaz_uri_val(const char *path, const char *name, ODR o);
145 YAZ_EXPORT void yaz_uri_val_int(const char *path, const char *name,
147 YAZ_EXPORT int yaz_srw_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu,
148 Z_SOAP **soap_package, ODR decode, char **charset);
149 YAZ_EXPORT int yaz_sru_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu,
150 Z_SOAP **soap_package, ODR decode,
152 Z_SRW_diagnostic **, int *num_diagnostic);
154 YAZ_EXPORT void yaz_add_srw_diagnostic(ODR o, Z_SRW_diagnostic **d,
156 const char *addinfo);
158 YAZ_EXPORT void yaz_mk_std_diagnostic(ODR o, Z_SRW_diagnostic *d,
159 int code, const char *details);