File indexing completed on 2024-05-12 05:48:28
0001 /* 0002 SPDX-FileCopyrightText: 2017-2018 Andrius Štikonas <andrius@stikonas.eu> 0003 SPDX-FileCopyrightText: 2019 Yuri Chornoivan <yurchor@ukr.net> 0004 0005 SPDX-License-Identifier: GPL-3.0-or-later 0006 */ 0007 0008 #ifndef SFDISKDEVICE__H 0009 #define SFDISKDEVICE__H 0010 0011 #include "backend/corebackenddevice.h" 0012 #include "core/device.h" 0013 0014 #include <QtGlobal> 0015 0016 class Partition; 0017 class PartitionTable; 0018 class Report; 0019 class CoreBackendPartitionTable; 0020 0021 class SfdiskDevice : public CoreBackendDevice 0022 { 0023 Q_DISABLE_COPY(SfdiskDevice) 0024 0025 public: 0026 explicit SfdiskDevice(const Device& d); 0027 ~SfdiskDevice(); 0028 0029 public: 0030 bool open() override; 0031 bool openExclusive() override; 0032 bool close() override; 0033 0034 std::unique_ptr<CoreBackendPartitionTable> openPartitionTable() override; 0035 0036 bool createPartitionTable(Report& report, const PartitionTable& ptable) override; 0037 0038 private: 0039 const Device *m_device; 0040 }; 0041 0042 #endif