File indexing completed on 2024-05-05 05:48:44
0001 /* 0002 SPDX-FileCopyrightText: 2008-2010 Volker Lanz <vl@fidra.de> 0003 SPDX-FileCopyrightText: 2013-2017 Andrius Štikonas <andrius@stikonas.eu> 0004 SPDX-FileCopyrightText: 2015 Chris Campbell <c.j.campbell@ed.ac.uk> 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_HFS_H 0012 #define KPMCORE_HFS_H 0013 0014 #include "util/libpartitionmanagerexport.h" 0015 0016 #include "fs/filesystem.h" 0017 0018 #include <QtGlobal> 0019 0020 class Report; 0021 0022 class QString; 0023 0024 namespace FS 0025 { 0026 /** An hfs file system. 0027 @author Volker Lanz <vl@fidra.de> 0028 */ 0029 class LIBKPMCORE_EXPORT hfs : public FileSystem 0030 { 0031 public: 0032 hfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label, const QVariantMap& features = {}); 0033 0034 public: 0035 void init() override; 0036 0037 bool check(Report& report, const QString& deviceNode) const override; 0038 bool create(Report& report, const QString& deviceNode) override; 0039 0040 CommandSupportType supportGetUsed() const override { 0041 return m_GetUsed; 0042 } 0043 CommandSupportType supportGetLabel() const override { 0044 return m_GetLabel; 0045 } 0046 CommandSupportType supportCreate() const override { 0047 return m_Create; 0048 } 0049 CommandSupportType supportShrink() const override { 0050 return m_Shrink; 0051 } 0052 CommandSupportType supportMove() const override { 0053 return m_Move; 0054 } 0055 CommandSupportType supportCheck() const override { 0056 return m_Check; 0057 } 0058 CommandSupportType supportCopy() const override { 0059 return m_Copy; 0060 } 0061 CommandSupportType supportBackup() const override { 0062 return m_Backup; 0063 } 0064 0065 qint64 maxCapacity() const override; 0066 int maxLabelLength() const override; 0067 SupportTool supportToolName() const override; 0068 bool supportToolFound() const override; 0069 0070 public: 0071 static CommandSupportType m_GetUsed; 0072 static CommandSupportType m_GetLabel; 0073 static CommandSupportType m_Create; 0074 static CommandSupportType m_Shrink; 0075 static CommandSupportType m_Move; 0076 static CommandSupportType m_Check; 0077 static CommandSupportType m_Copy; 0078 static CommandSupportType m_Backup; 0079 }; 0080 } 0081 0082 #endif