* Copyright (c) 1998-2000, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-pdu-observer.h,v 1.1 2000-10-11 11:58:16 adam Exp $
+ * $Id: yaz-pdu-observer.h,v 1.2 2000-11-01 14:22:59 adam Exp $
*/
#ifndef YAZ_PDU_OBSERVER_H
/// 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;
+ virtual IYaz_PDU_Observer *clone(IYaz_PDU_Observable *the_PDU_Observable,
+ int fd) = 0;
};
#endif
* Copyright (c) 1998-2000, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-proxy.h,v 1.1 2000-10-11 11:58:16 adam Exp $
+ * $Id: yaz-proxy.h,v 1.2 2000-11-01 14:22:59 adam Exp $
*/
#include <yaz++/yaz-z-assoc.h>
Yaz_ProxyClient(IYaz_PDU_Observable *the_PDU_Observable);
~Yaz_ProxyClient();
void recv_Z_PDU(Z_APDU *apdu);
- IYaz_PDU_Observer* clone(IYaz_PDU_Observable *the_PDU_Observable);
+ IYaz_PDU_Observer* clone(IYaz_PDU_Observable *the_PDU_Observable, int fd);
void shutdown();
Yaz_Proxy *m_server;
void failNotify();
Yaz_Proxy(IYaz_PDU_Observable *the_PDU_Observable);
~Yaz_Proxy();
void recv_Z_PDU(Z_APDU *apdu);
- IYaz_PDU_Observer* clone(IYaz_PDU_Observable *the_PDU_Observable);
+ IYaz_PDU_Observer* clone(IYaz_PDU_Observable *the_PDU_Observable, int fd);
void failNotify();
void timeoutNotify();
void connectNotify();
* See the file LICENSE for details.
*
* $Log: yaz-client.cpp,v $
- * Revision 1.15 2000-10-11 11:58:16 adam
+ * Revision 1.16 2000-11-01 14:22:59 adam
+ * Added fd parameter for method IYaz_PDU_Observer::clone.
+ *
+ * Revision 1.15 2000/10/11 11:58:16 adam
* Moved header files to include/yaz++. Switched to libtool and automake.
* Configure script creates yaz++-config script.
*
public:
MyClient(IYaz_PDU_Observable *the_PDU_Observable,
Yaz_SocketManager *the_SocketManager);
- IYaz_PDU_Observer *clone(IYaz_PDU_Observable *the_PDU_Observable);
+ IYaz_PDU_Observer *clone(IYaz_PDU_Observable *the_PDU_Observable, int fd);
int args(Yaz_SocketManager *socketManager, int argc, char **argv);
int interactive(Yaz_SocketManager *socketManager);
int wait();
set_lastReceived(-1);
}
-IYaz_PDU_Observer *MyClient::clone(IYaz_PDU_Observable *the_PDU_Observable)
+IYaz_PDU_Observer *MyClient::clone(IYaz_PDU_Observable *the_PDU_Observable,
+ int fd)
{
return new MyClient(the_PDU_Observable, m_socketManager);
}
* See the file LICENSE for details.
*
* $Log: yaz-pdu-assoc.cpp,v $
- * Revision 1.18 2000-10-24 12:29:57 adam
+ * Revision 1.19 2000-11-01 14:22:59 adam
+ * Added fd parameter for method IYaz_PDU_Observer::clone.
+ *
+ * Revision 1.18 2000/10/24 12:29:57 adam
* Fixed bug in proxy where a Yaz_ProxyClient could be owned by
* two Yaz_Proxy's (fatal).
*
IYaz_PDU_Observable *new_observable = clone();
// Clone PDU Observer
- IYaz_PDU_Observer *observer = m_PDU_Observer->clone(new_observable);
+ IYaz_PDU_Observer *observer = m_PDU_Observer->clone(new_observable, fd);
// Attach new socket to it
new_observable->socket(observer, fd);
Yaz_PDU_Assoc *new_observable = new Yaz_PDU_Assoc (socket_observable);
/// Clone PDU Observer
- IYaz_PDU_Observer *observer = m_PDU_Observer->clone(new_observable);
+ IYaz_PDU_Observer *observer = m_PDU_Observer->clone(new_observable, fd);
/// Attach new socket to it
new_observable->socket(observer, fd);
* See the file LICENSE for details.
*
* $Log: yaz-proxy.cpp,v $
- * Revision 1.20 2000-10-24 12:29:57 adam
+ * Revision 1.21 2000-11-01 14:22:59 adam
+ * Added fd parameter for method IYaz_PDU_Observer::clone.
+ *
+ * Revision 1.20 2000/10/24 12:29:57 adam
* Fixed bug in proxy where a Yaz_ProxyClient could be owned by
* two Yaz_Proxy's (fatal).
*
}
IYaz_PDU_Observer *Yaz_Proxy::clone(IYaz_PDU_Observable
- *the_PDU_Observable)
+ *the_PDU_Observable, int fd)
{
Yaz_Proxy *new_proxy = new Yaz_Proxy(the_PDU_Observable);
new_proxy->m_parent = this;
}
IYaz_PDU_Observer *Yaz_ProxyClient::clone(IYaz_PDU_Observable
- *the_PDU_Observable)
+ *the_PDU_Observable, int fd)
{
return new Yaz_ProxyClient(the_PDU_Observable);
}
* See the file LICENSE for details.
*
* $Log: yaz-server.cpp,v $
- * Revision 1.13 2000-10-11 11:58:16 adam
+ * Revision 1.14 2000-11-01 14:22:59 adam
+ * Added fd parameter for method IYaz_PDU_Observer::clone.
+ *
+ * Revision 1.13 2000/10/11 11:58:16 adam
* Moved header files to include/yaz++. Switched to libtool and automake.
* Configure script creates yaz++-config script.
*
Z_RecordComposition *comp,
Z_NamePlusRecord *namePlusRecord,
Z_Records *records);
- IYaz_PDU_Observer* clone(IYaz_PDU_Observable *the_PDU_Observable);
+ IYaz_PDU_Observer* clone(IYaz_PDU_Observable *the_PDU_Observable,
+ int fd);
void failNotify();
void timeoutNotify();
void connectNotify();
strlen(marc_records[eff_pos]));
}
-IYaz_PDU_Observer *MyServer::clone(IYaz_PDU_Observable *the_PDU_Observable)
+IYaz_PDU_Observer *MyServer::clone(IYaz_PDU_Observable *the_PDU_Observable,
+ int fd)
{
MyServer *new_server;
logf (LOG_LOG, "child no %d", m_no);