Ubuntu Download Manager  0.3.0
A session-wide downloading service
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator
downloads_list.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014 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_DOWNLOAD_LIST_H
20 #define UBUNTU_DOWNLOADMANAGER_CLIENT_DOWNLOAD_LIST_H
21 
22 #include <QList>
23 #include <QObject>
24 #include <QSharedPointer>
25 #include <ubuntu/download_manager/common.h>
26 
27 namespace Ubuntu {
28 
29 namespace DownloadManager {
30 
31 class Error;
32 class Download;
33 
34 class DOWNLOAD_MANAGER_EXPORT DownloadsList : public QObject {
35  Q_OBJECT
36 
37  public:
38  explicit DownloadsList(QObject* parent = 0)
39  : QObject(parent) {}
40 
41  virtual QList<QSharedPointer<Download> > downloads() const = 0;
42  virtual bool isError() const = 0;
43  virtual Error* error() const = 0;
44 };
45 
46 } // Ubuntu
47 
48 } // DownloadManager
49 
50 #endif // UBUNTU_DOWNLOADMANAGER_CLIENT_DOWNLOAD_LIST_H
The Error class is the base class that represents an error in the download manager API...
Definition: error.h:56