X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2Fsrw.h;h=680ee12d32b77a004e7537d11520fb8cd0a68f3e;hb=f58a188f6db8f4b458d62cb2c345443a5253f9c1;hp=a81581ba6931c262ff23c2cc47ddde73671d7a4c;hpb=3f36e04a60f21ed11fbb7bdb32923cffcb519f2f;p=yaz-moved-to-github.git diff --git a/include/yaz/srw.h b/include/yaz/srw.h index a81581b..680ee12 100644 --- a/include/yaz/srw.h +++ b/include/yaz/srw.h @@ -1,5 +1,5 @@ -/* - * Copyright (c) 1995-2007, Index Data +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2008 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: @@ -24,7 +24,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: srw.h,v 1.35 2007-08-23 14:23:23 adam Exp $ */ /** * \file srw.h @@ -169,6 +168,13 @@ typedef struct { char *stylesheet; } Z_SRW_updateRequest; +typedef struct Z_SRW_extra_arg Z_SRW_extra_arg; +struct Z_SRW_extra_arg { + char *name; + char *value; + Z_SRW_extra_arg *next; +}; + typedef struct { char *operationStatus; char *recordId; @@ -206,7 +212,7 @@ typedef struct { char *srw_version; char *username; /* From HTTP header or request */ char *password; /* From HTTP header or request */ - char *extra_args; /* For SRU GET/POST only */ + Z_SRW_extra_arg *extra_args; /* only used for SRU GET/POST */ } Z_SRW_PDU; YAZ_EXPORT int yaz_srw_codec(ODR o, void * pptr, @@ -269,6 +275,10 @@ YAZ_EXPORT int yaz_sru_soap_encode(Z_HTTP_Request *hreq, Z_SRW_PDU *srw_pdu, 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); + + #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/" @@ -277,6 +287,16 @@ YAZ_EXPORT char *yaz_negotiate_sru_version(char *input_ver); YAZ_EXPORT int yaz_srw_check_content_type(Z_HTTP_Response *hres); +YAZ_EXPORT +int sru_decode_surrogate_diagnostics(const char *buf, size_t len, + Z_SRW_diagnostic **diag, + int *num, ODR odr); + +YAZ_EXPORT +void yaz_mk_sru_surrogate(ODR o, Z_SRW_record *record, int pos, + int code, const char *details); + + YAZ_END_CDECL #endif