File indexing completed on 2024-05-05 05:48:43
0001 /* 0002 SPDX-FileCopyrightText: 2008-2010 Volker Lanz <vl@fidra.de> 0003 SPDX-FileCopyrightText: 2015 Chris Campbell <c.j.campbell@ed.ac.uk> 0004 SPDX-FileCopyrightText: 2016-2018 Andrius Štikonas <andrius@stikonas.eu> 0005 SPDX-FileCopyrightText: 2020 Arnaud Ferraris <arnaud.ferraris@collabora.com> 0006 SPDX-FileCopyrightText: 2020 Gaël PORTAY <gael.portay@collabora.com> 0007 0008 SPDX-License-Identifier: GPL-3.0-or-later 0009 */ 0010 0011 #ifndef KPMCORE_EXTENDED_H 0012 #define KPMCORE_EXTENDED_H 0013 0014 #include "util/libpartitionmanagerexport.h" 0015 0016 #include "fs/filesystem.h" 0017 0018 #include <QtGlobal> 0019 0020 class QString; 0021 0022 namespace FS 0023 { 0024 /** An extended file system. 0025 0026 A FileSystem for an extended Partition. Of course, extended partitions do not actually have 0027 a file system, but we need this to be able to create, grow, shrink or move them. 0028 0029 @author Volker Lanz <vl@fidra.de> 0030 */ 0031 0032 class LIBKPMCORE_EXPORT extended : public FileSystem 0033 { 0034 public: 0035 extended(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label, const QVariantMap& features = {}); 0036 0037 public: 0038 0039 bool create(Report&, const QString&) override; 0040 0041 CommandSupportType supportCreate() const override { 0042 return m_Create; 0043 } 0044 CommandSupportType supportGrow() const override { 0045 return m_Grow; 0046 } 0047 CommandSupportType supportShrink() const override { 0048 return m_Shrink; 0049 } 0050 CommandSupportType supportMove() const override { 0051 return m_Move; 0052 } 0053 0054 bool supportToolFound() const override { 0055 return true; 0056 } 0057 0058 public: 0059 static CommandSupportType m_Create; 0060 static CommandSupportType m_Grow; 0061 static CommandSupportType m_Shrink; 0062 static CommandSupportType m_Move; 0063 }; 0064 } 0065 0066 #endif