Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qdevicediscovery_udev_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QDEVICEDISCOVERY_UDEV_H
5#define QDEVICEDISCOVERY_UDEV_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qdevicediscovery_p.h"
19#include <libudev.h>
20
22
24{
26
27public:
28 QDeviceDiscoveryUDev(QDeviceTypes types, struct udev *udev, QObject *parent = nullptr);
31
32private slots:
33 void handleUDevNotification();
34
35protected:
36 struct udev *m_udev;
37
38private:
39 bool checkDeviceType(struct udev_device *dev);
40
41 void startWatching();
42 void stopWatching();
43
44 struct udev_monitor *m_udevMonitor = nullptr;
45 int m_udevMonitorFileDescriptor = -1;
46 QSocketNotifier *m_udevSocketNotifier = nullptr;
47};
48
50
51#endif // QDEVICEDISCOVERY_UDEV_H
QStringList scanConnectedDevices() override
QDeviceDiscoveryUDev(QDeviceTypes types, struct udev *udev, QObject *parent=nullptr)
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\inmodule QtCore
\inmodule QtCore
Combined button and popup list for selecting options.
GLsizei GLenum GLenum * types
#define Q_OBJECT
#define slots