1/*
2 SPDX-FileCopyrightText: 2016 Dan Leinir Turthra Jensen <admin@leinir.dk>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7#ifndef DOWNLOADJOB_H
8#define DOWNLOADJOB_H
9
10#include "filecopyjob.h"
11
12#include <memory>
13
14namespace KNSCore
15{
16class DownloadJobPrivate;
17class DownloadJob : public FileCopyJob
18{
19 Q_OBJECT
20public:
21 explicit DownloadJob(const QUrl &source, const QUrl &destination, int permissions = -1, JobFlags flags = DefaultFlags, QObject *parent = nullptr);
22 explicit DownloadJob(QObject *parent = nullptr);
23 ~DownloadJob() override;
24
25 Q_SCRIPTABLE void start() override;
26
27protected Q_SLOTS:
28 void handleWorkerCompleted();
29 void handleWorkerError(const QString &error);
30
31private:
32 const std::unique_ptr<DownloadJobPrivate> d;
33};
34
35}
36
37#endif // DOWNLOADJOB_H
38

source code of knewstuff/src/core/jobs/downloadjob.h