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_COPYFILESYSTEMJOB_H 0009 #define KPMCORE_COPYFILESYSTEMJOB_H 0010 0011 #include "jobs/job.h" 0012 0013 #include <QtGlobal> 0014 0015 class Partition; 0016 class Device; 0017 class Report; 0018 0019 class QString; 0020 0021 /** Copy a FileSystem. 0022 0023 Copy a FileSystem on a given Partition and Device to another Partition on a (possibly other) Device. 0024 0025 @author Volker Lanz <vl@fidra.de> 0026 */ 0027 class CopyFileSystemJob : public Job 0028 { 0029 public: 0030 CopyFileSystemJob(Device& targetdevice, Partition& targetpartition, Device& sourcedevice, Partition& sourcepartition); 0031 0032 public: 0033 bool run(Report& parent) override; 0034 qint32 numSteps() const override; 0035 QString description() const override; 0036 0037 protected: 0038 Partition& targetPartition() { 0039 return m_TargetPartition; 0040 } 0041 const Partition& targetPartition() const { 0042 return m_TargetPartition; 0043 } 0044 0045 Device& targetDevice() { 0046 return m_TargetDevice; 0047 } 0048 const Device& targetDevice() const { 0049 return m_TargetDevice; 0050 } 0051 0052 Partition& sourcePartition() { 0053 return m_SourcePartition; 0054 } 0055 const Partition& sourcePartition() const { 0056 return m_SourcePartition; 0057 } 0058 0059 Device& sourceDevice() { 0060 return m_SourceDevice; 0061 } 0062 const Device& sourceDevice() const { 0063 return m_SourceDevice; 0064 } 0065 0066 private: 0067 Device& m_TargetDevice; 0068 Partition& m_TargetPartition; 0069 Device& m_SourceDevice; 0070 Partition& m_SourcePartition; 0071 }; 0072 0073 #endif