+// base class for wxSelectDispatcher and wxEpollDispatcher
+class WXDLLIMPEXP_BASE wxFDIODispatcher
+{
+public:
+ enum { TIMEOUT_INFINITE = -1 };
+
+ // register handler for the given descriptor with the dispatcher, return
+ // true on success or false on error
+ virtual bool RegisterFD(int fd, wxFDIOHandler *handler, int flags) = 0;
+
+ // modify descriptor flags or handler, return true on success
+ virtual bool ModifyFD(int fd, wxFDIOHandler *handler, int flags) = 0;
+
+ // unregister descriptor previously registered with RegisterFD(), the
+ // caller is responsible for deleting the returned handler pointer if
+ // necessary
+ virtual bool UnregisterFD(int fd, int flags) = 0;
+
+ // loops waiting for an event to happen on any of the descriptors
+ virtual void RunLoop(int timeout) = 0;
+
+ virtual ~wxFDIODispatcher() { }
+};
+
+//entry for wxFDIOHandlerMap