2020-09-30 23:58:54 +01:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2010 Volker Lanz <vl@fidra.de>
|
|
|
|
SPDX-FileCopyrightText: 2016-2018 Andrius Štikonas <andrius@stikonas.eu>
|
|
|
|
SPDX-FileCopyrightText: 2019 Yuri Chornoivan <yurchor@ukr.net>
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2020-09-30 23:58:54 +01:00
|
|
|
SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef KPMCORE_DUMMYDEVICE_H
|
2017-09-10 20:12:52 +01:00
|
|
|
#define KPMCORE_DUMMYDEVICE_H
|
2015-06-04 01:29:22 +01:00
|
|
|
|
|
|
|
#include "backend/corebackenddevice.h"
|
|
|
|
|
2016-04-18 17:14:31 +01:00
|
|
|
#include <QtGlobal>
|
2015-06-04 01:29:22 +01:00
|
|
|
|
|
|
|
class Partition;
|
|
|
|
class PartitionTable;
|
|
|
|
class Report;
|
|
|
|
class CoreBackendPartitionTable;
|
|
|
|
|
|
|
|
class DummyDevice : public CoreBackendDevice
|
|
|
|
{
|
2017-09-11 00:29:30 +01:00
|
|
|
Q_DISABLE_COPY(DummyDevice)
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2015-07-13 15:16:36 +01:00
|
|
|
public:
|
2019-12-09 16:09:53 +00:00
|
|
|
explicit DummyDevice(const QString& deviceNode);
|
2015-07-13 15:16:36 +01:00
|
|
|
~DummyDevice();
|
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
|
|
|
bool open() override;
|
|
|
|
bool openExclusive() override;
|
|
|
|
bool close() override;
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2018-03-31 21:49:20 +01:00
|
|
|
std::unique_ptr<CoreBackendPartitionTable> openPartitionTable() override;
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2016-05-17 18:01:31 +01:00
|
|
|
bool createPartitionTable(Report& report, const PartitionTable& ptable) override;
|
2015-06-04 01:29:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|