From 316df82985a4207a7d52e7d88567bf26d5c2c7c8 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 8 Sep 2000 10:23:42 +0000 Subject: [PATCH] Added skeleton of yaz-z-server. --- include/yaz-ir-assoc.h | 5 ++--- include/yaz-pdu-assoc.h | 5 ++--- include/yaz-pdu-observer.h | 5 ++--- include/yaz-proxy.h | 5 ++--- include/yaz-query.h | 5 ++--- include/yaz-socket-manager.h | 5 ++--- include/yaz-socket-observer.h | 5 ++--- include/yaz-z-assoc.h | 5 ++--- include/yaz-z-query.h | 5 ++--- include/yaz-z-server.h | 16 ++++++++++++++++ src/Makefile.in | 4 ++-- src/yaz-client.cpp | 6 ++++-- src/yaz-pdu-assoc.cpp | 15 +++++++++------ src/yaz-proxy-main.cpp | 8 +++++--- src/yaz-proxy.cpp | 6 ++++-- src/yaz-server.cpp | 14 ++++++++------ src/yaz-socket-manager.cpp | 8 +++++--- src/yaz-z-assoc.cpp | 8 +++++--- src/yaz-z-query.cpp | 8 +++++--- src/yaz-z-server.cpp | 25 +++++++++++++++++++++++++ 20 files changed, 106 insertions(+), 57 deletions(-) create mode 100644 include/yaz-z-server.h create mode 100644 src/yaz-z-server.cpp diff --git a/include/yaz-ir-assoc.h b/include/yaz-ir-assoc.h index 7d07142..bd1ea66 100644 --- a/include/yaz-ir-assoc.h +++ b/include/yaz-ir-assoc.h @@ -1,9 +1,8 @@ /* - * Copyright (c) 1998-1999, Index Data. + * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * - * $Id: yaz-ir-assoc.h,v 1.10 2000-09-06 14:23:45 adam Exp $ + * $Id: yaz-ir-assoc.h,v 1.11 2000-09-08 10:23:42 adam Exp $ */ #include diff --git a/include/yaz-pdu-assoc.h b/include/yaz-pdu-assoc.h index 205c7ed..3ff7ff5 100644 --- a/include/yaz-pdu-assoc.h +++ b/include/yaz-pdu-assoc.h @@ -1,9 +1,8 @@ /* - * Copyright (c) 1998-1999, Index Data. + * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * - * $Id: yaz-pdu-assoc.h,v 1.7 1999-12-06 13:52:45 adam Exp $ + * $Id: yaz-pdu-assoc.h,v 1.8 2000-09-08 10:23:42 adam Exp $ */ #include diff --git a/include/yaz-pdu-observer.h b/include/yaz-pdu-observer.h index fdedc51..65e6a15 100644 --- a/include/yaz-pdu-observer.h +++ b/include/yaz-pdu-observer.h @@ -1,9 +1,8 @@ /* - * Copyright (c) 1998-1999, Index Data. + * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * - * $Id: yaz-pdu-observer.h,v 1.7 1999-12-06 13:52:45 adam Exp $ + * $Id: yaz-pdu-observer.h,v 1.8 2000-09-08 10:23:42 adam Exp $ */ #ifndef YAZ_PDU_OBSERVER_H diff --git a/include/yaz-proxy.h b/include/yaz-proxy.h index c19f6e5..062c926 100644 --- a/include/yaz-proxy.h +++ b/include/yaz-proxy.h @@ -1,9 +1,8 @@ /* - * Copyright (c) 1998-1999, Index Data. + * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * - * $Id: yaz-proxy.h,v 1.12 2000-08-31 14:41:55 adam Exp $ + * $Id: yaz-proxy.h,v 1.13 2000-09-08 10:23:42 adam Exp $ */ #include diff --git a/include/yaz-query.h b/include/yaz-query.h index 59e566d..6a71e0a 100644 --- a/include/yaz-query.h +++ b/include/yaz-query.h @@ -1,9 +1,8 @@ /* - * Copyright (c) 1998-1999, Index Data. + * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * - * $Id: yaz-query.h,v 1.2 1999-04-20 10:30:05 adam Exp $ + * $Id: yaz-query.h,v 1.3 2000-09-08 10:23:42 adam Exp $ */ diff --git a/include/yaz-socket-manager.h b/include/yaz-socket-manager.h index a43daec..d544426 100644 --- a/include/yaz-socket-manager.h +++ b/include/yaz-socket-manager.h @@ -1,9 +1,8 @@ /* - * Copyright (c) 1998-1999, Index Data. + * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * - * $Id: yaz-socket-manager.h,v 1.5 1999-12-06 13:52:45 adam Exp $ + * $Id: yaz-socket-manager.h,v 1.6 2000-09-08 10:23:42 adam Exp $ */ #include diff --git a/include/yaz-socket-observer.h b/include/yaz-socket-observer.h index 8ffe601..f001ac8 100644 --- a/include/yaz-socket-observer.h +++ b/include/yaz-socket-observer.h @@ -1,9 +1,8 @@ /* - * Copyright (c) 1998-1999, Index Data. + * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * - * $Id: yaz-socket-observer.h,v 1.4 1999-04-20 10:30:05 adam Exp $ + * $Id: yaz-socket-observer.h,v 1.5 2000-09-08 10:23:42 adam Exp $ */ #ifndef YAZ_SOCKET_OBSERVER_H diff --git a/include/yaz-z-assoc.h b/include/yaz-z-assoc.h index fdca6b4..c3694f1 100644 --- a/include/yaz-z-assoc.h +++ b/include/yaz-z-assoc.h @@ -1,9 +1,8 @@ /* - * Copyright (c) 1998-1999, Index Data. + * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * - * $Id: yaz-z-assoc.h,v 1.7 2000-08-07 14:19:59 adam Exp $ + * $Id: yaz-z-assoc.h,v 1.8 2000-09-08 10:23:42 adam Exp $ */ #include diff --git a/include/yaz-z-query.h b/include/yaz-z-query.h index f9c428d..3903c1c 100644 --- a/include/yaz-z-query.h +++ b/include/yaz-z-query.h @@ -1,9 +1,8 @@ /* - * Copyright (c) 1998-1999, Index Data. + * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * - * $Id: yaz-z-query.h,v 1.6 1999-12-06 13:52:45 adam Exp $ + * $Id: yaz-z-query.h,v 1.7 2000-09-08 10:23:42 adam Exp $ */ #include diff --git a/include/yaz-z-server.h b/include/yaz-z-server.h new file mode 100644 index 0000000..3a5cf01 --- /dev/null +++ b/include/yaz-z-server.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2000, Index Data. + * See the file LICENSE for details. + * + * $Id: yaz-z-server.h,v 1.1 2000-09-08 10:23:42 adam Exp $ + */ + +#include + +class YAZ_EXPORT Yaz_Z_Server : public Yaz_Z_Assoc { +public: + Yaz_Z_Server(IYaz_PDU_Observable *the_PDU_Observable); + virtual void recv_Z_PDU(Z_APDU *apdu); +private: + int m_no; +}; diff --git a/src/Makefile.in b/src/Makefile.in index 8e18d44..ec057e0 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,7 +1,7 @@ # Copyright (C) 1999, Index Data ApS # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile.in,v 1.6 1999-12-06 13:52:45 adam Exp $ +# $Id: Makefile.in,v 1.7 2000-09-08 10:23:42 adam Exp $ SHELL=/bin/sh @@ -24,7 +24,7 @@ PROG3=yaz-proxy PROGO3=yaz-proxy-main.o LIB=libyaz++.lib PO=yaz-socket-manager.o yaz-pdu-assoc.o yaz-z-assoc.o yaz-proxy.o \ - yaz-z-query.o yaz-ir-assoc.o + yaz-z-query.o yaz-ir-assoc.o yaz-z-server.o .SUFFIXES: .cpp diff --git a/src/yaz-client.cpp b/src/yaz-client.cpp index e5eff81..d934e67 100644 --- a/src/yaz-client.cpp +++ b/src/yaz-client.cpp @@ -1,10 +1,12 @@ /* * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * * $Log: yaz-client.cpp,v $ - * Revision 1.13 2000-09-06 14:23:45 adam + * Revision 1.14 2000-09-08 10:23:42 adam + * Added skeleton of yaz-z-server. + * + * Revision 1.13 2000/09/06 14:23:45 adam * WIN32 updates. * * Revision 1.12 2000/09/04 08:59:16 adam diff --git a/src/yaz-pdu-assoc.cpp b/src/yaz-pdu-assoc.cpp index 289a52b..ae8bfaf 100644 --- a/src/yaz-pdu-assoc.cpp +++ b/src/yaz-pdu-assoc.cpp @@ -1,10 +1,12 @@ /* - * Copyright (c) 1998-1999, Index Data. + * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * * $Log: yaz-pdu-assoc.cpp,v $ - * Revision 1.12 2000-09-06 14:23:45 adam + * Revision 1.13 2000-09-08 10:23:42 adam + * Added skeleton of yaz-z-server. + * + * Revision 1.12 2000/09/06 14:23:45 adam * WIN32 updates. * * Revision 1.11 2000/09/04 08:29:22 adam @@ -396,7 +398,7 @@ void Yaz_PDU_Assoc::socket(IYaz_PDU_Observer *observer, int fd) } } -#if 1 +#if 0 // Single-threaded... Only useful for non-blocking handlers void Yaz_PDU_Assoc::childNotify(int fd) @@ -420,9 +422,10 @@ void Yaz_PDU_Assoc::childNotify(int fd) #include #endif -void #ifdef WIN32 -__cdecl +void __cdecl +#else +void * #endif events(void *p) { diff --git a/src/yaz-proxy-main.cpp b/src/yaz-proxy-main.cpp index 42081a9..769c0a2 100644 --- a/src/yaz-proxy-main.cpp +++ b/src/yaz-proxy-main.cpp @@ -1,10 +1,12 @@ /* - * Copyright (c) 1998-1999, Index Data. + * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * * $Log: yaz-proxy-main.cpp,v $ - * Revision 1.10 2000-09-04 08:59:16 adam + * Revision 1.11 2000-09-08 10:23:42 adam + * Added skeleton of yaz-z-server. + * + * Revision 1.10 2000/09/04 08:59:16 adam * Changed call to logging functions (yaz_ added). * * Revision 1.9 2000/08/07 14:19:59 adam diff --git a/src/yaz-proxy.cpp b/src/yaz-proxy.cpp index c18e0b4..7a49511 100644 --- a/src/yaz-proxy.cpp +++ b/src/yaz-proxy.cpp @@ -1,10 +1,12 @@ /* * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * * $Log: yaz-proxy.cpp,v $ - * Revision 1.17 2000-09-05 13:57:28 adam + * Revision 1.18 2000-09-08 10:23:42 adam + * Added skeleton of yaz-z-server. + * + * Revision 1.17 2000/09/05 13:57:28 adam * Fixed get_otherInfoAPDU to return otherInfo for extended services. * * Revision 1.16 2000/09/04 08:29:22 adam diff --git a/src/yaz-server.cpp b/src/yaz-server.cpp index 0cbf801..8aecb14 100644 --- a/src/yaz-server.cpp +++ b/src/yaz-server.cpp @@ -1,10 +1,12 @@ /* - * Copyright (c) 1998-1999, Index Data. + * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * * $Log: yaz-server.cpp,v $ - * Revision 1.7 1999-12-06 13:52:45 adam + * Revision 1.8 2000-09-08 10:23:42 adam + * Added skeleton of yaz-z-server. + * + * Revision 1.7 1999/12/06 13:52:45 adam * Modified for new location of YAZ header files. Experimental threaded * operation. * @@ -31,11 +33,11 @@ */ #include -#include +#include #include #include -class MyServer : public Yaz_Z_Assoc { +class MyServer : public Yaz_Z_Server { public: MyServer(IYaz_PDU_Observable *the_PDU_Observable); void recv_Z_PDU(Z_APDU *apdu); @@ -84,7 +86,7 @@ IYaz_PDU_Observer *MyServer::clone(IYaz_PDU_Observable *the_PDU_Observable) } MyServer::MyServer(IYaz_PDU_Observable *the_PDU_Observable) : - Yaz_Z_Assoc (the_PDU_Observable) + Yaz_Z_Server (the_PDU_Observable) { m_no = 0; } diff --git a/src/yaz-socket-manager.cpp b/src/yaz-socket-manager.cpp index dd61fb1..6e5f24d 100644 --- a/src/yaz-socket-manager.cpp +++ b/src/yaz-socket-manager.cpp @@ -1,10 +1,12 @@ /* - * Copyright (c) 1998-1999, Index Data. + * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * * $Log: yaz-socket-manager.cpp,v $ - * Revision 1.9 2000-08-07 14:19:59 adam + * Revision 1.10 2000-09-08 10:23:42 adam + * Added skeleton of yaz-z-server. + * + * Revision 1.9 2000/08/07 14:19:59 adam * Fixed serious bug regarding timeouts. Improved logging for proxy. * * Revision 1.8 1999/12/06 13:52:45 adam diff --git a/src/yaz-z-assoc.cpp b/src/yaz-z-assoc.cpp index 824bae6..04c4375 100644 --- a/src/yaz-z-assoc.cpp +++ b/src/yaz-z-assoc.cpp @@ -1,10 +1,12 @@ /* - * Copyright (c) 1998-1999, Index Data. + * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * * $Log: yaz-z-assoc.cpp,v $ - * Revision 1.12 2000-09-05 13:57:28 adam + * Revision 1.13 2000-09-08 10:23:42 adam + * Added skeleton of yaz-z-server. + * + * Revision 1.12 2000/09/05 13:57:28 adam * Fixed get_otherInfoAPDU to return otherInfo for extended services. * * Revision 1.11 2000/09/04 08:59:16 adam diff --git a/src/yaz-z-query.cpp b/src/yaz-z-query.cpp index e6c84f5..0f341bc 100644 --- a/src/yaz-z-query.cpp +++ b/src/yaz-z-query.cpp @@ -1,10 +1,12 @@ /* - * Copyright (c) 1998-1999, Index Data. + * Copyright (c) 1998-2000, Index Data. * See the file LICENSE for details. - * Sebastian Hammer, Adam Dickmeiss * * $Log: yaz-z-query.cpp,v $ - * Revision 1.7 2000-05-10 11:36:58 ian + * Revision 1.8 2000-09-08 10:23:42 adam + * Added skeleton of yaz-z-server. + * + * Revision 1.7 2000/05/10 11:36:58 ian * Added default parameters for refid to request functions. * Added default parameter for result set name to search and present request. * Commented out forced logging of PDU contents. diff --git a/src/yaz-z-server.cpp b/src/yaz-z-server.cpp new file mode 100644 index 0000000..993a6d6 --- /dev/null +++ b/src/yaz-z-server.cpp @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2000, Index Data. + * See the file LICENSE for details. + * + * $Log: yaz-z-server.cpp,v $ + * Revision 1.1 2000-09-08 10:23:42 adam + * Added skeleton of yaz-z-server. + * + */ + +#include +#include + + +Yaz_Z_Server::Yaz_Z_Server(IYaz_PDU_Observable *the_PDU_Observable) + : Yaz_Z_Assoc(the_PDU_Observable) +{ + m_no = 0; +} + +void Yaz_Z_Server::recv_Z_PDU (Z_APDU *apdu) +{ + logf (LOG_LOG, "recv_Z_PDU in Yaz_Z_Server"); +} + -- 1.7.10.4