Lomiri Download Manager 0.1.1
A session-wide downloading service
 
Loading...
Searching...
No Matches
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 LOMIRI_DOWNLOADMANAGER_CLIENT_GROUP_DOWNLOAD_H
20#define LOMIRI_DOWNLOADMANAGER_CLIENT_GROUP_DOWNLOAD_H
21
22#include <QDBusObjectPath>
23#include <QObject>
24
25namespace Lomiri {
26
27namespace DownloadManager {
28
29class Error;
30class ManagerPrivate;
31class GroupDownloadPrivate;
32class 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} // Lomiri
62
63#endif // GROUP_DOWNLOAD_H
The Error class is the base class that represents an error in the download manager API.
Definition error.h:55
GroupDownload(Error *err, QObject *parent=0)