diff options
Diffstat (limited to 'plugins/CopyEngine/Ultracopier-Spec/EventLoop.h')
-rwxr-xr-x | plugins/CopyEngine/Ultracopier-Spec/EventLoop.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/plugins/CopyEngine/Ultracopier-Spec/EventLoop.h b/plugins/CopyEngine/Ultracopier-Spec/EventLoop.h new file mode 100755 index 0000000..3d68ce2 --- /dev/null +++ b/plugins/CopyEngine/Ultracopier-Spec/EventLoop.h @@ -0,0 +1,30 @@ +#ifndef EVENTLOOP_H +#define EVENTLOOP_H + +#include "Variable.h" + +#ifdef ASYNCFILEMANIP +#include <QThread> +#include "CallBackEventLoop.h" +#include <sys/epoll.h> +#define MAXEVENTS 64 + +class EventLoop : public QThread +{ +public: + EventLoop(); + ~EventLoop(); + static EventLoop eventLoop; + void watchSource(CallBackEventLoop * const object,const int &fd); + void watchDestination(CallBackEventLoop * const object,const int &fd); +protected: + void run(); + void stop(); +private: + epoll_event events[MAXEVENTS]; + int efd; + bool stopIt; +}; +#endif + +#endif // EVENTLOOP_H |