* Copyright (c) 2000-2001, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-z-server.h,v 1.4 2001-04-02 13:39:34 adam Exp $
+ * $Id: yaz-z-server.h,v 1.5 2001-04-03 14:37:19 adam Exp $
*/
#include <yaz++/yaz-z-assoc.h>
class YAZ_EXPORT Yaz_Facility_ILL : public IYaz_Server_Facility {
public:
+ virtual int ill_init (Z_InitRequest *initRequest,
+ Z_InitResponse *initResponse) = 0;
+
+ virtual void ill_service (Z_ExtendedServicesRequest *req,
+ Z_ItemOrder *io, Z_ExtendedServicesResponse *res) = 0;
+
int init(Yaz_Z_Server *server,
Z_InitRequest *initRequest,
Z_InitResponse *initResponse);
int recv(Yaz_Z_Server *server, Z_APDU *apdu);
- virtual int ill_init (Z_InitRequest *initRequest,
- Z_InitResponse *initResponse) = 0;
void create_databaseRecord (Z_NamePlusRecord *rec,
const char *dbname, int format,
class YAZ_EXPORT Yaz_Facility_Retrieval : public IYaz_Server_Facility {
public:
- int init(Yaz_Z_Server *server,
- Z_InitRequest *initRequest,
- Z_InitResponse *initResponse);
- int recv(Yaz_Z_Server *server, Z_APDU *apdu);
virtual int sr_init (Z_InitRequest *initRequest,
Z_InitResponse *initResponse) = 0;
Z_RecordComposition *comp,
Z_NamePlusRecord *namePlusRecord,
Z_Records *diagnostics) = 0;
+ int init(Yaz_Z_Server *server,
+ Z_InitRequest *initRequest,
+ Z_InitResponse *initResponse);
+ int recv(Yaz_Z_Server *server, Z_APDU *apdu);
+
void create_databaseRecord (Z_NamePlusRecord *rec,
const char *dbname, int format,
const void *buf, int len);
Z_Records *create_nonSurrogateDiagnostics (int error,
const char *addinfo);
-
-
virtual ODR odr_encode();
-
private:
Z_Records *pack_records (const char *resultSetName,
int start, int num,
* See the file LICENSE for details.
*
* $Log: yaz-z-server-ill.cpp,v $
- * Revision 1.2 2001-03-29 15:14:26 adam
+ * Revision 1.3 2001-04-03 14:37:19 adam
+ * More work ILL-service.
+ *
+ * Revision 1.2 2001/03/29 15:14:26 adam
* Minor updates.
*
* Revision 1.1 2001/03/27 14:47:45 adam
m_odr = s->odr_encode();
if (apdu_request->which != Z_APDU_extendedServicesRequest)
return 0;
-
- yaz_log (LOG_LOG, "got extendedSericesRequest p=%p", this);
+ Z_ExtendedServicesRequest *req = apdu_request->u.extendedServicesRequest;
+ if (!req->taskSpecificParameters || req->taskSpecificParameters->which !=
+ Z_External_itemOrder)
+ return 0;
+ yaz_log (LOG_LOG, "got ill p=%p", this);
apdu_response = s->create_Z_PDU(Z_APDU_extendedServicesResponse);
+ ill_service(req, req->taskSpecificParameters->u.itemOrder,
+ apdu_response->u.extendedServicesResponse);
s->send_Z_PDU(apdu_response);
return 1;
}