Introducing namespace yazpp_1 for all YAZ++ functions. This will
[yazpp-moved-to-github.git] / include / yaz++ / socket-manager.h
index b293965..d86297c 100644 (file)
@@ -1,8 +1,8 @@
 /*
- * Copyright (c) 1998-2000, Index Data.
+ * Copyright (c) 1998-2004, Index Data.
  * See the file LICENSE for details.
  * 
- * $Id: socket-manager.h,v 1.1 2002-10-09 12:50:26 adam Exp $
+ * $Id: socket-manager.h,v 1.4 2005-06-02 06:40:21 adam Exp $
  */
 
 #ifndef YAZ_SOCKET_MANAGER_INCLUDED
@@ -11,6 +11,8 @@
 #include <yaz++/socket-observer.h>
 #include <time.h>
 
+namespace yazpp_1 {
+
 /** Simple Socket Manager.
     Implements a stand-alone simple model that uses select(2) to
     observe socket events.
@@ -21,8 +23,8 @@ class YAZ_EXPORT Yaz_SocketManager : public IYazSocketObservable {
        IYazSocketObserver *observer;
        int fd;
        unsigned mask;
-       unsigned timeout;
-        unsigned timeout_this;
+       int timeout;
+        int timeout_this;
        time_t last_activity;
        YazSocketEntry *next;
     };
@@ -53,12 +55,13 @@ class YAZ_EXPORT Yaz_SocketManager : public IYazSocketObservable {
     virtual void maskObserver(IYazSocketObserver *observer, int mask);
     /// Set timeout
     virtual void timeoutObserver(IYazSocketObserver *observer,
-                                unsigned timeout);
+                                int timeout);
     /// Process one event. return > 0 if event could be processed;
-    int Yaz_SocketManager::processEvent();
+    int processEvent();
     Yaz_SocketManager();
     virtual ~Yaz_SocketManager();
 };
 
+};
 
 #endif