2 * Copyright (c) 2002-2004, Index Data.
3 * See the file LICENSE for details.
5 * $Id: srw.h,v 1.16 2004-02-14 15:58:42 adam Exp $
19 #define Z_SRW_recordPacking_string 0
20 #define Z_SRW_recordPacking_XML 1
34 #define Z_SRW_query_type_cql 1
35 #define Z_SRW_query_type_xcql 2
36 #define Z_SRW_query_type_pqf 3
44 #define Z_SRW_sort_type_none 1
45 #define Z_SRW_sort_type_sort 2
46 #define Z_SRW_sort_type_xSort 3
61 } Z_SRW_searchRetrieveRequest;
64 int * numberOfRecords;
66 int * resultSetIdleTime;
68 Z_SRW_record *records;
71 Z_SRW_diagnostic *diagnostics;
73 int *nextRecordPosition;
74 } Z_SRW_searchRetrieveResponse;
80 } Z_SRW_explainRequest;
84 Z_SRW_diagnostic *diagnostics;
86 } Z_SRW_explainResponse;
90 int *responsePosition;
103 Z_SRW_scanTerm *terms;
105 Z_SRW_diagnostic *diagnostics;
107 } Z_SRW_scanResponse;
109 #define Z_SRW_searchRetrieve_request 1
110 #define Z_SRW_searchRetrieve_response 2
111 #define Z_SRW_explain_request 3
112 #define Z_SRW_explain_response 4
113 #define Z_SRW_scan_request 5
114 #define Z_SRW_scan_response 6
119 Z_SRW_searchRetrieveRequest *request;
120 Z_SRW_searchRetrieveResponse *response;
121 Z_SRW_explainRequest *explain_request;
122 Z_SRW_explainResponse *explain_response;
123 Z_SRW_scanRequest *scan_request;
124 Z_SRW_scanResponse *scan_response;
129 YAZ_EXPORT int yaz_srw_codec(ODR o, void * pptr,
130 Z_SRW_PDU **handler_data,
131 void *client_data, const char *ns);
132 YAZ_EXPORT Z_SRW_PDU *yaz_srw_get(ODR o, int which);
134 YAZ_EXPORT const char *yaz_diag_srw_str (int code);
136 YAZ_EXPORT int yaz_diag_bib1_to_srw (int bib1_code);
138 YAZ_EXPORT int yaz_diag_srw_to_bib1(int srw_code);
140 YAZ_EXPORT char *yaz_uri_val(const char *path, const char *name, ODR o);
141 YAZ_EXPORT void yaz_uri_val_int(const char *path, const char *name,
143 YAZ_EXPORT int yaz_srw_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu,
144 Z_SOAP **soap_package, ODR decode, char **charset);
145 YAZ_EXPORT int yaz_sru_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu,
146 Z_SOAP **soap_package, ODR decode,
148 Z_SRW_diagnostic **, int *num_diagnostic);
150 YAZ_EXPORT void yaz_add_srw_diagnostic(ODR o, Z_SRW_diagnostic **d,
152 const char *addinfo);
154 YAZ_EXPORT void yaz_mk_std_diagnostic(ODR o, Z_SRW_diagnostic *d,
155 int code, const char *details);