Changeset View
Changeset View
Standalone View
Standalone View
src/core/jobs/downloadjob.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | Copyright (C) 2016 Dan Leinir Turthra Jensen <admin@leinir.dk> | ||||
3 | | ||||
4 | This library is free software; you can redistribute it and/or | ||||
5 | modify it under the terms of the GNU Lesser General Public | ||||
6 | License as published by the Free Software Foundation; either | ||||
7 | version 2.1 of the License, or (at your option) any later version. | ||||
8 | | ||||
9 | This library is distributed in the hope that it will be useful, | ||||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
12 | Lesser General Public License for more details. | ||||
13 | | ||||
14 | You should have received a copy of the GNU Lesser General Public | ||||
15 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||||
16 | */ | ||||
17 | | ||||
18 | #ifndef DOWNLOADJOB_H | ||||
19 | #define DOWNLOADJOB_H | ||||
20 | | ||||
21 | #include "filecopyjob.h" | ||||
22 | | ||||
23 | namespace KNSCore | ||||
24 | { | ||||
25 | | ||||
26 | class DownloadJob : public FileCopyJob | ||||
27 | { | ||||
28 | Q_OBJECT | ||||
29 | public: | ||||
30 | explicit DownloadJob(const QUrl& source, const QUrl& destination, int permissions=-1, JobFlags flags = DefaultFlags, QObject* parent = 0); | ||||
31 | explicit DownloadJob(QObject* parent = 0); | ||||
32 | virtual ~DownloadJob(); | ||||
33 | | ||||
34 | Q_SCRIPTABLE virtual void start(); | ||||
35 | | ||||
36 | protected Q_SLOTS: | ||||
37 | void handleWorkerCompleted(); | ||||
38 | private: | ||||
39 | class Private; | ||||
40 | Private* d; | ||||
41 | }; | ||||
42 | | ||||
43 | } | ||||
44 | | ||||
45 | #endif//DOWNLOADJOB_H |