X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2B%2B%2Fpdu-observer.h;h=3a0627a311570d2b6863e9638118d844b4c2c2c7;hb=7411ed6df7fc0b535f83503f73d70e80f390e295;hp=e135da474ba012cf8d63f587e0a7ff41f3151e0e;hpb=86726b00b052694e65b036c262f5fe9096554175;p=yazpp-moved-to-github.git diff --git a/include/yaz++/pdu-observer.h b/include/yaz++/pdu-observer.h index e135da4..3a0627a 100644 --- a/include/yaz++/pdu-observer.h +++ b/include/yaz++/pdu-observer.h @@ -1,8 +1,8 @@ /* - * Copyright (c) 1998-2000, Index Data. + * Copyright (c) 1998-2005, Index Data. * See the file LICENSE for details. * - * $Id: pdu-observer.h,v 1.5 2005-06-02 06:40:21 adam Exp $ + * $Id: pdu-observer.h,v 1.7 2005-06-25 15:53:19 adam Exp $ */ #ifndef YAZ_PDU_OBSERVER_H @@ -10,26 +10,26 @@ namespace yazpp_1 { -class IYaz_PDU_Observer; +class IPDU_Observer; /** Protocol Data Unit Observable. This interface implements a Protocol Data Unit (PDU) network driver. The PDU's is not encoded/decoded by this interface. They are simply transmitted/received over the network. To use this interface the - IYaz_PDU_Observer interface must be implemented. + IPDU_Observer interface must be implemented. */ -class YAZ_EXPORT IYaz_PDU_Observable { +class YAZ_EXPORT IPDU_Observable { public: /// Send encoded PDU buffer of specified length virtual int send_PDU(const char *buf, int len) = 0; /// Connect with server specified by addr. - virtual int connect(IYaz_PDU_Observer *observer, const char *addr) = 0; + virtual int connect(IPDU_Observer *observer, const char *addr) = 0; /// Listen on address addr. - virtual int listen(IYaz_PDU_Observer *observer, const char *addr) = 0; + virtual int listen(IPDU_Observer *observer, const char *addr) = 0; /// Close connection virtual void close() = 0; /// Make clone of this object using this interface - virtual IYaz_PDU_Observable *clone() = 0; + virtual IPDU_Observable *clone() = 0; /// Destroy completely virtual void destroy() = 0; /// Set Idle Time @@ -39,10 +39,10 @@ class YAZ_EXPORT IYaz_PDU_Observable { }; /** Protocol Data Unit Observer. - This interface is used together with the IYaz_PDU_Observable interface + This interface is used together with the IPDU_Observable interface and acts as a callback interface for it. */ -class YAZ_EXPORT IYaz_PDU_Observer { +class YAZ_EXPORT IPDU_Observer { public: /// A PDU has been received virtual void recv_PDU(const char *buf, int len) = 0; @@ -52,10 +52,18 @@ class YAZ_EXPORT IYaz_PDU_Observer { 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 *sessionNotify( - IYaz_PDU_Observable *the_PDU_Observable, int fd) = 0; + /// Make clone of observer using IPDU_Observable interface + virtual IPDU_Observer *sessionNotify( + IPDU_Observable *the_PDU_Observable, int fd) = 0; }; }; #endif +/* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */ +