From d040a9ea56b37ca9f625a40a2d56a056f8447d07 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 23 Jan 2007 19:25:21 +0000 Subject: [PATCH] Extended ZOOM result set options with two options that may be read by a client: resultSetStatus and presentStatus with values as specified for the ASN.1. See: http://www.loc.gov/z3950/agency/markup/04.html#Search-status --- NEWS | 5 +++++ src/zoom-c.c | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index ca1359f..70c10a1 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +Extended ZOOM result set options with two options that may be read by +a client: resultSetStatus and presentStatus with values as specified for +the ASN.1. See: +http://www.loc.gov/z3950/agency/markup/04.html#Search-status + Implemented alternative Item Order package for ZOOM. If option "doc" is set, that is treated as an ItemOrder with itemRequest being an XML document external. The value of "doc" is the content. diff --git a/src/zoom-c.c b/src/zoom-c.c index 4440884..5308769 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: zoom-c.c,v 1.109 2007-01-22 10:35:07 adam Exp $ + * $Id: zoom-c.c,v 1.110 2007-01-23 19:25:21 adam Exp $ */ /** * \file zoom-c.c @@ -1250,7 +1250,7 @@ static zoom_ret ZOOM_connection_send_init(ZOOM_connection c) odr_prepend(c->odr_out, "ZOOM-C", ireq->implementationName)); - version = odr_strdup(c->odr_out, "$Revision: 1.109 $"); + version = odr_strdup(c->odr_out, "$Revision: 1.110 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; ireq->implementationVersion = @@ -2392,6 +2392,16 @@ static void handle_search_response(ZOOM_connection c, Z_SearchResponse *sr) resultset = c->tasks->u.search.resultset; + if (sr->resultSetStatus) + { + ZOOM_options_set_int(resultset->options, "resultSetStatus", + *sr->resultSetStatus); + } + if (sr->presentStatus) + { + ZOOM_options_set_int(resultset->options, "presentStatus", + *sr->presentStatus); + } handle_searchResult(c, resultset, sr->additionalSearchInfo); resultset->size = *sr->resultCount; -- 1.7.10.4