-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUsbGuardManager.h
More file actions
34 lines (25 loc) · 846 Bytes
/
UsbGuardManager.h
File metadata and controls
34 lines (25 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef USBGUARDMANAGER_H
#define USBGUARDMANAGER_H
#include <QObject>
#include "DBusUsbProxy.h"
#include "Models/UsbGuardDevicesmodel.h"
class UsbGuardManager : public QObject
{
Q_OBJECT
public:
explicit UsbGuardManager(UsbGuardDevicesModel* model, QObject *parent = nullptr);
// Public method for the GUI to request a refresh
void refreshDeviceList();
private slots:
// Slot to receive the parsed device list from the proxy
void handleDeviceListReady(const QList<UsbDeviceData>& devices);
// Slot to handle a notification that the list has changed on the D-Bus
// NOTE:
void handleDeviceListChanged();
// Slot to handle errors from the proxy
void handleProxyError(const QString& message);
private:
UsbGuardDevicesModel* m_model;
DBusUsbProxy* m_proxy;
};
#endif // USBGUARDMANAGER_H