Lomiri Download Manager
0.1.1
A session-wide downloading service
Loading...
Searching...
No Matches
manager.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2013-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
#include <
lomiri/download_manager/manager_impl.h
>
20
#include <
lomiri/download_manager/manager.h
>
21
22
namespace
{
23
const
QString DOWNLOAD_SERVICE =
"com.lomiri.applications.Downloader"
;
24
}
25
26
namespace
Lomiri
{
27
28
namespace
DownloadManager {
29
30
Manager*
31
Manager::createSessionManager
(
const
QString& path,
QObject
* parent) {
32
if
(path.isEmpty()) {
33
return
new
ManagerImpl(QDBusConnection::sessionBus(), DOWNLOAD_SERVICE, parent);
34
}
else
{
35
return
new
ManagerImpl(QDBusConnection::sessionBus(), path, parent);
36
}
37
}
38
39
Manager
*
40
Manager::createSystemManager
(
const
QString& path,
QObject
* parent) {
41
if
(path.isEmpty()) {
42
return
new
ManagerImpl(QDBusConnection::systemBus(), DOWNLOAD_SERVICE, parent);
43
}
else
{
44
return
new
ManagerImpl(QDBusConnection::systemBus(), path, parent);
45
}
46
}
47
48
49
}
// DownloadManager
50
51
}
// Lomiri
Lomiri::DownloadManager::Manager
The Manager class is the entry point of the download manager API and allows the client to create down...
Definition
manager.h:80
Lomiri::DownloadManager::Manager::createSessionManager
static Manager * createSessionManager(const QString &path="", QObject *parent=0)
Definition
manager.cpp:31
Lomiri::DownloadManager::Manager::createSystemManager
static Manager * createSystemManager(const QString &path="", QObject *parent=0)
Definition
manager.cpp:40
QObject
manager.h
manager_impl.h
Lomiri
Definition
download.h:26
src
downloads
client
lomiri
download_manager
manager.cpp
Generated on Tue Jan 16 2024 00:00:00 for Lomiri Download Manager by
1.10.0