cli-channel-request.h Source File

| Home · All Classes · All Namespaces · Modules · Functions · Files

cli-channel-request.h
1 /*
2 * This file contains D-Bus client proxy classes generated by qt-client-gen.py.
3 *
4 * This file can be distributed under the same terms as the specification from
5 * which it was generated.
6 */
7
8 #ifndef IN_TP_QT_HEADER
9 #error IN_TP_QT_HEADER
10 #endif
11
12 #include <TelepathyQt/Types>
13
14 #include <QtGlobal>
15
16 #include <QString>
17 #include <QObject>
18 #include <QVariant>
19
20 #include <QDBusPendingReply>
21
22 #include <TelepathyQt/AbstractInterface>
23 #include <TelepathyQt/DBusProxy>
24 #include <TelepathyQt/Global>
25
26 namespace Tp
27 {
28 class PendingVariant;
29 class PendingOperation;
30 }
31
32 namespace Tp
33 {
34 namespace Client
35 {
36
44 class TP_QT_EXPORT ChannelRequestInterface : public Tp::AbstractInterface
45 {
46 Q_OBJECT
47
48 public:
55 static inline QLatin1String staticInterfaceName()
56 {
57 return QLatin1String("org.freedesktop.Telepathy.ChannelRequest");
58 }
59
67 ChannelRequestInterface(
68 const QString& busName,
69 const QString& objectPath,
70 QObject* parent = 0
71 );
72
81 ChannelRequestInterface(
82 const QDBusConnection& connection,
83 const QString& busName,
84 const QString& objectPath,
85 QObject* parent = 0
86 );
87
94 ChannelRequestInterface(Tp::DBusProxy *proxy);
95
105 inline Tp::PendingVariant *requestPropertyAccount() const
106 {
107 return internalRequestProperty(QLatin1String("Account"));
108 }
109
125 inline Tp::PendingVariant *requestPropertyUserActionTime() const
126 {
127 return internalRequestProperty(QLatin1String("UserActionTime"));
128 }
129
148 inline Tp::PendingVariant *requestPropertyPreferredHandler() const
149 {
150 return internalRequestProperty(QLatin1String("PreferredHandler"));
151 }
152
173 inline Tp::PendingVariant *requestPropertyRequests() const
174 {
175 return internalRequestProperty(QLatin1String("Requests"));
176 }
177
188 inline Tp::PendingVariant *requestPropertyInterfaces() const
189 {
190 return internalRequestProperty(QLatin1String("Interfaces"));
191 }
192
275 inline Tp::PendingVariant *requestPropertyHints() const
276 {
277 return internalRequestProperty(QLatin1String("Hints"));
278 }
279
286 Tp::PendingVariantMap *requestAllProperties() const
287 {
288 return internalRequestAllProperties();
289 }
290
291 public Q_SLOTS:
324 inline QDBusPendingReply<> Proceed(int timeout = -1)
325 {
326 if (!invalidationReason().isEmpty()) {
327 return QDBusPendingReply<>(QDBusMessage::createError(
328 invalidationReason(),
329 invalidationMessage()
330 ));
331 }
332
333 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
334 this->staticInterfaceName(), QLatin1String("Proceed"));
335 return this->connection().asyncCall(callMessage, timeout);
336 }
337
380 inline QDBusPendingReply<> Cancel(int timeout = -1)
381 {
382 if (!invalidationReason().isEmpty()) {
383 return QDBusPendingReply<>(QDBusMessage::createError(
384 invalidationReason(),
385 invalidationMessage()
386 ));
387 }
388
389 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
390 this->staticInterfaceName(), QLatin1String("Cancel"));
391 return this->connection().asyncCall(callMessage, timeout);
392 }
393
394 Q_SIGNALS:
417 void Failed(const QString& error, const QString& message);
418
427 void Succeeded();
428
469 void SucceededWithChannel(const QDBusObjectPath& connection, const QVariantMap& connectionProperties, const QDBusObjectPath& channel, const QVariantMap& channelProperties);
470
471 protected:
472 virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
473 };
474 }
475 }
476 Q_DECLARE_METATYPE(Tp::Client::ChannelRequestInterface*)
Tp::Client::ChannelRequestInterface::Cancel
QDBusPendingReply Cancel(int timeout=-1)
Definition: cli-channel-request.h:380
Tp::Client::ChannelRequestInterface::requestPropertyUserActionTime
Tp::PendingVariant * requestPropertyUserActionTime() const
Definition: cli-channel-request.h:125
Tp::DBusProxy
The DBusProxy class is a base class representing a remote object available over D-Bus.
Definition: dbus-proxy.h:42
Tp::Client::ChannelRequestInterface::requestPropertyRequests
Tp::PendingVariant * requestPropertyRequests() const
Definition: cli-channel-request.h:173
Tp::Client::ChannelRequestInterface::Proceed
QDBusPendingReply Proceed(int timeout=-1)
Definition: cli-channel-request.h:324
Tp::AbstractInterface
The AbstractInterface class is the base class for all client side D-Bus interfaces, allowing access to remote methods/properties/signals.
Definition: abstract-interface.h:42
Tp::Client::ChannelRequestInterface::requestPropertyAccount
Tp::PendingVariant * requestPropertyAccount() const
Definition: cli-channel-request.h:105
Tp::Client::ChannelRequestInterface::requestAllProperties
Tp::PendingVariantMap * requestAllProperties() const
Definition: cli-channel-request.h:286
Tp::Client::ChannelRequestInterface::requestPropertyHints
Tp::PendingVariant * requestPropertyHints() const
Definition: cli-channel-request.h:275
Tp::PendingVariant
The PendingVariant class is a generic subclass of PendingOperation representing a pending D-Bus metho...
Definition: pending-variant.h:38
Tp::Client::ChannelRequestInterface::requestPropertyPreferredHandler
Tp::PendingVariant * requestPropertyPreferredHandler() const
Definition: cli-channel-request.h:148
Tp::Client::ChannelRequestInterface::staticInterfaceName
static QLatin1String staticInterfaceName()
Definition: cli-channel-request.h:55
Tp::Client::ChannelRequestInterface::requestPropertyInterfaces
Tp::PendingVariant * requestPropertyInterfaces() const
Definition: cli-channel-request.h:188
Tp::Client::ChannelRequestInterface
Definition: cli-channel-request.h:44
Tp::PendingVariantMap
The PendingVariantMap class is a generic subclass of PendingOperation representing a pending D-Bus me...
Definition: pending-variant-map.h:38