1 /*
2     SPDX-FileCopyrightText: 2010 Volker Lanz <vl@fidra.de>
3     SPDX-FileCopyrightText: 2014-2018 Andrius Štikonas <andrius@stikonas.eu>
4     SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
5 
6     SPDX-License-Identifier: GPL-3.0-or-later
7 */
8 
9 #include "plugins/dummy/dummydevice.h"
10 #include "plugins/dummy/dummypartitiontable.h"
11 
12 #include "core/partitiontable.h"
13 
14 #include "util/globallog.h"
15 #include "util/report.h"
16 
DummyDevice(const QString & deviceNode)17 DummyDevice::DummyDevice(const QString& deviceNode) :
18     CoreBackendDevice(deviceNode)
19 {
20 }
21 
~DummyDevice()22 DummyDevice::~DummyDevice()
23 {
24 }
25 
open()26 bool DummyDevice::open()
27 {
28     return true;
29 }
30 
openExclusive()31 bool DummyDevice::openExclusive()
32 {
33     return true;
34 }
35 
close()36 bool DummyDevice::close()
37 {
38     return true;
39 }
40 
openPartitionTable()41 std::unique_ptr<CoreBackendPartitionTable> DummyDevice::openPartitionTable()
42 {
43     return std::make_unique<DummyPartitionTable>(DummyPartitionTable());
44 }
45 
createPartitionTable(Report & report,const PartitionTable & ptable)46 bool DummyDevice::createPartitionTable(Report& report, const PartitionTable& ptable)
47 {
48     Q_UNUSED(report)
49     Q_UNUSED(ptable)
50 
51     return true;
52 }
53