| 1 | /* |
| 2 | SPDX-FileCopyrightText: 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 | #ifndef SOLID_BACKENDS_FAKEHW_FAKEGENERICINTERFACE_H |
| 8 | #define SOLID_BACKENDS_FAKEHW_FAKEGENERICINTERFACE_H |
| 9 | |
| 10 | #include "fakedeviceinterface.h" |
| 11 | #include <solid/devices/ifaces/genericinterface.h> |
| 12 | |
| 13 | namespace Solid |
| 14 | { |
| 15 | namespace Backends |
| 16 | { |
| 17 | namespace Fake |
| 18 | { |
| 19 | class FakeGenericInterface : public FakeDeviceInterface, public Solid::Ifaces::GenericInterface |
| 20 | { |
| 21 | Q_OBJECT |
| 22 | Q_INTERFACES(Solid::Ifaces::GenericInterface) |
| 23 | |
| 24 | public: |
| 25 | explicit FakeGenericInterface(FakeDevice *device); |
| 26 | ~FakeGenericInterface() override; |
| 27 | |
| 28 | QVariant property(const QString &key) const override; |
| 29 | QMap<QString, QVariant> allProperties() const override; |
| 30 | bool propertyExists(const QString &key) const override; |
| 31 | |
| 32 | Q_SIGNALS: |
| 33 | void propertyChanged(const QMap<QString, int> &changes) override; |
| 34 | void conditionRaised(const QString &condition, const QString &reason) override; |
| 35 | }; |
| 36 | } |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | #endif // SOLID_BACKENDS_FAKEHW_FAKEGENERICINTERFACE_H |
| 41 | |