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

Ubuntu Download Manager 1.2.0 A session-wide downloading service |

downloads_list_impl.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_IMPL_H
20 #define UBUNTU_DOWNLOADMANAGER_CLIENT_DOWNLOAD_LIST_IMPL_H
21
22 #include <ubuntu/transfers/visibility.h>
23 #include "downloads_list.h"
24
25 namespace Ubuntu {
26
27 namespace DownloadManager {
28
29 class Error;
30 class Download;
31
32 class UBUNTU_TRANSFERS_PRIVATE DownloadsListImpl : public DownloadsList {
33 Q_OBJECT
34
35 public:
36 DownloadsListImpl(QObject* parent = 0);
37 DownloadsListImpl(const QList<QSharedPointer<Download >> downs, QObject* parent = 0);
38 DownloadsListImpl(Error* err, QObject* parent = 0);
39 virtual ~DownloadsListImpl();
40
41 virtual QList<QSharedPointer<Download> > downloads() const;
42 virtual bool isError() const;
43 virtual Error* error() const;
44
45 private:
46 QList<QSharedPointer<Download> > _downs;
47 Error* _lastError = nullptr;
48 };
49
50 } // Ubuntu
51
52 } // DownloadManager
53
54 #endif // UBUNTU_DOWNLOADMANAGER_CLIENT_DOWNLOAD_LIST_IMPL_H
QObject
Ubuntu
Definition: download.h:26
downloads_list.h