File indexing completed on 2024-04-14 05:39:27
0001 // SPDX-FileCopyrightText: 2020 Simon Persson <simon.persson@mykolab.com> 0002 // 0003 // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0004 0005 #ifndef RSYNCJOB_H 0006 #define RSYNCJOB_H 0007 0008 #include "backupjob.h" 0009 0010 #include <KProcess> 0011 #include <QElapsedTimer> 0012 0013 class KupDaemon; 0014 0015 class RsyncJob : public BackupJob 0016 { 0017 Q_OBJECT 0018 0019 public: 0020 RsyncJob(BackupPlan &pBackupPlan, const QString &pDestinationPath, const QString &pLogFilePath, KupDaemon *pKupDaemon); 0021 0022 protected slots: 0023 void performJob() override; 0024 0025 protected slots: 0026 void slotRsyncStarted(); 0027 void slotRsyncFinished(int pExitCode, QProcess::ExitStatus pExitStatus); 0028 void slotReadRsyncOutput(); 0029 0030 protected: 0031 bool doKill() override; 0032 bool doSuspend() override; 0033 bool doResume() override; 0034 0035 bool performMigration(); 0036 0037 KProcess mRsyncProcess; 0038 QElapsedTimer mInfoRateLimiter; 0039 }; 0040 0041 #endif // RSYNCJOB_H