X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fsrw.h;h=2c7cc0109efcad9861aee961f71f2380f9bc73aa;hp=7af24219dcbda93fde98b3c7f2f9c66538d7071e;hb=a6b61b9f8b6576e8159a4e7e6aee88bba7e5d07d;hpb=47ceb84b5ac99c72bcaef53be93494541e9a68c0 diff --git a/include/yaz/srw.h b/include/yaz/srw.h index 7af2421..2c7cc01 100644 --- a/include/yaz/srw.h +++ b/include/yaz/srw.h @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data. + * Copyright (C) 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: @@ -37,7 +37,7 @@ #include #include #include -#include "facet.h" +#include YAZ_BEGIN_CDECL @@ -55,12 +55,6 @@ typedef struct { #define Z_SRW_recordPacking_XML 1 #define Z_SRW_recordPacking_URL 2 -#if 0 - int packing; /* recordPacking in SRU 2.0 */ -#define Z_SRW_packed 0 -#define Z_SRW_unpacked 1 -#endif - char *recordData_buf; int recordData_len; Odr_int *recordPosition; @@ -218,7 +212,12 @@ typedef struct { char *srw_version; char *username; /* From HTTP header or request */ char *password; /* From HTTP header or request */ - Z_SRW_extra_arg *extra_args; /* extraRequestData SRU GET/POST */ + + /* 1. SRU extraRequestData x-name=value for requests encoding */ + /* 2. SRU extraRequestData x-name=value for requests decoding */ + /* 3. SRU echoed data for response encoding */ + Z_SRW_extra_arg *extra_args; + char *extraResponseData_buf; int extraResponseData_len; } Z_SRW_PDU; @@ -231,6 +230,7 @@ YAZ_EXPORT int yaz_ucp_codec(ODR o, void * pptr, void *client_data, const char *ns); YAZ_EXPORT Z_SRW_PDU *yaz_srw_get_core_v_2_0(ODR o); YAZ_EXPORT Z_SRW_PDU *yaz_srw_get_pdu(ODR o, int which, const char *version); +YAZ_EXPORT Z_SRW_PDU *yaz_srw_get_pdu_e(ODR o, int which, Z_SRW_PDU *req); YAZ_EXPORT Z_SRW_PDU *yaz_srw_get(ODR o, int which); YAZ_EXPORT Z_SRW_recordVersion *yaz_srw_get_record_versions(ODR o, int num); YAZ_EXPORT Z_SRW_extra_record *yaz_srw_get_extra_record(ODR o); @@ -244,13 +244,6 @@ YAZ_EXPORT int yaz_diag_srw_to_bib1(int srw_code); YAZ_EXPORT const char *yaz_srw_pack_to_str(int pack); YAZ_EXPORT int yaz_srw_str_to_pack(const char *str); -/** \brief deprecated */ -YAZ_EXPORT char *yaz_uri_val(const char *path, const char *name, ODR o); - -/** \brief deprecated */ -YAZ_EXPORT void yaz_uri_val_int(const char *path, const char *name, - ODR o, Odr_int **intp); - YAZ_EXPORT int yaz_uri_to_array(const char *path, ODR o, char ***name, char ***val); YAZ_EXPORT void yaz_array_to_uri(char **path, ODR o, @@ -327,8 +320,6 @@ YAZ_EXPORT int yaz_sru_soap_encode(Z_HTTP_Request *hreq, Z_SRW_PDU *srw_pdu, YAZ_EXPORT int yaz_solr_encode_request(Z_HTTP_Request *hreq, Z_SRW_PDU *srw_pdu, ODR encode, const char *charset); -YAZ_EXPORT char *yaz_negotiate_sru_version(char *input_ver); - YAZ_EXPORT void yaz_encode_sru_extra(Z_SRW_PDU *sr, ODR odr, const char *extra_args); @@ -336,6 +327,7 @@ void yaz_encode_sru_extra(Z_SRW_PDU *sr, ODR odr, const char *extra_args); #define YAZ_XMLNS_SRU_v1_0 "http://www.loc.gov/zing/srw/v1.0/" #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_DIAG_v2 "http://docs.oasis-open.org/ns/search-ws/diagnostic" #define YAZ_XMLNS_UPDATE_v0_9 "http://www.loc.gov/zing/srw/update/" #define YAZ_XMLNS_SRU_v2_mask "http://docs.oasis-open.org/ns/search-ws/*" #define YAZ_XMLNS_SRU_v1_response "http://www.loc.gov/*"