File indexing completed on 2024-05-26 04:05:32

0001 /*
0002     SPDX-FileCopyrightText: 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 #ifndef SOLID_BACKENDS_FAKEHW_FAKESTORAGEACCESS_H
0008 #define SOLID_BACKENDS_FAKEHW_FAKESTORAGEACCESS_H
0009 
0010 #include "fakedeviceinterface.h"
0011 #include <solid/devices/ifaces/storageaccess.h>
0012 
0013 namespace Solid
0014 {
0015 namespace Backends
0016 {
0017 namespace Fake
0018 {
0019 class FakeStorageAccess : public FakeDeviceInterface, virtual public Solid::Ifaces::StorageAccess
0020 {
0021     Q_OBJECT
0022     Q_INTERFACES(Solid::Ifaces::StorageAccess)
0023 
0024 public:
0025     FakeStorageAccess(FakeDevice *device);
0026     ~FakeStorageAccess() override;
0027 
0028     bool isAccessible() const override;
0029     QString filePath() const override;
0030     bool isIgnored() const override;
0031     bool isEncrypted() const override;
0032 public Q_SLOTS:
0033     bool setup() override;
0034     bool teardown() override;
0035 
0036 Q_SIGNALS:
0037     void accessibilityChanged(bool accessible, const QString &udi) override;
0038     void setupDone(Solid::ErrorType error, QVariant errorData, const QString &udi) override;
0039     void teardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi) override;
0040     void setupRequested(const QString &udi) override;
0041     void teardownRequested(const QString &udi) override;
0042 
0043 private Q_SLOTS:
0044     void onPropertyChanged(const QMap<QString, int> &changes);
0045 };
0046 }
0047 }
0048 }
0049 
0050 #endif // SOLID_BACKENDS_FAKEHW_FAKESTORAGEACCESS_H