Solid

iokitdevice.h
1/*
2 SPDX-FileCopyrightText: 2009 Harald Fernengel <harry@kdevelop.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#ifndef SOLID_BACKENDS_IOKIT_IOKITDEVICE_H
8#define SOLID_BACKENDS_IOKIT_IOKITDEVICE_H
9
10#include <IOKit/IOKitLib.h>
11#include <solid/devices/ifaces/device.h>
12
13namespace Solid
14{
15namespace Backends
16{
17namespace IOKit
18{
19class IOKitDevicePrivate;
20class IOKitManager;
21
22class IOKitDevice : public Solid::Ifaces::Device
23{
25
26public:
27 IOKitDevice(const QString &udi);
28 IOKitDevice(const IOKitDevice &device);
29 virtual ~IOKitDevice();
30
31 QString udi() const override;
32 QString parentUdi() const override;
33
34 QString vendor() const override;
35 QString product() const override;
36 QString icon() const override;
37 QStringList emblems() const override;
38 QString description() const override;
39
40 virtual QVariant property(const QString &key) const;
41
42 virtual QMap<QString, QVariant> allProperties() const;
43
44 virtual bool iOKitPropertyExists(const QString &key) const;
45
46 bool queryDeviceInterface(const Solid::DeviceInterface::Type &type) const override;
47 QObject *createDeviceInterface(const Solid::DeviceInterface::Type &type) override;
48
49 bool conformsToIOKitClass(const QString &className) const;
50
52 void propertyChanged(const QMap<QString, int> &changes);
53 void conditionRaised(const QString &condition, const QString &reason);
54
55private:
56 friend class IOKitManager;
57 IOKitDevice(const QString &udi, const io_registry_entry_t &entry);
58 IOKitDevicePrivate *const d;
59};
60}
61}
62}
63
64#endif // SOLID_BACKENDS_IOKIT_IOKITDEVICE_H
Type
This enum type defines the type of device interface that a Device can have.
This class specifies the interface a device will have to comply to in order to be used in the system.
The single responsibility of this class is to create arguments valid for logind Inhibit call.
Definition fakebattery.h:16
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:17:12 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.