-/*
- * 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: record_conv.h,v 1.8 2007-01-03 08:42:14 adam Exp $ */
/**
* \file record_conv.h
#include <yaz/wrbuf.h>
#include <yaz/yconfig.h>
#include <yaz/xmltypes.h>
+#include <yaz/z-opac.h>
YAZ_BEGIN_CDECL
*/
YAZ_EXPORT void yaz_record_conv_destroy(yaz_record_conv_t p);
+#if YAZ_HAVE_XML2
/** configures record conversion
\param p record conversion handle
\param node xmlNode pointer (root element of XML config)
*/
YAZ_EXPORT
int yaz_record_conv_configure(yaz_record_conv_t p, const xmlNode *node);
+#endif
-/** performs record conversion
+/** performs record conversion on record buffer (OCTET aligned)
\param p record conversion handle
\param input_record_buf input record buffer
\param input_record_len length of input record buffer
size_t input_record_len,
WRBUF output_record);
+
+/** performs record conversion on OPAC record
+ \param p record conversion handle
+ \param input_record Z39.50 OPAC record
+ \param output_record resultint record (WRBUF string)
+ \retval 0 success
+ \retval -1 failure
+
+ On failure, use yaz_record_conv_get_error to get error string.
+*/
+YAZ_EXPORT
+int yaz_record_conv_opac_record(yaz_record_conv_t p,
+ Z_OPACRecord *input_record,
+ WRBUF output_record);
+
/** returns error string (for last error)
\param p record conversion handle
\return error string