/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2011 Index Data.
+ * Copyright (C) 1995-2013 Index Data.
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
char *details;
char *message;
} Z_SRW_diagnostic;
-
+
typedef struct {
#define Z_SRW_query_type_cql 1
Odr_int *numberOfRecords;
char * resultSetId;
Odr_int *resultSetIdleTime;
-
+
Z_SRW_record *records;
int num_records;
Z_SRW_extra_record **extra_records; /* of size num_records */
Z_FacetList *facetList;
+ char *suggestions;
} Z_SRW_searchRetrieveResponse;
typedef struct {
int num_diagnostics;
Z_SRW_extra_record *extra_record;
} Z_SRW_explainResponse;
-
+
typedef struct {
int query_type;
union {
Z_SOAP **soap_package, ODR decode, char **charset);
YAZ_EXPORT int yaz_sru_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu,
- Z_SOAP **soap_package, ODR decode,
+ Z_SOAP **soap_package, ODR decode,
char **charset,
Z_SRW_diagnostic **, int *num_diagnostic);
YAZ_EXPORT void yaz_add_srw_diagnostic(ODR o, Z_SRW_diagnostic **d,
int *num, int code,
const char *addinfo);
-
+
YAZ_EXPORT void yaz_add_sru_update_diagnostic(ODR o, Z_SRW_diagnostic **d,
int *num, int code,
const char *addinfo);
-YAZ_EXPORT void yaz_mk_std_diagnostic(ODR o, Z_SRW_diagnostic *d,
+YAZ_EXPORT void yaz_mk_std_diagnostic(ODR o, Z_SRW_diagnostic *d,
int code, const char *details);
YAZ_EXPORT void yaz_add_srw_diagnostic_uri(ODR o, Z_SRW_diagnostic **d,
const char *message,
const char *details);
-YAZ_EXPORT void yaz_mk_srw_diagnostic(ODR o, Z_SRW_diagnostic *d,
+YAZ_EXPORT void yaz_mk_srw_diagnostic(ODR o, Z_SRW_diagnostic *d,
const char *uri, const char *message,
const char *details);
#define YAZ_XMLNS_SRU_v1_1 "http://www.loc.gov/zing/srw/"
#define YAZ_XMLNS_DIAG_v1_1 "http://www.loc.gov/zing/srw/diagnostic/"
#define YAZ_XMLNS_UPDATE_v0_9 "http://www.loc.gov/zing/srw/update/"
+#define YAZ_XMLNS_SRU_v2_response "http://docs.oasis-open.org/ns/search-ws/sru*esponse"
+#define YAZ_XMLNS_SRU_v1_response "http://www.loc.gov/*"
YAZ_EXPORT
int yaz_srw_check_content_type(Z_HTTP_Response *hres);
/** \brief encode SRU database for HTTP path
\param dst destination buffer (should be at least strlen(db) +2 in size)
\param db source database
-
+
The resulting database (dst) includes a leading /
*/
YAZ_EXPORT