From: Adam Dickmeiss Date: Wed, 20 Jun 2007 12:55:29 +0000 (+0000) Subject: Allow waitAction to be specified for ZOOM C based for Extended Services. X-Git-Tag: YAZ.3.0.10~41 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=8a87b507b01dd8641c0dff2d9e346f54b298c473;p=yaz-moved-to-github.git Allow waitAction to be specified for ZOOM C based for Extended Services. --- diff --git a/NEWS b/NEWS index 184744e..5223355 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +Allow waitAction to be specified for ZOOM C based for Extended Services. + --- 3.0.6 2007/06/06 Fixed bug #1157: yaz-client does not read .yazclientrc from current diff --git a/doc/zoom.xml b/doc/zoom.xml index 80ae27d..14785d4 100644 --- a/doc/zoom.xml +++ b/doc/zoom.xml @@ -20,7 +20,7 @@ ZOOM_options_set_int(opt, name, value) ZOOM_connection_scan1 (ZOOM_connection c, ZOOM_query startterm) ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn) --> - + ZOOM &zoom; is an acronym for 'Z39.50 Object-Orientation Model' and is @@ -124,7 +124,7 @@ ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn) key=value sequences, each of which represents an option to be set into the connection structure before the - protocol-level connection is forged and the initialisation + protocol-level connection is forged and the initialization handshake takes place. This facility can be used to provide authentication credentials, as in host-strings such as: user=admin,password=halfAm4n,tcp:localhost:8017/db @@ -1049,10 +1049,19 @@ ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn) create + waitAction + + Wait action for package. Possible values: + wait, waitIfPossible, + dontWait or dontReturnPackage. + + waitIfPossible + + targetReference Target Reference. This is part of the response as returned - by the server. Read it after a succesful operation. + by the server. Read it after a successful operation. none diff --git a/src/zoom-c.c b/src/zoom-c.c index f1ecd6d..1c071d6 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.133 2007-06-04 09:18:09 adam Exp $ + * $Id: zoom-c.c,v 1.134 2007-06-20 12:55:29 adam Exp $ */ /** * \file zoom-c.c @@ -1341,7 +1341,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.133 $"); + version = odr_strdup(c->odr_out, "$Revision: 1.134 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; ireq->implementationVersion = @@ -2892,8 +2892,6 @@ static Z_APDU *create_es_package(ZOOM_package p, const Odr_oid *oid) Z_APDU *apdu = zget_APDU(p->odr_out, Z_APDU_extendedServicesRequest); Z_ExtendedServicesRequest *req = apdu->u.extendedServicesRequest; - *req->function = Z_ExtendedServicesRequest_create; - str = ZOOM_options_get(p->options, "package-name"); if (str && *str) req->packageName = odr_strdup(p->odr_out, str); @@ -2908,11 +2906,24 @@ static Z_APDU *create_es_package(ZOOM_package p, const Odr_oid *oid) if (str) { if (!strcmp (str, "create")) - *req->function = 1; + *req->function = Z_ExtendedServicesRequest_create; if (!strcmp (str, "delete")) - *req->function = 2; + *req->function = Z_ExtendedServicesRequest_delete; if (!strcmp (str, "modify")) - *req->function = 3; + *req->function = Z_ExtendedServicesRequest_modify; + } + + str = ZOOM_options_get(p->options, "waitAction"); + if (str) + { + if (!strcmp (str, "wait")) + *req->waitAction = Z_ExtendedServicesRequest_wait; + if (!strcmp (str, "waitIfPossible")) + *req->waitAction = Z_ExtendedServicesRequest_waitIfPossible; + if (!strcmp (str, "dontWait")) + *req->waitAction = Z_ExtendedServicesRequest_dontWait; + if (!strcmp (str, "dontReturnPackage")) + *req->waitAction = Z_ExtendedServicesRequest_dontReturnPackage; } return apdu; }