1 /* 2 SPDX-FileCopyrightText: 2008-2010 Volker Lanz <vl@fidra.de> 3 SPDX-FileCopyrightText: 2013-2017 Andrius Štikonas <andrius@stikonas.eu> 4 SPDX-FileCopyrightText: 2015 Chris Campbell <c.j.campbell@ed.ac.uk> 5 SPDX-FileCopyrightText: 2020 Arnaud Ferraris <arnaud.ferraris@collabora.com> 6 SPDX-FileCopyrightText: 2020 Gaël PORTAY <gael.portay@collabora.com> 7 8 SPDX-License-Identifier: GPL-3.0-or-later 9 */ 10 11 #ifndef KPMCORE_HFS_H 12 #define KPMCORE_HFS_H 13 14 #include "util/libpartitionmanagerexport.h" 15 16 #include "fs/filesystem.h" 17 18 #include <QtGlobal> 19 20 class Report; 21 22 class QString; 23 24 namespace FS 25 { 26 /** An hfs file system. 27 @author Volker Lanz <vl@fidra.de> 28 */ 29 class LIBKPMCORE_EXPORT hfs : public FileSystem 30 { 31 public: 32 hfs(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label, const QVariantMap& features = {}); 33 34 public: 35 void init() override; 36 37 bool check(Report& report, const QString& deviceNode) const override; 38 bool create(Report& report, const QString& deviceNode) override; 39 supportGetUsed()40 CommandSupportType supportGetUsed() const override { 41 return m_GetUsed; 42 } supportGetLabel()43 CommandSupportType supportGetLabel() const override { 44 return m_GetLabel; 45 } supportCreate()46 CommandSupportType supportCreate() const override { 47 return m_Create; 48 } supportShrink()49 CommandSupportType supportShrink() const override { 50 return m_Shrink; 51 } supportMove()52 CommandSupportType supportMove() const override { 53 return m_Move; 54 } supportCheck()55 CommandSupportType supportCheck() const override { 56 return m_Check; 57 } supportCopy()58 CommandSupportType supportCopy() const override { 59 return m_Copy; 60 } supportBackup()61 CommandSupportType supportBackup() const override { 62 return m_Backup; 63 } 64 65 qint64 maxCapacity() const override; 66 int maxLabelLength() const override; 67 SupportTool supportToolName() const override; 68 bool supportToolFound() const override; 69 70 public: 71 static CommandSupportType m_GetUsed; 72 static CommandSupportType m_GetLabel; 73 static CommandSupportType m_Create; 74 static CommandSupportType m_Shrink; 75 static CommandSupportType m_Move; 76 static CommandSupportType m_Check; 77 static CommandSupportType m_Copy; 78 static CommandSupportType m_Backup; 79 }; 80 } 81 82 #endif 83