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

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 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_UNFORMATTED_H
0012 #define KPMCORE_UNFORMATTED_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 /** A pseudo file system for unformatted partitions.
0027     @author Volker Lanz <vl@fidra.de>
0028  */
0029 class LIBKPMCORE_EXPORT unformatted : public FileSystem
0030 {
0031 public:
0032     unformatted(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label, const QVariantMap& features = {});
0033 
0034 public:
0035     bool create(Report&, const QString&) override;
0036 
0037     CommandSupportType supportCreate() const override {
0038         return m_Create;
0039     }
0040 
0041     bool supportToolFound() const override {
0042         return true;
0043     }
0044 
0045 public:
0046     static CommandSupportType m_Create;
0047 };
0048 }
0049 
0050 #endif