+2001-05-03 Adam Dickmeiss
+ * Added Update service for server.
+
2001-04-25 Adam Dickmeiss
* Server sets referenceId in responses..
/*
- * Copyright (c) 1995-2000, Index Data.
+ * Copyright (c) 1995-2001, Index Data.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation, in whole or in part, for any purpose, is hereby granted,
* Copyright (c) 2000-2001, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-z-server.h,v 1.8 2001-04-11 12:33:42 heikki Exp $
+ * $Id: yaz-z-server.h,v 1.9 2001-05-03 12:39:39 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 recv(Yaz_Z_Server *server, Z_APDU *apdu);
};
+class YAZ_EXPORT Yaz_Facility_Update : public IYaz_Server_Facility {
+ public:
+ virtual void update_service (Z_ExtendedServicesRequest *req,
+ Z_IUUpdate *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);
+};
+
+
class YAZ_EXPORT Yaz_Facility_Retrieval : public IYaz_Server_Facility,
public Yaz_Z_ServerUtility {
public:
-## $Id: Makefile.am,v 1.5 2001-04-05 13:09:44 adam Exp $
+## $Id: Makefile.am,v 1.6 2001-05-03 12:39:39 adam Exp $
INCLUDES=$(YAZINC) -I$(srcdir)/../include
libyaz___la_SOURCES=yaz-socket-manager.cpp yaz-pdu-assoc.cpp \
yaz-z-assoc.cpp yaz-proxy.cpp yaz-z-query.cpp yaz-ir-assoc.cpp \
yaz-z-server.cpp yaz-pdu-assoc-thread.cpp yaz-z-server-sr.cpp \
- yaz-z-server-ill.cpp
+ yaz-z-server-ill.cpp yaz-z-server-update.cpp
libyaz___la_LDFLAGS=-version-info 0:0:0
* See the file LICENSE for details.
*
* $Log: yaz-my-server.cpp,v $
- * Revision 1.4 2001-04-05 13:09:44 adam
+ * Revision 1.5 2001-05-03 12:39:39 adam
+ * Added Update server service.
+ *
+ * Revision 1.4 2001/04/05 13:09:44 adam
* Removed ursula dependancy.
*
* Revision 1.3 2001/04/04 14:02:49 adam
class MyILL : public Yaz_Facility_ILL {
public:
- int ill_init (Z_InitRequest *initRequest,
- Z_InitResponse *initResponse);
void ill_service (Z_ExtendedServicesRequest *req,
Z_ItemOrder *io,
Z_ExtendedServicesResponse *res);
};
+class MyUpdate : public Yaz_Facility_Update {
+public:
+ void update_service (Z_ExtendedServicesRequest *req,
+ Z_IUUpdate *io,
+ Z_ExtendedServicesResponse *res);
+};
+
+
class MyRetrieval : public Yaz_Facility_Retrieval, Yaz_USMARC {
public:
int sr_init (Z_InitRequest *initRequest,
private:
MyRetrieval m_retrieval;
MyILL m_ill;
+ MyUpdate m_update;
#if HAVE_YAZ_URSULA_H
MyUrsula m_ursula;
#endif
int m_no;
};
-int MyILL::ill_init (Z_InitRequest *initRequest,
- Z_InitResponse *initResponse)
-{
- yaz_log (LOG_LOG, "MyILL::ill_init");
- return 1;
-}
-
void MyILL::ill_service (Z_ExtendedServicesRequest *req,
Z_ItemOrder *io,
Z_ExtendedServicesResponse *res)
yaz_log (LOG_LOG, "MyServer::ill_service");
}
+void MyUpdate::update_service (Z_ExtendedServicesRequest *req,
+ Z_IUUpdate *io,
+ Z_ExtendedServicesResponse *res)
+{
+ yaz_log (LOG_LOG, "MyServer::update_service");
+}
+
#if HAVE_YAZ_URSULA_H
void MyUrsula::ursula_service (Z_ExtendedServicesRequest *req,
new_server->timeout(900);
new_server->facility_add(&new_server->m_retrieval, "my sr");
new_server->facility_add(&new_server->m_ill, "my ill");
+ new_server->facility_add(&new_server->m_update, "my update");
#if HAVE_YAZ_URSULA_H
- new_server->facility_add(&new_server->m_ursula, "my ill");
+ new_server->facility_add(&new_server->m_ursula, "my ursula");
#endif
new_server->set_APDU_log(get_APDU_log());
* See the file LICENSE for details.
*
* $Log: yaz-z-server-ill.cpp,v $
- * Revision 1.5 2001-04-25 19:40:18 adam
+ * Revision 1.6 2001-05-03 12:39:39 adam
+ * Added Update server service.
+ *
+ * Revision 1.5 2001/04/25 19:40:18 adam
* Added refernceId handling for other services.
*
* Revision 1.4 2001/04/04 14:02:49 adam
if (ODR_MASK_GET(req, Z_Options_extendedServices))
ODR_MASK_SET(res, Z_Options_extendedServices);
- return ill_init (initRequest, initResponse);
+ return 1;
}
int Yaz_Facility_ILL::recv(Yaz_Z_Server *s, Z_APDU *apdu_request)