* (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: proto.h,v 1.24 2006-10-13 11:30:37 adam Exp $ */
+/* $Id: proto.h,v 1.25 2006-11-14 08:37:38 adam Exp $ */
/**
* \file proto.h
YAZ_EXPORT
Z_DiagRec *zget_DiagRec(ODR o, int error, const char *addinfo);
+/** \brief get element set name from RecordComposition
+ \param comp record composition
+ \returns element set name or NULL if no element set name was given
+*/
+YAZ_EXPORT
+const char *yaz_get_esn(Z_RecordComposition *comp);
+
+/** \brief set element set name in RecordComposition struct
+ \param comp_p record composition ptr
+ \param esn element set name string
+ \param nmem memory for result composition
+*/
+YAZ_EXPORT
+void yaz_set_esn(Z_RecordComposition **comp_p, const char *esn, NMEM nmem);
+
+
YAZ_END_CDECL
#include <yaz/prt-ext.h>
## This file is part of the YAZ toolkit.
## Copyright (C) 1994-2006, Index Data, All rights reserved.
-## $Id: Makefile.am,v 1.43 2006-11-02 08:06:03 adam Exp $
+## $Id: Makefile.am,v 1.44 2006-11-14 08:37:38 adam Exp $
YAZ_VERSION_INFO=2:1:0
xmlquery.c \
mime.c mime.h \
nfa.c nfaxml.c \
- record_conv.c retrieval.c
+ record_conv.c retrieval.c elementset.c
libyaz_la_LDFLAGS=-version-info $(YAZ_VERSION_INFO)
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: seshigh.c,v 1.103 2006-10-27 11:22:09 adam Exp $
+ * $Id: seshigh.c,v 1.104 2006-11-14 08:37:38 adam Exp $
*/
/**
* \file seshigh.c
return 1;
}
-static const char *get_esn(Z_RecordComposition *comp)
-{
- if (comp && comp->which == Z_RecordComp_complex)
- {
- if (comp->u.complex->generic
- && comp->u.complex->generic->elementSpec
- && (comp->u.complex->generic->elementSpec->which ==
- Z_ElementSpec_elementSetName))
- return comp->u.complex->generic->elementSpec->u.elementSetName;
- }
- else if (comp && comp->which == Z_RecordComp_simple &&
- comp->u.simple->which == Z_ElementSetNames_generic)
- return comp->u.simple->u.generic;
- return 0;
-}
-
-static void set_esn(Z_RecordComposition **comp_p, const char *esn, NMEM nmem)
-{
- Z_RecordComposition *comp = nmem_malloc(nmem, sizeof(*comp));
-
- comp->which = Z_RecordComp_simple;
- comp->u.simple = nmem_malloc(nmem, sizeof(*comp->u.simple));
- comp->u.simple->which = Z_ElementSetNames_generic;
- comp->u.simple->u.generic = nmem_strdup(nmem, esn);
- *comp_p = comp;
-}
-
static int retrieve_fetch(association *assoc, bend_fetch_rr *rr)
{
#if YAZ_HAVE_XML2
if (assoc->server)
{
int r;
- const char *input_schema = get_esn(rr->comp);
+ const char *input_schema = yaz_get_esn(rr->comp);
Odr_oid *input_syntax_raw = rr->request_format_raw;
const char *backend_schema = 0;
}
if (backend_schema)
{
- set_esn(&rr->comp, backend_schema, rr->stream->mem);
+ yaz_set_esn(&rr->comp, backend_schema, rr->stream->mem);
}
if (backend_syntax)
{
assoc->init->implementation_name,
odr_prepend(assoc->encode, "GFS", resp->implementationName));
- version = odr_strdup(assoc->encode, "$Revision: 1.103 $");
+ version = odr_strdup(assoc->encode, "$Revision: 1.104 $");
if (strlen(version) > 10) /* check for unexpanded CVS strings */
version[strlen(version)-2] = '\0';
resp->implementationVersion = odr_prepend(assoc->encode,
# Copyright (C) 1994-2006, Index Data ApS
# All rights reserved.
-# $Id: makefile,v 1.119 2006-10-29 18:33:54 adam Exp $
+# $Id: makefile,v 1.120 2006-11-14 08:37:39 adam Exp $
#
# Programmed by
# Heikki Levanto & Adam Dickmeiss
$(OBJDIR)\cqltransform.obj \
$(OBJDIR)\cqlutil.obj \
$(OBJDIR)\cqlstrer.obj \
- $(OBJDIR)\xcqlutil.obj
+ $(OBJDIR)\xcqlutil.obj \
+ $(OBJDIR)\elementset.obj
Z3950_OBJS= \
$(OBJDIR)\z-date.obj\