File indexing completed on 2024-05-19 05:36:12
0001 /* 0002 SPDX-FileCopyrightText: 2015 David Rosca <nowrep@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <QObject> 0010 0011 class UdevDeviceNotifier : public QObject 0012 { 0013 Q_OBJECT 0014 0015 public: 0016 explicit UdevDeviceNotifier(QObject *parent = nullptr); 0017 ~UdevDeviceNotifier() override; 0018 0019 Q_SIGNALS: 0020 void newKeyboardDevice(); 0021 void newPointerDevice(); 0022 0023 private: 0024 void init(); 0025 void socketActivated(); 0026 0027 struct udev *m_udev; 0028 struct udev_monitor *m_monitor; 0029 };