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
21
QT_BEGIN_NAMESPACE
22
23
class
QDeviceDiscoveryUDev
:
public
QDeviceDiscovery
24
{
25
Q_OBJECT
26
27
public
:
28
QDeviceDiscoveryUDev
(QDeviceTypes
types
,
struct
udev *udev,
QObject
*
parent
=
nullptr
);
29
~QDeviceDiscoveryUDev
();
30
QStringList
scanConnectedDevices
()
override
;
31
32
private
slots
:
33
void
handleUDevNotification();
34
35
protected
:
36
struct
udev *
m_udev
;
37
38
private
:
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
49
QT_END_NAMESPACE
50
51
#endif
// QDEVICEDISCOVERY_UDEV_H
QDeviceDiscoveryUDev
Definition
qdevicediscovery_udev_p.h:24
QDeviceDiscoveryUDev::scanConnectedDevices
QStringList scanConnectedDevices() override
Definition
qdevicediscovery_udev.cpp:73
QDeviceDiscoveryUDev::m_udev
struct udev * m_udev
Definition
qdevicediscovery_udev_p.h:36
QDeviceDiscoveryUDev::~QDeviceDiscoveryUDev
~QDeviceDiscoveryUDev()
Definition
qdevicediscovery_udev.cpp:64
QDeviceDiscoveryUDev::QDeviceDiscoveryUDev
QDeviceDiscoveryUDev(QDeviceTypes types, struct udev *udev, QObject *parent=nullptr)
Definition
qdevicediscovery_udev.cpp:42
QDeviceDiscovery
Definition
qdevicediscovery_p.h:34
QObject
\inmodule QtCore
Definition
qobject.h:103
QObject::parent
QObject * parent() const
Returns a pointer to the parent object.
Definition
qobject.h:346
QSocketNotifier
\inmodule QtCore
Definition
qsocketnotifier.h:14
QStringList
\inmodule QtCore
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
qdevicediscovery_p.h
types
GLsizei GLenum GLenum * types
Definition
qopengles2ext.h:153
Q_OBJECT
#define Q_OBJECT
Definition
qtmetamacros.h:119
slots
#define slots
Definition
qtmetamacros.h:40
qtbase
src
platformsupport
devicediscovery
qdevicediscovery_udev_p.h
Generated by
1.10.0