2020-09-29 23:55:11 +01:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2008-2010 Volker Lanz <vl@fidra.de>
|
|
|
|
SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
|
|
|
|
SPDX-FileCopyrightText: 2016 Andrius Štikonas <andrius@stikonas.eu>
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2020-09-29 23:55:11 +01:00
|
|
|
SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
*/
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2020-09-29 23:55:11 +01:00
|
|
|
#ifndef KPMCORE_SHREDFILESYSTEMJOB_H
|
2017-09-10 20:12:52 +01:00
|
|
|
#define KPMCORE_SHREDFILESYSTEMJOB_H
|
2015-06-04 01:29:22 +01:00
|
|
|
|
|
|
|
#include "jobs/job.h"
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
class Partition;
|
|
|
|
class Device;
|
|
|
|
class Report;
|
|
|
|
|
|
|
|
/** Securely delete and shred a FileSystem.
|
|
|
|
|
2015-07-13 15:16:36 +01:00
|
|
|
Shreds (overwrites with random data) a FileSystem on given Partition and Device.
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2015-07-13 15:16:36 +01:00
|
|
|
@author Volker Lanz <vl@fidra.de>
|
2015-06-04 01:29:22 +01:00
|
|
|
*/
|
|
|
|
class ShredFileSystemJob : public Job
|
|
|
|
{
|
2015-07-13 15:16:36 +01:00
|
|
|
public:
|
|
|
|
ShredFileSystemJob(Device& d, Partition& p, bool randomShred);
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2015-07-13 15:16:36 +01:00
|
|
|
public:
|
2016-05-17 18:01:31 +01:00
|
|
|
bool run(Report& parent) override;
|
|
|
|
qint32 numSteps() const override;
|
|
|
|
QString description() const override;
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2015-07-13 15:16:36 +01:00
|
|
|
protected:
|
|
|
|
Partition& partition() {
|
|
|
|
return m_Partition;
|
|
|
|
}
|
|
|
|
const Partition& partition() const {
|
|
|
|
return m_Partition;
|
|
|
|
}
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2015-07-13 15:16:36 +01:00
|
|
|
Device& device() {
|
|
|
|
return m_Device;
|
|
|
|
}
|
|
|
|
const Device& device() const {
|
|
|
|
return m_Device;
|
|
|
|
}
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2015-07-13 15:16:36 +01:00
|
|
|
private:
|
|
|
|
Device& m_Device;
|
|
|
|
Partition& m_Partition;
|
|
|
|
bool m_RandomShred;
|
2015-06-04 01:29:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|