New threaded PDU association.
[yazpp-moved-to-github.git] / include / yaz++ / yaz-z-server.h
index 5b4a0eb..1e606fa 100644 (file)
@@ -1,12 +1,34 @@
 /*
- * Copyright (c) 2000, Index Data.
+ * Copyright (c) 2000-2001, Index Data.
  * See the file LICENSE for details.
  * 
- * $Id: yaz-z-server.h,v 1.1 2000-10-11 11:58:16 adam Exp $
+ * $Id: yaz-z-server.h,v 1.2 2001-03-26 14:43:49 adam Exp $
  */
 
 #include <yaz++/yaz-z-assoc.h>
 
+class Yaz_Z_Server;
+
+class YAZ_EXPORT Yaz_I_Facility {
+ public:
+    virtual const char *get_name(Yaz_Z_Server *server) = 0;
+    virtual int open(Yaz_Z_Server *server,
+                    Z_InitRequest *initRequest,
+                    Z_InitResponse *initResponse) = 0;
+    virtual int recv_PDU(Yaz_Z_Server *server, Z_APDU *apdu) = 0;
+    virtual int close(Yaz_Z_Server *server) = 0;
+};
+
+class YAZ_EXPORT Yaz_Facility_Retrieval : public Yaz_I_Facility {
+ public:
+    const char *get_name(Yaz_Z_Server *server);
+    int open(Yaz_Z_Server *server,
+            Z_InitRequest *initRequest,
+            Z_InitResponse *initResponse);
+    int recv_PDU(Yaz_Z_Server *server, Z_APDU *apdu);
+    int close(Yaz_Z_Server *server);
+};
+
 class YAZ_EXPORT Yaz_Z_Server : public Yaz_Z_Assoc {
 public:
     Yaz_Z_Server(IYaz_PDU_Observable *the_PDU_Observable);
@@ -31,7 +53,6 @@ public:
     void create_surrogateDiagnostics(Z_NamePlusRecord *rec,
                                     const char *dbname, int error,
                                     char *const addinfo);
-
  private:
     Z_Records *pack_records (const char *resultSetName,
                             int start, int num,