X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Frecord_conv.h;h=14bc6d9aede91ffc73265f7f73ce048328c80b63;hp=4cd00e0e2feb0444f027ec71f10f0ecc16140b82;hb=379504a233e3e2cc85bca1e7b6d864f1395aec7c;hpb=964580242e2e0b2e570f652afa58bfb90ad0bb5e diff --git a/include/yaz/record_conv.h b/include/yaz/record_conv.h index 4cd00e0..14bc6d9 100644 --- a/include/yaz/record_conv.h +++ b/include/yaz/record_conv.h @@ -1,5 +1,5 @@ -/* - * Copyright (c) 1995-2006, Index Data +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2009 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: record_conv.h,v 1.5 2006-10-09 21:02:41 adam Exp $ */ /** * \file record_conv.h @@ -37,6 +36,8 @@ #include #include #include +#include +#include YAZ_BEGIN_CDECL @@ -53,6 +54,7 @@ YAZ_EXPORT yaz_record_conv_t yaz_record_conv_create(void); */ 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) @@ -62,26 +64,25 @@ YAZ_EXPORT void yaz_record_conv_destroy(yaz_record_conv_t p); On failure, use yaz_record_conv_get_error to get error string. \verbatim - + - + \endverbatim \verbatim - + - + \endverbatim - - */ YAZ_EXPORT -int yaz_record_conv_configure(yaz_record_conv_t p, const void *node); +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 @@ -96,6 +97,21 @@ int yaz_record_conv_record(yaz_record_conv_t p, const char *input_record_buf, 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 @@ -117,6 +133,7 @@ YAZ_END_CDECL /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab