File indexing completed on 2024-04-28 05:45:54
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_RESTOREFILESYSTEMJOB_H 0009 #define KPMCORE_RESTOREFILESYSTEMJOB_H 0010 0011 #include "jobs/job.h" 0012 0013 #include <QString> 0014 0015 class Partition; 0016 class Device; 0017 class Report; 0018 0019 /** Restore a FileSystem. 0020 0021 Restores a FileSystem from a file to a given Partition on a given Device. 0022 0023 @author Volker Lanz <vl@fidra.de> 0024 */ 0025 class RestoreFileSystemJob : public Job 0026 { 0027 public: 0028 RestoreFileSystemJob(Device& targetdevice, Partition& targetpartition, const QString& filename); 0029 0030 public: 0031 bool run(Report& parent) override; 0032 qint32 numSteps() const override; 0033 QString description() const override; 0034 0035 protected: 0036 Partition& targetPartition() { 0037 return m_TargetPartition; 0038 } 0039 const Partition& targetPartition() const { 0040 return m_TargetPartition; 0041 } 0042 0043 Device& targetDevice() { 0044 return m_TargetDevice; 0045 } 0046 const Device& targetDevice() const { 0047 return m_TargetDevice; 0048 } 0049 0050 const QString& fileName() const { 0051 return m_FileName; 0052 } 0053 0054 private: 0055 Device& m_TargetDevice; 0056 Partition& m_TargetPartition; 0057 QString m_FileName; 0058 }; 0059 0060 #endif