File indexing completed on 2024-06-09 04:00:38

0001 /*
0002     SPDX-FileCopyrightText: 2009 Harald Fernengel <harry@kdevelop.org>
0003     SPDX-FileCopyrightText: 2017 René J.V. Bertin <rjvbertin@gmail.com>
0004 
0005     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0006 */
0007 
0008 #ifndef SOLID_BACKENDS_IOKIT_DEVICEINTERFACE_H
0009 #define SOLID_BACKENDS_IOKIT_DEVICEINTERFACE_H
0010 
0011 #include "iokitdevice.h"
0012 #include <solid/devices/ifaces/deviceinterface.h>
0013 
0014 #include <QObject>
0015 
0016 namespace Solid
0017 {
0018 namespace Backends
0019 {
0020 namespace IOKit
0021 {
0022 class DeviceInterface : public QObject, virtual public Solid::Ifaces::DeviceInterface
0023 {
0024     Q_OBJECT
0025     Q_INTERFACES(Solid::Ifaces::DeviceInterface)
0026 public:
0027     DeviceInterface(IOKitDevice *device);
0028     // the ctor taking a const device* argument makes a deep
0029     // copy of the IOKitDevice; any property changes made via
0030     // the resulting instance will not affect the original device.
0031     DeviceInterface(const IOKitDevice *device);
0032     virtual ~DeviceInterface();
0033 
0034 protected:
0035     IOKitDevice *m_device;
0036     IOKitDevice *m_deviceCopy;
0037 };
0038 }
0039 }
0040 }
0041 
0042 #endif // SOLID_BACKENDS_IOKIT_DEVICEINTERFACE_H