1 /* This file is part of the yazpp toolkit.
2 * Copyright (C) 1998-2011 Index Data and Mike Taylor
3 * See the file LICENSE for details.
10 #include <yazpp/z-server.h>
12 using namespace yazpp_1;
14 int Yaz_Facility_ILL::init(Z_Server *s, Z_InitRequest *initRequest,
15 Z_InitResponse *initResponse)
17 Z_Options *req = initRequest->options;
18 Z_Options *res = initResponse->options;
20 if (ODR_MASK_GET(req, Z_Options_extendedServices))
21 ODR_MASK_SET(res, Z_Options_extendedServices);
25 int Yaz_Facility_ILL::recv(Z_Server *s, Z_APDU *apdu_request)
27 Z_APDU *apdu_response;
29 if (apdu_request->which != Z_APDU_extendedServicesRequest)
31 Z_ExtendedServicesRequest *req = apdu_request->u.extendedServicesRequest;
32 if (!req->taskSpecificParameters || req->taskSpecificParameters->which !=
35 yaz_log (YLOG_LOG, "got ill p=%p", this);
36 apdu_response = s->create_Z_PDU(Z_APDU_extendedServicesResponse);
37 ill_service(req, req->taskSpecificParameters->u.itemOrder,
38 apdu_response->u.extendedServicesResponse);
39 s->transfer_referenceId(apdu_request, apdu_response);
40 s->send_Z_PDU(apdu_response, 0);
46 * c-file-style: "Stroustrup"
47 * indent-tabs-mode: nil
49 * vim: shiftwidth=4 tabstop=8 expandtab