1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/private/epolldispatcher.h
3 // Purpose: wxEpollDispatcher class
4 // Authors: Lukasz Michalski
6 // Copyright: (c) Lukasz Michalski
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_PRIVATE_EPOLLDISPATCHER_H_
12 #define _WX_PRIVATE_EPOLLDISPATCHER_H_
16 #ifdef wxUSE_EPOLL_DISPATCHER
18 #include "wx/private/fdiodispatcher.h"
20 class WXDLLIMPEXP_CORE wxEpollDispatcher
: public wxFDIODispatcher
23 // create a new instance of this class, can return NULL if
24 // epoll() is not supported on this system
26 // the caller should delete the returned pointer
27 static wxEpollDispatcher
*Create();
29 virtual ~wxEpollDispatcher();
31 // implement base class pure virtual methods
32 virtual bool RegisterFD(int fd
, wxFDIOHandler
* handler
, int flags
= wxFDIO_ALL
);
33 virtual bool ModifyFD(int fd
, wxFDIOHandler
* handler
, int flags
= wxFDIO_ALL
);
34 virtual bool UnregisterFD(int fd
);
35 virtual bool Dispatch(int timeout
= TIMEOUT_INFINITE
);
38 // ctor is private, use Create()
39 wxEpollDispatcher(int epollDescriptor
);
41 int m_epollDescriptor
;
44 #endif // wxUSE_EPOLL_DISPATCHER
46 #endif // _WX_PRIVATE_SOCKETEVTDISPATCH_H_