Added object Yaz_Z_Assoc. Much more functional client.
[yazpp-moved-to-github.git] / include / yaz-pdu-observer.h
index e2f5961..f89436f 100644 (file)
@@ -4,7 +4,16 @@
  * Sebastian Hammer, Adam Dickmeiss
  * 
  * $Log: yaz-pdu-observer.h,v $
- * Revision 1.2  1999-01-28 13:08:41  adam
+ * Revision 1.5  1999-04-09 11:47:23  adam
+ * Added object Yaz_Z_Assoc. Much more functional client.
+ *
+ * Revision 1.4  1999/03/23 14:17:57  adam
+ * More work on timeout handling. Work on yaz-client.
+ *
+ * Revision 1.3  1999/02/02 14:01:14  adam
+ * First WIN32 port of YAZ++.
+ *
+ * Revision 1.2  1999/01/28 13:08:41  adam
  * Yaz_PDU_Assoc better encapsulated. Memory leak fix in
  * yaz-socket-manager.cc.
  *
@@ -24,7 +33,7 @@ class IYaz_PDU_Observer;
     transmitted/received over the network. To use this interface the
     IYaz_PDU_Observer interface must be implemented.
  */
-class IYaz_PDU_Observable {
+class YAZ_EXPORT IYaz_PDU_Observable {
  public:
     /// Send encoded PDU buffer of specified length
     virtual int send_PDU(const char *buf, int len) = 0;
@@ -38,13 +47,15 @@ class IYaz_PDU_Observable {
     virtual IYaz_PDU_Observable *clone() = 0;
     /// Destroy completely
     virtual void destroy() = 0;
+    /// Set Idle Time
+    virtual void idleTime (int timeout) = 0;
 };
 
 /** Protocol Data Unit Observer.
     This interface is used together with the IYaz_PDU_Observable interface
     and acts as a callback interface for it.
  */
-class IYaz_PDU_Observer {
+class YAZ_EXPORT IYaz_PDU_Observer {
  public:
     /// A PDU has been received
     virtual void recv_PDU(const char *buf, int len) = 0;
@@ -52,6 +63,8 @@ class IYaz_PDU_Observer {
     virtual void connectNotify() = 0;
     /// Called whenever the connection was closed
     virtual void failNotify() = 0;
+    /// Called whenever there is a timeout
+    virtual void timeoutNotify() = 0;
     /// Make clone of observer using IYaz_PDU_Observable interface
     virtual IYaz_PDU_Observer *clone(IYaz_PDU_Observable *the_PDU_Observable) = 0;
 };