1 /*
2     SPDX-FileCopyrightText: 2008-2010 Volker Lanz <vl@fidra.de>
3     SPDX-FileCopyrightText: 2016 Andrius Štikonas <andrius@stikonas.eu>
4 
5     SPDX-License-Identifier: GPL-3.0-or-later
6 */
7 
8 #ifndef KPMCORE_BACKUPFILESYSTEMJOB_H
9 #define KPMCORE_BACKUPFILESYSTEMJOB_H
10 
11 #include "jobs/job.h"
12 
13 #include <QString>
14 
15 class Partition;
16 class Device;
17 class Report;
18 
19 /** Back up a FileSystem.
20 
21     Backs up a FileSystem from a given Device and Partition to a file with the given filename.
22 
23     @author Volker Lanz <vl@fidra.de>
24 */
25 class BackupFileSystemJob : public Job
26 {
27 public:
28     BackupFileSystemJob(Device& sourcedevice, Partition& sourcepartition, const QString& filename);
29 
30 public:
31     bool run(Report& parent) override;
32     qint32 numSteps() const override;
33     QString description() const override;
34 
35 protected:
sourcePartition()36     Partition& sourcePartition() {
37         return m_SourcePartition;
38     }
sourcePartition()39     const Partition& sourcePartition() const {
40         return m_SourcePartition;
41     }
42 
sourceDevice()43     Device& sourceDevice() {
44         return m_SourceDevice;
45     }
sourceDevice()46     const Device& sourceDevice() const {
47         return m_SourceDevice;
48     }
49 
fileName()50     const QString& fileName() const {
51         return m_FileName;
52     }
53 
54 private:
55     Device& m_SourceDevice;
56     Partition& m_SourcePartition;
57     QString m_FileName;
58 };
59 
60 #endif
61