2019-07-28 06:08:18 +00:00
|
|
|
#ifndef DEVICEFINDER_H
|
|
|
|
#define DEVICEFINDER_H
|
2019-07-17 05:53:51 +00:00
|
|
|
|
2019-07-28 06:08:18 +00:00
|
|
|
#include <hid/DeviceMonitor.h>
|
|
|
|
#include <hidpp/SimpleDispatcher.h>
|
|
|
|
#include <hidpp10/Device.h>
|
|
|
|
#include <hidpp10/IReceiver.h>
|
|
|
|
#include <hidpp20/IReprogControls.h>
|
|
|
|
#include <map>
|
|
|
|
#include <thread>
|
2019-07-17 05:53:51 +00:00
|
|
|
#include "Device.h"
|
|
|
|
|
2019-07-28 06:08:18 +00:00
|
|
|
class Device;
|
2019-07-17 05:53:51 +00:00
|
|
|
|
|
|
|
class DeviceFinder : public HID::DeviceMonitor
|
|
|
|
{
|
2019-07-28 06:08:18 +00:00
|
|
|
public:
|
|
|
|
std::map<Device*, std::thread> devices;
|
2019-07-17 05:53:51 +00:00
|
|
|
protected:
|
|
|
|
void addDevice(const char* path);
|
|
|
|
void removeDevice(const char* path);
|
|
|
|
};
|
|
|
|
|
2019-07-28 06:08:18 +00:00
|
|
|
extern DeviceFinder* finder;
|
2019-07-17 05:53:51 +00:00
|
|
|
|
2019-07-28 06:08:18 +00:00
|
|
|
#endif //DEVICEFINDER_H
|