X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Frecord_conv.h;h=f8912bf6db2102a6c425e255a32039cb61b8f5cd;hp=b96046e5ded9042313a756c7e3dd30a29ce50b1a;hb=cf813a4e4ab337aeb540e75fd6373c27d6f8cadd;hpb=8f8560e0ab3b370263683d8aea81b839c5927091 diff --git a/include/yaz/record_conv.h b/include/yaz/record_conv.h index b96046e..f8912bf 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-2011 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.7 2006-12-13 11:25:17 adam Exp $ */ /** * \file record_conv.h @@ -38,6 +37,7 @@ #include #include #include +#include YAZ_BEGIN_CDECL @@ -54,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) @@ -79,8 +80,9 @@ YAZ_EXPORT void yaz_record_conv_destroy(yaz_record_conv_t p); */ 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 @@ -95,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 @@ -116,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