| 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_FAKESTORAGEACCESS_H |
| 8 | #define SOLID_BACKENDS_FAKEHW_FAKESTORAGEACCESS_H |
| 9 | |
| 10 | #include "fakedeviceinterface.h" |
| 11 | #include <solid/devices/ifaces/storageaccess.h> |
| 12 | |
| 13 | namespace Solid |
| 14 | { |
| 15 | namespace Backends |
| 16 | { |
| 17 | namespace Fake |
| 18 | { |
| 19 | class FakeStorageAccess : public FakeDeviceInterface, virtual public Solid::Ifaces::StorageAccess |
| 20 | { |
| 21 | Q_OBJECT |
| 22 | Q_INTERFACES(Solid::Ifaces::StorageAccess) |
| 23 | |
| 24 | public: |
| 25 | FakeStorageAccess(FakeDevice *device); |
| 26 | ~FakeStorageAccess() override; |
| 27 | |
| 28 | bool isAccessible() const override; |
| 29 | QString filePath() const override; |
| 30 | bool isIgnored() const override; |
| 31 | bool isEncrypted() const override; |
| 32 | public Q_SLOTS: |
| 33 | bool setup() override; |
| 34 | bool teardown() override; |
| 35 | |
| 36 | Q_SIGNALS: |
| 37 | void accessibilityChanged(bool accessible, const QString &udi) override; |
| 38 | void setupDone(Solid::ErrorType error, QVariant errorData, const QString &udi) override; |
| 39 | void teardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi) override; |
| 40 | void setupRequested(const QString &udi) override; |
| 41 | void teardownRequested(const QString &udi) override; |
| 42 | void checkRequested(const QString &udi) override; |
| 43 | void checkDone(Solid::ErrorType error, QVariant errorData, const QString &udi) override; |
| 44 | void repairRequested(const QString &udi) override; |
| 45 | void repairDone(Solid::ErrorType error, QVariant errorData, const QString &udi) override; |
| 46 | |
| 47 | private Q_SLOTS: |
| 48 | void onPropertyChanged(const QMap<QString, int> &changes); |
| 49 | }; |
| 50 | } |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | #endif // SOLID_BACKENDS_FAKEHW_FAKESTORAGEACCESS_H |
| 55 | |