Solid

iokitdeviceinterface.cpp
1/*
2 SPDX-FileCopyrightText: 2009 Harald Fernengel <harry@kdevelop.org>
3 SPDX-FileCopyrightText: 2017 René J.V. Bertin <rjvbertin@gmail.com>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#include "iokitdeviceinterface.h"
9
10using namespace Solid::Backends::IOKit;
11
12DeviceInterface::DeviceInterface(IOKitDevice *device)
13 : QObject(device)
14 , m_device(device)
15 , m_deviceCopy(nullptr)
16{
17}
18
19DeviceInterface::DeviceInterface(const IOKitDevice *device)
20 : QObject(device->parent())
21 , m_deviceCopy(new IOKitDevice(*device))
22{
23 m_device = m_deviceCopy;
24}
25
26DeviceInterface::~DeviceInterface()
27{
28 if (m_deviceCopy) {
29 delete m_deviceCopy;
30 m_deviceCopy = nullptr;
31 }
32}
33
34#include "moc_iokitdeviceinterface.cpp"
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.