X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2Fsrw.h;h=8c9398302623d19af318c6542fa79f17011335c1;hb=97554b23cfc19394bb77f7f3c4bf0c8abf89297b;hp=c031b247dc3ef105aa68d6c8be297f1054d5ec64;hpb=037037e14faa1f992ed3574817086eabc469c9c4;p=yaz-moved-to-github.git diff --git a/include/yaz/srw.h b/include/yaz/srw.h index c031b24..8c93983 100644 --- a/include/yaz/srw.h +++ b/include/yaz/srw.h @@ -1,8 +1,8 @@ /* - * Copyright (c) 2002-2003, Index Data. + * Copyright (c) 2002-2004, Index Data. * See the file LICENSE for details. * - * $Id: srw.h,v 1.10 2003-12-29 14:54:33 adam Exp $ + * $Id: srw.h,v 1.16 2004-02-14 15:58:42 adam Exp $ */ #ifndef YAZ_SRW_H @@ -24,8 +24,9 @@ typedef struct { } Z_SRW_record; typedef struct { - int *code; + char *uri; char *details; + char *message; } Z_SRW_diagnostic; typedef struct { @@ -75,6 +76,7 @@ typedef struct { typedef struct { char *recordPacking; char *database; + char *stylesheet; } Z_SRW_explainRequest; typedef struct { @@ -138,10 +140,19 @@ YAZ_EXPORT int yaz_diag_srw_to_bib1(int srw_code); YAZ_EXPORT char *yaz_uri_val(const char *path, const char *name, ODR o); YAZ_EXPORT void yaz_uri_val_int(const char *path, const char *name, ODR o, int **intp); -YAZ_EXPORT int yaz_check_for_srw(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu, - char **soap_ns, ODR decode); -YAZ_EXPORT int yaz_check_for_sru(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu, - char **soap_ns, ODR decode); +YAZ_EXPORT int yaz_srw_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu, + 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, + 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_mk_std_diagnostic(ODR o, Z_SRW_diagnostic *d, + int code, const char *details); YAZ_END_CDECL #endif