11 #ifndef DOWNLOADTRACKERADAPTOR_H_1374434371
12 #define DOWNLOADTRACKERADAPTOR_H_1374434371
14 #include <QtCore/QObject>
15 #include <QtCore/QByteArray>
16 #include <QtCore/QList>
17 #include <QtCore/QMap>
18 #include <QtCore/QString>
19 #include <QtCore/QStringList>
20 #include <QtCore/QVariant>
21 #include <QtDBus/QtDBus>
22 #include "metatypes.h"
27 class DownloadTrackerAdaptor:
public QDBusAbstractInterface
31 static inline const char *staticInterfaceName()
32 {
return "com.canonical.applications.Download"; }
35 DownloadTrackerAdaptor(
const QString &service,
const QString &path,
const QDBusConnection &connection, QObject *parent = 0);
37 ~DownloadTrackerAdaptor();
40 inline QDBusPendingReply<> allowGSMDownload(
bool allowed)
42 QList<QVariant> argumentList;
43 argumentList << QVariant::fromValue(allowed);
44 return asyncCallWithArgumentList(QStringLiteral(
"allowGSMDownload"), argumentList);
47 inline QDBusPendingReply<> cancel()
49 QList<QVariant> argumentList;
50 return asyncCallWithArgumentList(QStringLiteral(
"cancel"), argumentList);
53 inline QDBusPendingReply<bool> isGSMDownloadAllowed()
55 QList<QVariant> argumentList;
56 return asyncCallWithArgumentList(QStringLiteral(
"isGSMDownloadAllowed"), argumentList);
59 inline QDBusPendingReply<QVariantMap> metadata()
61 QList<QVariant> argumentList;
62 return asyncCallWithArgumentList(QStringLiteral(
"metadata"), argumentList);
65 inline QDBusPendingReply<> pause()
67 QList<QVariant> argumentList;
68 return asyncCallWithArgumentList(QStringLiteral(
"pause"), argumentList);
71 inline QDBusPendingReply<qulonglong> progress()
73 QList<QVariant> argumentList;
74 return asyncCallWithArgumentList(QStringLiteral(
"progress"), argumentList);
77 inline QDBusPendingReply<> resume()
79 QList<QVariant> argumentList;
80 return asyncCallWithArgumentList(QStringLiteral(
"resume"), argumentList);
83 inline QDBusPendingReply<> setThrottle(qulonglong speed)
85 QList<QVariant> argumentList;
86 argumentList << QVariant::fromValue(speed);
87 return asyncCallWithArgumentList(QStringLiteral(
"setThrottle"), argumentList);
90 inline QDBusPendingReply<> start()
92 QList<QVariant> argumentList;
93 return asyncCallWithArgumentList(QStringLiteral(
"start"), argumentList);
96 inline QDBusPendingReply<qulonglong> throttle()
98 QList<QVariant> argumentList;
99 return asyncCallWithArgumentList(QStringLiteral(
"throttle"), argumentList);
102 inline QDBusPendingReply<qulonglong> totalSize()
104 QList<QVariant> argumentList;
105 return asyncCallWithArgumentList(QStringLiteral(
"totalSize"), argumentList);
109 void canceled(
bool success);
110 void error(
const QString &error);
111 void finished(
const QString &path);
112 void paused(
bool success);
113 void progress(qulonglong received, qulonglong total);
114 void resumed(
bool success);
115 void started(
bool success);
119 namespace canonical {
120 namespace applications {
121 typedef ::DownloadTrackerAdaptor Download;