File indexing completed on 2024-04-28 05:45:53

0001 /*
0002     SPDX-FileCopyrightText: 2008-2010 Volker Lanz <vl@fidra.de>
0003     SPDX-FileCopyrightText: 2016 Andrius Štikonas <andrius@stikonas.eu>
0004 
0005     SPDX-License-Identifier: GPL-3.0-or-later
0006 */
0007 
0008 #ifndef KPMCORE_DELETEFILESYSTEMJOB_H
0009 #define KPMCORE_DELETEFILESYSTEMJOB_H
0010 
0011 #include "jobs/job.h"
0012 
0013 class Partition;
0014 class Device;
0015 class Report;
0016 
0017 class QString;
0018 
0019 /** Delete a FileSystem.
0020 
0021     Delete and clobber the FileSystem on the given Partition on the given Device.
0022 
0023     @author Volker Lanz <vl@fidra.de>
0024 */
0025 class DeleteFileSystemJob : public Job
0026 {
0027 public:
0028     DeleteFileSystemJob(Device& d, Partition& p);
0029 
0030 public:
0031     bool run(Report& parent) override;
0032     QString description() const override;
0033 
0034 protected:
0035     Partition& partition() {
0036         return m_Partition;
0037     }
0038     const Partition& partition() const {
0039         return m_Partition;
0040     }
0041 
0042     Device& device() {
0043         return m_Device;
0044     }
0045     const Device& device() const {
0046         return m_Device;
0047     }
0048 
0049 private:
0050     Device& m_Device;
0051     Partition& m_Partition;
0052 };
0053 
0054 #endif