File indexing completed on 2024-05-05 05:48:43

0001 /*
0002     SPDX-FileCopyrightText: 2008-2011 Volker Lanz <vl@fidra.de>
0003     SPDX-FileCopyrightText: 2008 Laurent Montel <montel@kde.org>
0004     SPDX-FileCopyrightText: 2013-2019 Andrius Štikonas <andrius@stikonas.eu>
0005     SPDX-FileCopyrightText: 2015 Chris Campbell <c.j.campbell@ed.ac.uk>
0006     SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
0007     SPDX-FileCopyrightText: 2020 Arnaud Ferraris <arnaud.ferraris@collabora.com>
0008     SPDX-FileCopyrightText: 2020 Gaël PORTAY <gael.portay@collabora.com>
0009 
0010     SPDX-License-Identifier: GPL-3.0-or-later
0011 */
0012 
0013 #ifndef KPMCORE_FAT16_H
0014 #define KPMCORE_FAT16_H
0015 
0016 #include "fs/fat12.h"
0017 
0018 class Report;
0019 
0020 class QString;
0021 
0022 namespace FS
0023 {
0024 /** A fat16 file system.
0025     @author Volker Lanz <vl@fidra.de>
0026  */
0027 class LIBKPMCORE_EXPORT fat16 : public fat12
0028 {
0029 public:
0030     fat16(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label, const QVariantMap& features = {}, FileSystem::Type type = FileSystem::Type::Fat16);
0031 
0032 public:
0033     void init() override;
0034 
0035     bool create(Report& report, const QString& deviceNode) override;
0036     bool resize(Report& report, const QString& deviceNode, qint64 length) const override;
0037 
0038     CommandSupportType supportGrow() const override {
0039         return m_Grow;
0040     }
0041     CommandSupportType supportShrink() const override {
0042         return m_Shrink;
0043     }
0044 
0045     qint64 minCapacity() const override;
0046     qint64 maxCapacity() const override;
0047     bool supportToolFound() const override;
0048 };
0049 }
0050 
0051 #endif