Introducing namespace yazpp_1 for all YAZ++ functions. This will
[yazpp-moved-to-github.git] / include / yaz++ / z-assoc.h
index 49b8a68..f025945 100644 (file)
@@ -2,16 +2,18 @@
  * Copyright (c) 1998-2000, Index Data.
  * See the file LICENSE for details.
  * 
- * $Id: z-assoc.h,v 1.5 2003-10-23 11:45:08 adam Exp $
+ * $Id: z-assoc.h,v 1.7 2005-06-02 06:40:21 adam Exp $
  */
 
 #ifndef YAZ_Z_ASSOC_INCLUDED
 #define YAZ_Z_ASSOC_INCLUDED
 
+#include <yaz/srw.h>
 #include <yaz/proto.h>
 #include <yaz/odr.h>
 #include <yaz++/pdu-observer.h>
 
+namespace yazpp_1 {
 /** Z39.50 Assocation.
     This object implements the client - and server role of a generic
     Z39.50 Association.
@@ -39,13 +41,14 @@ class YAZ_EXPORT Yaz_Z_Assoc : public IYaz_PDU_Observer {
     /// Close connection
     void close();
     /// Decode Z39.50 PDU.
-    Z_APDU *decode_Z_PDU(const char *buf, int len);
+    Z_GDU *decode_GDU(const char *buf, int len);
     /// Encode Z39.50 PDU.
-    int encode_Z_PDU(Z_APDU *apdu, char **buf, int *len);
+    int encode_GDU(Z_GDU *apdu, char **buf, int *len);
     /// Send Z39.50 PDU
     int send_Z_PDU(Z_APDU *apdu, int *len);
+    int send_GDU(Z_GDU *apdu, int *len);
     /// Receive Z39.50 PDU
-    virtual void recv_Z_PDU(Z_APDU *apdu, int len) = 0;
+    virtual void recv_GDU(Z_GDU *apdu, int len) = 0;
     /// Create Z39.50 PDU with reasonable defaults
     Z_APDU *create_Z_PDU(int type);
     /// Request Alloc
@@ -95,5 +98,6 @@ class YAZ_EXPORT Yaz_Z_Assoc : public IYaz_PDU_Observer {
     char *m_hostname;
     int m_APDU_yazlog;
 };
+};
 
 #endif