* Copyright (c) 2000-2001, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-z-server.h,v 1.9 2001-05-03 12:39:39 adam Exp $
+ * $Id: yaz-z-server.h,v 1.10 2001-05-17 14:18:03 adam Exp $
*/
#include <yaz++/yaz-z-assoc.h>
Z_IUUpdate *io,
Z_ExtendedServicesResponse *res) = 0;
+ virtual void update_service0 (Z_ExtendedServicesRequest *req,
+ Z_IU0Update *io,
+ Z_ExtendedServicesResponse *res) = 0;
+
int init(Yaz_Z_Server *server,
Z_InitRequest *initRequest,
Z_InitResponse *initResponse);
* See the file LICENSE for details.
*
* $Log: yaz-my-server.cpp,v $
- * Revision 1.5 2001-05-03 12:39:39 adam
+ * Revision 1.6 2001-05-17 14:18:03 adam
+ * New handler for old version item update for server:
+ * void update_service0 (Z_ExtendedServicesRequest *req,
+ * Z_IU0Update *io, Z_ExtendedServicesResponse *res)
+ *
+ * Revision 1.5 2001/05/03 12:39:39 adam
* Added Update server service.
*
* Revision 1.4 2001/04/05 13:09:44 adam
void update_service (Z_ExtendedServicesRequest *req,
Z_IUUpdate *io,
Z_ExtendedServicesResponse *res);
+ void update_service0 (Z_ExtendedServicesRequest *req,
+ Z_IU0Update *io,
+ Z_ExtendedServicesResponse *res);
};
Z_IUUpdate *io,
Z_ExtendedServicesResponse *res)
{
- yaz_log (LOG_LOG, "MyServer::update_service");
+ yaz_log (LOG_LOG, "MyServer::update_service (v1.1)");
+}
+
+void MyUpdate::update_service0 (Z_ExtendedServicesRequest *req,
+ Z_IU0Update *io,
+ Z_ExtendedServicesResponse *res)
+{
+ yaz_log (LOG_LOG, "MyServer::update_service (v1.0)");
}
* See the file LICENSE for details.
*
* $Log: yaz-z-server-update.cpp,v $
- * Revision 1.1 2001-05-03 12:42:57 adam
+ * Revision 1.2 2001-05-17 14:18:03 adam
+ * New handler for old version item update for server:
+ * void update_service0 (Z_ExtendedServicesRequest *req,
+ * Z_IU0Update *io, Z_ExtendedServicesResponse *res)
+ *
+ * Revision 1.1 2001/05/03 12:42:57 adam
* Added update server service.
*
*/
if (apdu_request->which != Z_APDU_extendedServicesRequest)
return 0;
Z_ExtendedServicesRequest *req = apdu_request->u.extendedServicesRequest;
- if (!req->taskSpecificParameters || req->taskSpecificParameters->which !=
+ if (req->taskSpecificParameters && req->taskSpecificParameters->which ==
Z_External_update)
- return 0;
- yaz_log (LOG_LOG, "got update p=%p", this);
- apdu_response = s->create_Z_PDU(Z_APDU_extendedServicesResponse);
- update_service(req, req->taskSpecificParameters->u.update,
- apdu_response->u.extendedServicesResponse);
- s->transfer_referenceId(apdu_request, apdu_response);
- s->send_Z_PDU(apdu_response);
+ {
+ yaz_log (LOG_LOG, "got update p=%p", this);
+ apdu_response = s->create_Z_PDU(Z_APDU_extendedServicesResponse);
+ update_service(req, req->taskSpecificParameters->u.update,
+ apdu_response->u.extendedServicesResponse);
+ s->transfer_referenceId(apdu_request, apdu_response);
+ s->send_Z_PDU(apdu_response);
+ }
+ else if (req->taskSpecificParameters &&
+ req->taskSpecificParameters->which == Z_External_update0)
+ {
+ yaz_log (LOG_LOG, "got update p=%p", this);
+ apdu_response = s->create_Z_PDU(Z_APDU_extendedServicesResponse);
+ update_service0 (req, req->taskSpecificParameters->u.update0,
+ apdu_response->u.extendedServicesResponse);
+ s->transfer_referenceId(apdu_request, apdu_response);
+ s->send_Z_PDU(apdu_response);
+ }
return 1;
}