-/*
- * 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:
* (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
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;
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,
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/"
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