X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2B%2B%2Fsocket-observer.h;fp=include%2Fyaz%2B%2B%2Fsocket-observer.h;h=0000000000000000000000000000000000000000;hb=0cc824e02bc2c69986bec8c9dd9ff53f07a0cd3d;hp=fee5088e73bb78545c834faa4aff7c3c4d777162;hpb=76d66b222afff97cf367a3e7b8bfe045a62d0d57;p=yazpp-moved-to-github.git diff --git a/include/yaz++/socket-observer.h b/include/yaz++/socket-observer.h deleted file mode 100644 index fee5088..0000000 --- a/include/yaz++/socket-observer.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 1998-2005, Index Data. - * See the file LICENSE for details. - * - * $Id: socket-observer.h,v 1.8 2005-09-23 13:11:04 adam Exp $ - */ - -#ifndef YAZ_SOCKET_OBSERVER_H -#define YAZ_SOCKET_OBSERVER_H - -#include - -namespace yazpp_1 { - - enum SocketObserve { - SOCKET_OBSERVE_READ=1, - SOCKET_OBSERVE_WRITE=2, - SOCKET_OBSERVE_EXCEPT=4, - SOCKET_OBSERVE_TIMEOUT=8 - }; - -/** - Forward reference -*/ - class ISocketObserver; - -/** Socket Observable. - This interface implements notification of socket events. - The module interested in (observing) the sockets - must implement the ISocketObserver interface. The - ISocketObserver only have to implement one function, so it's - quite simple to observe sockets change state. - The socket events below specifies read, write, exception, - and timeout respectively: -
-    SOCKET_OBSERVE_READ
-    SOCKET_OBSERVE_WRITE
-    SOCKET_OBSERVE_EXCEPT
-    SOCKET_OBSERVE_TIMEOUT
-    
- The maskObserver method specifies which of these events the - observer is intertested in. -*/ - class YAZ_EXPORT ISocketObservable { - public: - /// Add an observer interested in socket fd - virtual void addObserver(int fd, ISocketObserver *observer) = 0; - /// Delete an observer - virtual void deleteObserver(ISocketObserver *observer) = 0; - /// Delete all observers - virtual void deleteObservers() = 0; - /// Specify the events that the observer is intersted in. - virtual void maskObserver(ISocketObserver *observer, int mask) = 0; - /// Specify timeout - virtual void timeoutObserver(ISocketObserver *observer, - int timeout)=0; - virtual ~ISocketObservable(); - }; - -/** Socket Observer. - The ISocketObserver interface implements a module interested - socket events. Look for objects that implements the - ISocketObservable interface! -*/ - class YAZ_EXPORT ISocketObserver { - public: - /// Notify the observer that something happened to socket - virtual void socketNotify(int event) = 0; - virtual ~ISocketObserver(); - }; - -}; -#endif -/* - * Local variables: - * c-basic-offset: 4 - * indent-tabs-mode: nil - * End: - * vim: shiftwidth=4 tabstop=8 expandtab - */ -