| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2006-2007 Kevin Ottens <ervin@kde.org> |
| 3 | |
| 4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 5 | */ |
| 6 | |
| 7 | #include "genericinterface.h" |
| 8 | #include "genericinterface_p.h" |
| 9 | #include "soliddefs_p.h" |
| 10 | |
| 11 | #include <solid/devices/ifaces/genericinterface.h> |
| 12 | |
| 13 | Solid::GenericInterface::GenericInterface(QObject *backendObject) |
| 14 | : DeviceInterface(*new GenericInterfacePrivate(), backendObject) |
| 15 | { |
| 16 | if (backendObject) { |
| 17 | connect(sender: backendObject, SIGNAL(propertyChanged(QMap<QString, int>)), receiver: this, SIGNAL(propertyChanged(QMap<QString, int>))); |
| 18 | connect(sender: backendObject, SIGNAL(conditionRaised(QString, QString)), receiver: this, SIGNAL(conditionRaised(QString, QString))); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | Solid::GenericInterface::~GenericInterface() |
| 23 | { |
| 24 | } |
| 25 | |
| 26 | QVariant Solid::GenericInterface::property(const QString &key) const |
| 27 | { |
| 28 | Q_D(const GenericInterface); |
| 29 | return_SOLID_CALL(Ifaces::GenericInterface *, d->backendObject(), QVariant(), property(key)); |
| 30 | } |
| 31 | |
| 32 | QMap<QString, QVariant> Solid::GenericInterface::allProperties() const |
| 33 | { |
| 34 | Q_D(const GenericInterface); |
| 35 | return_SOLID_CALL(Ifaces::GenericInterface *, d->backendObject(), QVariantMap(), allProperties()); |
| 36 | } |
| 37 | |
| 38 | bool Solid::GenericInterface::propertyExists(const QString &key) const |
| 39 | { |
| 40 | Q_D(const GenericInterface); |
| 41 | return_SOLID_CALL(Ifaces::GenericInterface *, d->backendObject(), false, propertyExists(key)); |
| 42 | } |
| 43 | |
| 44 | #include "moc_genericinterface.cpp" |
| 45 | |