Ubuntu Download Manager  1.0.0
A session-wide downloading service
download_interface.h
Go to the documentation of this file.
1 /*
2  * This file was generated by qdbusxml2cpp version 0.8
3  * Command line was: qdbusxml2cpp com.canonical.applications.download.xml -i metatypes.h -p download_interface -c DownloadInterface
4  *
5  * qdbusxml2cpp is Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
6  *
7  * This is an auto-generated file.
8  * Do not edit! All changes made to it will be lost.
9  */
10 
11 #ifndef DOWNLOAD_INTERFACE_H_1392136772
12 #define DOWNLOAD_INTERFACE_H_1392136772
13 
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 <ubuntu/download_manager/metatypes.h>
23 
24 /*
25  * Proxy class for interface com.canonical.applications.Download
26  */
27 class DownloadInterface: public QDBusAbstractInterface
28 {
29  Q_OBJECT
30 public:
31  static inline const char *staticInterfaceName()
32  { return "com.canonical.applications.Download"; }
33 
34 public:
35  DownloadInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
36 
37  ~DownloadInterface();
38 
39  Q_PROPERTY(QString ClickPackage READ clickPackage)
40  inline QString clickPackage() const
41  { return qvariant_cast< QString >(property("ClickPackage")); }
42 
43  Q_PROPERTY(bool ShowInIndicator READ showInIndicator)
44  inline bool showInIndicator() const
45  { return qvariant_cast< bool >(property("ShowInIndicator")); }
46 
47  Q_PROPERTY(QString Title READ title)
48  inline QString title() const
49  { return qvariant_cast< QString >(property("Title")); }
50 
51 public Q_SLOTS: // METHODS
52  inline QDBusPendingReply<> allowGSMDownload(bool allowed)
53  {
54  QList<QVariant> argumentList;
55  argumentList << QVariant::fromValue(allowed);
56  return asyncCallWithArgumentList(QLatin1String("allowGSMDownload"), argumentList);
57  }
58 
59  inline QDBusPendingReply<> cancel()
60  {
61  QList<QVariant> argumentList;
62  return asyncCallWithArgumentList(QLatin1String("cancel"), argumentList);
63  }
64 
65  inline QDBusPendingReply<StringMap> headers()
66  {
67  QList<QVariant> argumentList;
68  return asyncCallWithArgumentList(QLatin1String("headers"), argumentList);
69  }
70 
71  inline QDBusPendingReply<bool> isGSMDownloadAllowed()
72  {
73  QList<QVariant> argumentList;
74  return asyncCallWithArgumentList(QLatin1String("isGSMDownloadAllowed"), argumentList);
75  }
76 
77  inline QDBusPendingReply<QVariantMap> metadata()
78  {
79  QList<QVariant> argumentList;
80  return asyncCallWithArgumentList(QLatin1String("metadata"), argumentList);
81  }
82 
83  inline QDBusPendingReply<> pause()
84  {
85  QList<QVariant> argumentList;
86  return asyncCallWithArgumentList(QLatin1String("pause"), argumentList);
87  }
88 
89  inline QDBusPendingReply<qulonglong> progress()
90  {
91  QList<QVariant> argumentList;
92  return asyncCallWithArgumentList(QLatin1String("progress"), argumentList);
93  }
94 
95  inline QDBusPendingReply<> resume()
96  {
97  QList<QVariant> argumentList;
98  return asyncCallWithArgumentList(QLatin1String("resume"), argumentList);
99  }
100 
101  inline QDBusPendingReply<> setDestinationDir(const QString &path)
102  {
103  QList<QVariant> argumentList;
104  argumentList << QVariant::fromValue(path);
105  return asyncCallWithArgumentList(QLatin1String("setDestinationDir"), argumentList);
106  }
107 
108  inline QDBusPendingReply<> setHeaders(StringMap headers)
109  {
110  QList<QVariant> argumentList;
111  argumentList << QVariant::fromValue(headers);
112  return asyncCallWithArgumentList(QLatin1String("setHeaders"), argumentList);
113  }
114 
115  inline QDBusPendingReply<> setMetadata(const QVariantMap &data)
116  {
117  QList<QVariant> argumentList;
118  argumentList << QVariant::fromValue(data);
119  return asyncCallWithArgumentList(QLatin1String("setMetadata"), argumentList);
120  }
121 
122  inline QDBusPendingReply<> setThrottle(qulonglong speed)
123  {
124  QList<QVariant> argumentList;
125  argumentList << QVariant::fromValue(speed);
126  return asyncCallWithArgumentList(QLatin1String("setThrottle"), argumentList);
127  }
128 
129  inline QDBusPendingReply<> start()
130  {
131  QList<QVariant> argumentList;
132  return asyncCallWithArgumentList(QLatin1String("start"), argumentList);
133  }
134 
135  inline QDBusPendingReply<qulonglong> throttle()
136  {
137  QList<QVariant> argumentList;
138  return asyncCallWithArgumentList(QLatin1String("throttle"), argumentList);
139  }
140 
141  inline QDBusPendingReply<qulonglong> totalSize()
142  {
143  QList<QVariant> argumentList;
144  return asyncCallWithArgumentList(QLatin1String("totalSize"), argumentList);
145  }
146 
147 Q_SIGNALS: // SIGNALS
148  void authError(AuthErrorStruct error);
149  void canceled(bool success);
150  void error(const QString &error);
151  void finished(const QString &path);
152  void hashError(HashErrorStruct error);
153  void httpError(HttpErrorStruct error);
154  void networkError(NetworkErrorStruct error);
155  void paused(bool success);
156  void processError(ProcessErrorStruct error);
157  void processing(const QString &path);
158  void progress(qulonglong received, qulonglong total);
159  void resumed(bool success);
160  void started(bool success);
161 };
162 
163 namespace com {
164  namespace canonical {
165  namespace applications {
166  typedef ::DownloadInterface Download;
167  }
168  }
169 }
170 #endif