X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Fyaz-my-server.cpp;h=3e7e249451b4c2140bec480ff5e1db90670d05ff;hb=30a319511d4583cbd1b6a0694e097ea1c88ee4c0;hp=a9aeb0ab6fe175cb3234b815ef3eecbd6cd049ac;hpb=ba7a7aa994136b9bb5b775ad84192f96259bd9c0;p=yazpp-moved-to-github.git diff --git a/src/yaz-my-server.cpp b/src/yaz-my-server.cpp index a9aeb0a..3e7e249 100644 --- a/src/yaz-my-server.cpp +++ b/src/yaz-my-server.cpp @@ -3,7 +3,13 @@ * See the file LICENSE for details. * * $Log: yaz-my-server.cpp,v $ - * Revision 1.3 2001-04-04 14:02:49 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 * URSULA / Z-ruth service. * * Revision 1.2 2001/03/29 15:14:26 adam @@ -71,13 +77,19 @@ 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, @@ -94,12 +106,14 @@ public: Z_Records *records); }; +#if HAVE_YAZ_URSULA_H class MyUrsula : public Yaz_Facility_Ursula { public: void ursula_service (Z_ExtendedServicesRequest *req, Z_UrsPDU *u, Z_ExtendedServicesResponse *res); }; +#endif class MyServer : public Yaz_Z_Server { public: @@ -114,17 +128,13 @@ public: 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) @@ -132,7 +142,15 @@ void MyILL::ill_service (Z_ExtendedServicesRequest *req, 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, Z_UrsPDU *u, Z_ExtendedServicesResponse *res) @@ -159,6 +177,7 @@ void MyUrsula::ursula_service (Z_ExtendedServicesRequest *req, break; } } +#endif int MyRetrieval::sr_init (Z_InitRequest *initRequest, Z_InitResponse *initResponse) @@ -220,7 +239,10 @@ IYaz_PDU_Observer *MyServer::sessionNotify( 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_ursula, "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 ursula"); +#endif new_server->set_APDU_log(get_APDU_log());