Solid

udevqtdevice.h
1/*
2 SPDX-FileCopyrightText: 2009 Benjamin K. Stuhl <bks24@cornell.edu>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#ifndef UDEVQTDEVICE_H
8#define UDEVQTDEVICE_H
9
10#include <QList>
11#include <QString>
12#include <QStringList>
13#include <QVariant>
14
15namespace UdevQt
16{
17class DevicePrivate;
18class Device
19{
20public:
21 Device();
22 Device(const Device &other);
23 ~Device();
24 Device &operator=(const Device &other);
25
26 bool isValid() const;
27 QString subsystem() const;
28 QString devType() const;
29 QString name() const;
30 QString sysfsPath() const;
31 int sysfsNumber() const;
32 QString driver() const;
33 QString primaryDeviceFile() const;
34 QStringList alternateDeviceSymlinks() const;
35 QStringList deviceProperties() const;
36#ifdef UDEV_HAVE_GET_SYSATTR_LIST_ENTRY
37 QStringList sysfsProperties() const;
38#endif
39 Device parent() const;
40
41 // ### should this really be a QVariant? as far as udev knows, everything is a string...
42 // see also Client::devicesByProperty
43 QVariant deviceProperty(const QString &name) const;
44 QString decodedDeviceProperty(const QString &name) const;
45 QVariant sysfsProperty(const QString &name) const;
46 Device ancestorOfType(const QString &subsys, const QString &devtype) const;
47
48private:
49 Device(DevicePrivate *devPrivate);
50 friend class Client;
51 friend class ClientPrivate;
52
53 DevicePrivate *d;
54};
55
56typedef QList<Device> DeviceList;
57
58}
59
60#endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:23 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.