#pragma once #include "inotify.h" #include "autoevent.hpp" #include #include #include #include class UsbDevice; class UsbNotify : public INotify { public: UsbNotify(std::shared_ptr usb); virtual ~UsbNotify(); virtual void notify(void* data, int size); virtual void clear(); private: void run_notify(); std::shared_ptr runThread; AutoEvent ae; std::mutex mx; std::queue> msgs; std::shared_ptr usb; volatile bool brun; };