Ubuntu Download Manager  0.3.0
A session-wide downloading service
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator
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 #include <ubuntu/download_manager/common.h>
25 
26 namespace Ubuntu {
27 
28 namespace DownloadManager {
29 
30 class Error;
31 class ManagerPrivate;
32 class GroupDownloadPrivate;
33 class GroupDownload : public QObject {
34  Q_OBJECT
35  Q_DECLARE_PRIVATE(GroupDownload)
36 
37  // allow the manager to create downloads
38  friend class ManagerPrivate;
39  friend class GroupManagerPCW;
40 
41  public:
42 
43  virtual ~GroupDownload();
44  bool isError();
45  Error* error();
46 
47  protected:
48  GroupDownload(Error* err, QObject* parent = 0);
49  GroupDownload(QDBusObjectPath path, QObject* parent = 0);
50 
51  private:
52  // TODO(mandel): move this to pimpl, here to ensure no mem leaks atm
53  Error* _error = NULL;
54  // use pimpl pattern so that users do not have to be recompiled
55  GroupDownloadPrivate* d_ptr;
56 
57 };
58 
59 
60 } // DownloadManager
61 
62 } // Ubuntu
63 
64 #endif // GROUP_DOWNLOAD_H
The Error class is the base class that represents an error in the download manager API...
Definition: error.h:56
GroupDownload(Error *err, QObject *parent=0)