16
|
1 |
/**
|
|
2 |
This file is part of CWRT package **
|
|
3 |
|
|
4 |
Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). **
|
|
5 |
|
|
6 |
This program is free software: you can redistribute it and/or modify
|
|
7 |
it under the terms of the GNU (Lesser) General Public License as
|
|
8 |
published by the Free Software Foundation, version 2.1 of the License.
|
|
9 |
This program is distributed in the hope that it will be useful, but
|
|
10 |
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. You should have
|
|
13 |
received a copy of the GNU (Lesser) General Public License along
|
|
14 |
with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
15 |
*/
|
|
16 |
|
|
17 |
#ifndef PARALLELDOWNLOADMANAGER_H
|
|
18 |
#define PARALLELDOWNLOADMANAGER_H
|
|
19 |
|
|
20 |
#include "dmcommon.h"
|
|
21 |
#include "dmpimpl.h"
|
|
22 |
#include "downloadevent.h"
|
|
23 |
#include <QObject>
|
|
24 |
|
|
25 |
// forward declarations
|
|
26 |
class ClientDownload;
|
|
27 |
class QNetworkReply;
|
|
28 |
class ParallelDownloadManagerPrivate;
|
|
29 |
|
|
30 |
// class declaration
|
|
31 |
class ParallelDownloadManager
|
|
32 |
{
|
|
33 |
DM_DECLARE_PRIVATE(ParallelDownloadManager); // private implementation
|
|
34 |
public:
|
|
35 |
ParallelDownloadManager();
|
|
36 |
virtual ~ParallelDownloadManager();
|
|
37 |
|
|
38 |
// returns all the current downloads
|
|
39 |
QList<Download *>& currentDownloads();
|
|
40 |
// finds a download provided id if exists
|
|
41 |
Download* findDownload(int dlId);
|
|
42 |
// cancels all the downloads and removes from the list
|
|
43 |
void removeAll();
|
|
44 |
// cancels and removes the download from list
|
|
45 |
void removeOne(Download *dl);
|
|
46 |
// pauses all the downloads which are in progress
|
|
47 |
void pauseAll();
|
|
48 |
// resumes all the downloads which are paused
|
|
49 |
void resumeAll();
|
|
50 |
// Adds to the download list
|
|
51 |
void addToParallelDownload(Download* dl);
|
|
52 |
};
|
|
53 |
|
|
54 |
#endif
|