2015-06-04 01:29:22 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* Copyright (C) 2008, 2010 by Volker Lanz <vl@fidra.de> *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or *
|
|
|
|
* modify it under the terms of the GNU General Public License as *
|
|
|
|
* published by the Free Software Foundation; either version 3 of *
|
|
|
|
* the License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
|
|
|
|
*************************************************************************/
|
|
|
|
|
2017-09-10 20:12:52 +01:00
|
|
|
#if !defined(KPMCORE_DUMMYBACKEND_H)
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2017-09-10 20:12:52 +01:00
|
|
|
#define KPMCORE_DUMMYBACKEND_H
|
2015-06-04 01:29:22 +01:00
|
|
|
|
|
|
|
#include "backend/corebackend.h"
|
|
|
|
|
|
|
|
#include <QList>
|
|
|
|
#include <QVariant>
|
|
|
|
|
|
|
|
class Device;
|
|
|
|
class KPluginFactory;
|
|
|
|
class QString;
|
|
|
|
|
|
|
|
/** Dummy backend plugin that doesn't really do anything.
|
|
|
|
|
2015-07-13 15:16:36 +01:00
|
|
|
@author Volker Lanz <vl@fidra.de>
|
2015-06-04 01:29:22 +01:00
|
|
|
*/
|
|
|
|
class DummyBackend : public CoreBackend
|
|
|
|
{
|
2015-07-13 15:16:36 +01:00
|
|
|
friend class KPluginFactory;
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2015-07-13 15:16:36 +01:00
|
|
|
Q_DISABLE_COPY(DummyBackend)
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2015-07-13 15:16:36 +01:00
|
|
|
private:
|
|
|
|
DummyBackend(QObject* parent, const QList<QVariant>& args);
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2015-07-13 15:16:36 +01:00
|
|
|
public:
|
2016-05-17 18:01:31 +01:00
|
|
|
void initFSSupport() override;
|
|
|
|
|
|
|
|
QList<Device*> scanDevices(bool excludeReadOnly = false) override;
|
2019-02-09 15:40:06 +00:00
|
|
|
QList<Device*> scanDevices(const ScanFlags scanFlags) override;
|
2018-03-31 14:44:40 +01:00
|
|
|
std::unique_ptr<CoreBackendDevice> openDevice(const Device& d) override;
|
|
|
|
std::unique_ptr<CoreBackendDevice> openDeviceExclusive(const Device& d) override;
|
|
|
|
bool closeDevice(std::unique_ptr<CoreBackendDevice> coreDevice) override;
|
2017-12-06 21:33:31 +00:00
|
|
|
Device* scanDevice(const QString& deviceNode) override;
|
2016-05-17 18:01:31 +01:00
|
|
|
FileSystem::Type detectFileSystem(const QString& deviceNode) override;
|
2018-01-31 15:04:55 +00:00
|
|
|
QString readLabel(const QString& deviceNode) const override;
|
|
|
|
QString readUUID(const QString& deviceNode) const override;
|
2015-06-04 01:29:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|