Changeset View
Changeset View
Standalone View
Standalone View
isoimagewriter/usbdevicemonitor.h
Show All 34 Lines | |||||
35 | protected: | 35 | protected: | ||
36 | UsbDeviceMonitorPrivate* const d_ptr; | 36 | UsbDeviceMonitorPrivate* const d_ptr; | ||
37 | 37 | | |||
38 | public: | 38 | public: | ||
39 | explicit UsbDeviceMonitor(QObject *parent = 0); | 39 | explicit UsbDeviceMonitor(QObject *parent = 0); | ||
40 | ~UsbDeviceMonitor(); | 40 | ~UsbDeviceMonitor(); | ||
41 | 41 | | |||
42 | // Implements QAbstractNativeEventFilter interface for processing WM_DEVICECHANGE messages (Windows) | 42 | // Implements QAbstractNativeEventFilter interface for processing WM_DEVICECHANGE messages (Windows) | ||
43 | bool nativeEventFilter(const QByteArray& eventType, void* message, long* result); | 43 | bool nativeEventFilter(const QByteArray& eventType, void* message, long* result) override; | ||
44 | 44 | | |||
45 | protected: | 45 | protected: | ||
46 | // Closes handles and frees resources | 46 | // Closes handles and frees resources | ||
47 | void cleanup(); | 47 | void cleanup(); | ||
48 | 48 | | |||
49 | signals: | 49 | signals: | ||
50 | // Emitted when device change notification arrives | 50 | // Emitted when device change notification arrives | ||
51 | void deviceChanged(); | 51 | void deviceChanged(); | ||
52 | 52 | | |||
53 | public slots: | 53 | public slots: | ||
54 | // Initializes monitoring for USB devices | 54 | // Initializes monitoring for USB devices | ||
55 | bool startMonitoring(); | 55 | bool startMonitoring(); | ||
56 | }; | 56 | }; | ||
57 | 57 | | |||
58 | #endif // USBDEVICEMONITOR_H | 58 | #endif // USBDEVICEMONITOR_H |