File indexing completed on 2024-05-12 05:48:27
0001 /* 0002 SPDX-FileCopyrightText: 2008-2010 Volker Lanz <vl@fidra.de> 0003 SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org> 0004 SPDX-FileCopyrightText: 2016-2019 Andrius Štikonas <andrius@stikonas.eu> 0005 0006 SPDX-License-Identifier: GPL-3.0-or-later 0007 */ 0008 0009 #ifndef KPMCORE_DUMMYBACKEND_H 0010 #define KPMCORE_DUMMYBACKEND_H 0011 0012 #include "backend/corebackend.h" 0013 0014 #include <QList> 0015 #include <QVariant> 0016 0017 class Device; 0018 class KPluginFactory; 0019 class QString; 0020 0021 /** Dummy backend plugin that doesn't really do anything. 0022 0023 @author Volker Lanz <vl@fidra.de> 0024 */ 0025 class DummyBackend : public CoreBackend 0026 { 0027 Q_DISABLE_COPY(DummyBackend) 0028 0029 public: 0030 DummyBackend(QObject* parent, const QList<QVariant>& args); 0031 0032 public: 0033 void initFSSupport() override; 0034 0035 QList<Device*> scanDevices(bool excludeReadOnly = false) override; 0036 QList<Device*> scanDevices(const ScanFlags scanFlags) override; 0037 std::unique_ptr<CoreBackendDevice> openDevice(const Device& d) override; 0038 std::unique_ptr<CoreBackendDevice> openDeviceExclusive(const Device& d) override; 0039 bool closeDevice(std::unique_ptr<CoreBackendDevice> coreDevice) override; 0040 Device* scanDevice(const QString& deviceNode) override; 0041 FileSystem::Type detectFileSystem(const QString& deviceNode) override; 0042 QString readLabel(const QString& deviceNode) const override; 0043 QString readUUID(const QString& deviceNode) const override; 0044 }; 0045 0046 #endif