File: edexecutor.h

package info (click to toggle)
kup-backup 0.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,576 kB
  • sloc: cpp: 8,422; xml: 311; makefile: 6; sh: 3
file content (44 lines) | stat: -rw-r--r-- 1,063 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// SPDX-FileCopyrightText: 2020 Simon Persson <simon.persson@mykolab.com>
//
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL

#ifndef EDEXECUTOR_H
#define EDEXECUTOR_H

#include "planexecutor.h"

#include <Solid/Device>
#include <Solid/StorageAccess>

class BackupPlan;

// Plan executor that stores the backup to an external disk.
// Uses libsolid to monitor for when it becomes available.
class EDExecutor : public PlanExecutor
{
    Q_OBJECT

public:
    EDExecutor(BackupPlan *pPlan, KupDaemon *pKupDaemon);

public slots:
    void checkStatus() override;
    void showBackupFiles() override;
    void showBackupPurger() override;

protected slots:
    void deviceAdded(const QString &pUdi);
    void deviceRemoved(const QString &pUdi);
    void updateAccessibility();
    void startBackup() override;

protected:
    bool ensureAccessible(bool &pReturnLater);
    Solid::StorageAccess *mStorageAccess;
    QString mCurrentUdi;
    bool mWantsToRunBackup;
    bool mWantsToShowFiles;
    bool mWantsToPurge;
};

#endif // EDEXECUTOR_H