Introducing namespace yazpp_1 for all YAZ++ functions. This will
[yazpp-moved-to-github.git] / include / yaz++ / pdu-observer.h
index 02b5fe8..e135da4 100644 (file)
@@ -2,12 +2,14 @@
  * Copyright (c) 1998-2000, Index Data.
  * See the file LICENSE for details.
  * 
- * $Id: pdu-observer.h,v 1.1 2002-10-09 12:50:26 adam Exp $
+ * $Id: pdu-observer.h,v 1.5 2005-06-02 06:40:21 adam Exp $
  */
 
 #ifndef YAZ_PDU_OBSERVER_H
 #define YAZ_PDU_OBSERVER_H
 
+namespace yazpp_1 {
+
 class IYaz_PDU_Observer;
 
 /** Protocol Data Unit Observable.
@@ -21,9 +23,9 @@ class YAZ_EXPORT IYaz_PDU_Observable {
     /// Send encoded PDU buffer of specified length
     virtual int send_PDU(const char *buf, int len) = 0;
     /// Connect with server specified by addr.
-    virtual void connect(IYaz_PDU_Observer *observer, const char *addr) = 0;
+    virtual int connect(IYaz_PDU_Observer *observer, const char *addr) = 0;
     /// Listen on address addr.
-    virtual void listen(IYaz_PDU_Observer *observer, const char *addr) = 0;
+    virtual int listen(IYaz_PDU_Observer *observer, const char *addr) = 0;
     /// Close connection
     virtual void close() = 0;
     /// Make clone of this object using this interface
@@ -32,6 +34,8 @@ class YAZ_EXPORT IYaz_PDU_Observable {
     virtual void destroy() = 0;
     /// Set Idle Time
     virtual void idleTime (int timeout) = 0;
+    /// Get peername
+    virtual const char *getpeername() = 0;
 };
 
 /** Protocol Data Unit Observer.
@@ -52,5 +56,6 @@ class YAZ_EXPORT IYaz_PDU_Observer {
     virtual IYaz_PDU_Observer *sessionNotify(
        IYaz_PDU_Observable *the_PDU_Observable, int fd) = 0;
 };
+};
 
 #endif