File indexing completed on 2024-05-12 04:01:51

0001 /*
0002     SPDX-FileCopyrightText: 2006-2007 Kevin Ottens <ervin@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #include "genericinterface.h"
0008 #include "genericinterface_p.h"
0009 #include "soliddefs_p.h"
0010 
0011 #include <solid/devices/ifaces/genericinterface.h>
0012 
0013 Solid::GenericInterface::GenericInterface(QObject *backendObject)
0014     : DeviceInterface(*new GenericInterfacePrivate(), backendObject)
0015 {
0016     if (backendObject) {
0017         connect(backendObject, SIGNAL(propertyChanged(QMap<QString, int>)), this, SIGNAL(propertyChanged(QMap<QString, int>)));
0018         connect(backendObject, SIGNAL(conditionRaised(QString, QString)), this, SIGNAL(conditionRaised(QString, QString)));
0019     }
0020 }
0021 
0022 Solid::GenericInterface::~GenericInterface()
0023 {
0024 }
0025 
0026 QVariant Solid::GenericInterface::property(const QString &key) const
0027 {
0028     Q_D(const GenericInterface);
0029     return_SOLID_CALL(Ifaces::GenericInterface *, d->backendObject(), QVariant(), property(key));
0030 }
0031 
0032 QMap<QString, QVariant> Solid::GenericInterface::allProperties() const
0033 {
0034     Q_D(const GenericInterface);
0035     return_SOLID_CALL(Ifaces::GenericInterface *, d->backendObject(), QVariantMap(), allProperties());
0036 }
0037 
0038 bool Solid::GenericInterface::propertyExists(const QString &key) const
0039 {
0040     Q_D(const GenericInterface);
0041     return_SOLID_CALL(Ifaces::GenericInterface *, d->backendObject(), false, propertyExists(key));
0042 }
0043 
0044 #include "moc_genericinterface.cpp"