@startuml
'https://plantuml.com/class-diagram

class Device
class FSTab
class Utils
class Process
class QThread
class AsyncTask {
        virtual void readStandardOutput();
        virtual void readAllStandardError();
}
class RsyncTask

AsyncTask --|> QThread
RsyncTask --|> AsyncTask
OSTreeTask --|> AsyncTask

Interface SystemRecovery {
    virtual bool supported(FSTabInfoList &fsTabInfoList) = 0;
    virtual QString getDefaultBackupDeviceUUID(const QString &rootPath) = 0;
    virtual ErrorCode systemBackup(SystemBackupRequest &request) = 0;
    virtual ErrorCode systemRestore(SystemRestoreRequest &request) = 0;
    virtual ErrorCode createUImg(const QString &backupDir) = 0;
    virtual BackupInfoList listSystemBackup(QStringList &destUUIDs) = 0;
    virtual bool supported(FSTabInfoList &fsTabInfoList) = 0;
    virtual QString getDefaultBackupDeviceUUID(const QString &rootPath) = 0;
    virtual ErrorCode systemBackup(SystemBackupRequest &request) = 0;
    virtual ErrorCode systemRestore(SystemRestoreRequest &request) = 0;
    virtual ErrorCode createUImg(const QString &backupDir) = 0;
    virtual BackupInfoList listSystemBackup(QStringList &destUUIDs) = 0;
}

class RsyncSystem {

}

class OSTreeSystem {

}

RsyncSystem --|> SystemRecovery
RsyncSystem --*RsyncTask
OSTreeSystem --|> SystemRecovery
OSTreeSystem --* OSTreeTask

interface UserDataRecovery {

}

class RsyncUserData {

}

RsyncUserData --|> UserDataRecovery
RsyncUserData --* RsyncTask

class RecoveryService {

}
RecoveryService --*RsyncSystem
RecoveryService --*OSTreeSystem

@enduml