Ubuntu Download Manager: /build/ubuntu-download-manager-git/src/ubuntu-download-manager/src/downloads/client/ubuntu/download_manager/group_download.h Source File

Ubuntu Download Manager 1.2.0 A session-wide downloading service |

group_download.h
Go to the documentation of this file.
1 /*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of version 3 of the GNU Lesser General Public
6 * License as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
17 */
18
19 #ifndef UBUNTU_DOWNLOADMANAGER_CLIENT_GROUP_DOWNLOAD_H
20 #define UBUNTU_DOWNLOADMANAGER_CLIENT_GROUP_DOWNLOAD_H
21
22 #include <QDBusObjectPath>
23 #include <QObject>
24
25 namespace Ubuntu {
26
27 namespace DownloadManager {
28
29 class Error;
30 class ManagerPrivate;
31 class GroupDownloadPrivate;
32 class GroupDownload : public QObject {
33 Q_OBJECT
34 Q_DECLARE_PRIVATE(GroupDownload)
35
36 // allow the manager to create downloads
37 friend class ManagerPrivate;
38 friend class GroupManagerPCW;
39
40 public:
41
42 virtual ~GroupDownload();
43 bool isError();
44 Error* error();
45
46 protected:
47 GroupDownload(Error* err, QObject* parent = 0);
48 GroupDownload(QDBusObjectPath path, QObject* parent = 0);
49
50 private:
51 // TODO(mandel): move this to pimpl, here to ensure no mem leaks atm
52 Error* _error = NULL;
53 // use pimpl pattern so that users do not have to be recompiled
54 GroupDownloadPrivate* d_ptr;
55
56 };
57
58
59 } // DownloadManager
60
61 } // Ubuntu
62
63 #endif // GROUP_DOWNLOAD_H
QObject
Ubuntu
Definition: download.h:26
Ubuntu::DownloadManager::GroupDownload::~GroupDownload
virtual ~GroupDownload()
Definition: group_download.cpp:39
Ubuntu::DownloadManager::GroupDownload::isError
bool isError()
Definition: group_download.cpp:44
Ubuntu::DownloadManager::GroupDownload::error
Error * error()
Definition: group_download.cpp:50
Ubuntu::DownloadManager::Error
The Error class is the base class that represents an error in the download manager API.
Definition: error.h:55
Ubuntu::DownloadManager::GroupDownload::GroupDownload
GroupDownload(Error *err, QObject *parent=0)
Definition: group_download.cpp:26
Ubuntu::DownloadManager::GroupDownload
Definition: group_download.h:32