19 #ifndef UBUNTU_DOWNLOADMANAGER_CLIENT_MANAGER_PENDINGCALL_WATCHER_H
20 #define UBUNTU_DOWNLOADMANAGER_CLIENT_MANAGER_PENDINGCALL_WATCHER_H
22 #include <ubuntu/transfers/visibility.h>
28 namespace DownloadManager {
35 typedef std::function<void(Download*)>
DownloadCb;
38 typedef std::function<void(GroupDownload*)>
GroupCb;
41 class UBUNTU_TRANSFERS_PRIVATE DownloadManagerPCW :
public PendingCallWatcher {
45 DownloadManagerPCW(
const QDBusConnection& conn,
46 const QString& servicePath,
47 const QDBusPendingCall& call,
53 void onFinished(QDBusPendingCallWatcher* watcher);
61 class UBUNTU_TRANSFERS_PRIVATE DownloadsListManagerPCW :
public PendingCallWatcher {
65 DownloadsListManagerPCW(
const QDBusConnection& conn,
66 const QString& servicePath,
67 const QDBusPendingCall& call,
69 DownloadsListCb errCb,
72 void onFinished(QDBusPendingCallWatcher* watcher);
76 DownloadsListCb _errCb;
79 class UBUNTU_TRANSFERS_PRIVATE MetadataDownloadsListManagerPCW :
public PendingCallWatcher {
83 MetadataDownloadsListManagerPCW(
const QDBusConnection& conn,
84 const QString& servicePath,
85 const QDBusPendingCall& call,
88 MetadataDownloadsListCb cb,
89 MetadataDownloadsListCb errCb,
92 void onFinished(QDBusPendingCallWatcher* watcher);
96 const QString& _value;
97 MetadataDownloadsListCb _cb;
98 MetadataDownloadsListCb _errCb;
101 class UBUNTU_TRANSFERS_PRIVATE GroupManagerPCW :
public PendingCallWatcher {
105 GroupManagerPCW(
const QDBusConnection& conn,
106 const QString& servicePath,
107 const QDBusPendingCall& call,
113 void onFinished(QDBusPendingCallWatcher* watcher);
124 #endif // UBUNTU_DOWNLOADMANAGER_CLIENT_MANAGER_PENDINGCALL_WATCHER_H
std::function< void(Download *)> DownloadCb
std::function< void(const QString &, const QString &, DownloadsList *)> MetadataDownloadsListCb
std::function< void(GroupDownload *)> GroupCb
std::function< void(DownloadsList *)> DownloadsListCb