]> git.sesse.net Git - ultimatescore/blob - client/event_device.h
Make the roster scripts executable.
[ultimatescore] / client / event_device.h
1 #ifndef _EVENTDEVICE_H
2 #define _EVENTDEVICE_H 1
3
4 #include <string>
5 #include <set>
6 #include <thread>
7 #include <utility>
8
9 class QObject;
10
11 class EventDevice {
12 private:
13         int fd;
14         std::set<std::pair<unsigned, unsigned>> accepted_usb_ids;
15         std::thread thr;
16         QObject *receiver;
17
18         void init();
19         void thread_func();
20
21 public:
22         EventDevice(const std::set<std::pair<unsigned, unsigned>> &accepted_usb_ids, QObject *receiver);
23         void start_thread();
24 };
25
26 #endif /* !defined(_EVENTDEVICE_H) */