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

cli-channel-dispatch-operation.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 ChannelDispatchOperationInterface : public Tp::AbstractInterface
45 {
46 Q_OBJECT
47
48 public:
55 static inline QLatin1String staticInterfaceName()
56 {
57 return QLatin1String("org.freedesktop.Telepathy.ChannelDispatchOperation");
58 }
59
67 ChannelDispatchOperationInterface(
68 const QString& busName,
69 const QString& objectPath,
70 QObject* parent = 0
71 );
72
81 ChannelDispatchOperationInterface(
82 const QDBusConnection& connection,
83 const QString& busName,
84 const QString& objectPath,
85 QObject* parent = 0
86 );
87
94 ChannelDispatchOperationInterface(Tp::DBusProxy *proxy);
95
106 inline Tp::PendingVariant *requestPropertyInterfaces() const
107 {
108 return internalRequestProperty(QLatin1String("Interfaces"));
109 }
110
123 inline Tp::PendingVariant *requestPropertyConnection() const
124 {
125 return internalRequestProperty(QLatin1String("Connection"));
126 }
127
138 inline Tp::PendingVariant *requestPropertyAccount() const
139 {
140 return internalRequestProperty(QLatin1String("Account"));
141 }
142
154 inline Tp::PendingVariant *requestPropertyChannels() const
155 {
156 return internalRequestProperty(QLatin1String("Channels"));
157 }
158
176 inline Tp::PendingVariant *requestPropertyPossibleHandlers() const
177 {
178 return internalRequestProperty(QLatin1String("PossibleHandlers"));
179 }
180
187 Tp::PendingVariantMap *requestAllProperties() const
188 {
189 return internalRequestAllProperties();
190 }
191
192 public Q_SLOTS:
238 inline QDBusPendingReply<> HandleWith(const QString& handler, int timeout = -1)
239 {
240 if (!invalidationReason().isEmpty()) {
241 return QDBusPendingReply<>(QDBusMessage::createError(
242 invalidationReason(),
243 invalidationMessage()
244 ));
245 }
246
247 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
248 this->staticInterfaceName(), QLatin1String("HandleWith"));
249 callMessage << QVariant::fromValue(handler);
250 return this->connection().asyncCall(callMessage, timeout);
251 }
252
306 inline QDBusPendingReply<> Claim(int timeout = -1)
307 {
308 if (!invalidationReason().isEmpty()) {
309 return QDBusPendingReply<>(QDBusMessage::createError(
310 invalidationReason(),
311 invalidationMessage()
312 ));
313 }
314
315 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
316 this->staticInterfaceName(), QLatin1String("Claim"));
317 return this->connection().asyncCall(callMessage, timeout);
318 }
319
350 inline QDBusPendingReply<> HandleWithTime(const QString& handler, qlonglong userActionTime, int timeout = -1)
351 {
352 if (!invalidationReason().isEmpty()) {
353 return QDBusPendingReply<>(QDBusMessage::createError(
354 invalidationReason(),
355 invalidationMessage()
356 ));
357 }
358
359 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
360 this->staticInterfaceName(), QLatin1String("HandleWithTime"));
361 callMessage << QVariant::fromValue(handler) << QVariant::fromValue(userActionTime);
362 return this->connection().asyncCall(callMessage, timeout);
363 }
364
365 Q_SIGNALS:
411 void ChannelLost(const QDBusObjectPath& channel, const QString& error, const QString& message);
412
455 void Finished();
456
457 protected:
458 virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
459 };
460 }
461 }
462 Q_DECLARE_METATYPE(Tp::Client::ChannelDispatchOperationInterface*)
QDBusConnection
Tp::Client::ChannelDispatchOperationInterface::staticInterfaceName
static QLatin1String staticInterfaceName()
Definition: cli-channel-dispatch-operation.h:55
Tp::Client::ChannelDispatchOperationInterface::HandleWithTime
QDBusPendingReply HandleWithTime(const QString &handler, qlonglong userActionTime, int timeout=-1)
Definition: cli-channel-dispatch-operation.h:350
QDBusObjectPath
Tp::Client::ChannelDispatchOperationInterface::HandleWith
QDBusPendingReply HandleWith(const QString &handler, int timeout=-1)
Definition: cli-channel-dispatch-operation.h:238
Tp::Client::ChannelDispatchOperationInterface::requestPropertyAccount
Tp::PendingVariant * requestPropertyAccount() const
Definition: cli-channel-dispatch-operation.h:138
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
QDBusPendingReply
QObject
Tp::Client::ChannelDispatchOperationInterface::requestPropertyConnection
Tp::PendingVariant * requestPropertyConnection() const
Definition: cli-channel-dispatch-operation.h:123
Tp::Client::ChannelDispatchOperationInterface::requestAllProperties
Tp::PendingVariantMap * requestAllProperties() const
Definition: cli-channel-dispatch-operation.h:187
QString
Tp::Client::ChannelDispatchOperationInterface::requestPropertyChannels
Tp::PendingVariant * requestPropertyChannels() const
Definition: cli-channel-dispatch-operation.h:154
Tp::Client::ChannelDispatchOperationInterface::Claim
QDBusPendingReply Claim(int timeout=-1)
Definition: cli-channel-dispatch-operation.h:306
Tp::Client::ChannelDispatchOperationInterface::requestPropertyPossibleHandlers
Tp::PendingVariant * requestPropertyPossibleHandlers() const
Definition: cli-channel-dispatch-operation.h:176
QVariant::fromValue
QVariant fromValue(const T &value)
Tp::Client::ChannelDispatchOperationInterface
Definition: cli-channel-dispatch-operation.h:44
Tp::Client::ChannelDispatchOperationInterface::requestPropertyInterfaces
Tp::PendingVariant * requestPropertyInterfaces() const
Definition: cli-channel-dispatch-operation.h:106
QDBusMessage
QLatin1String
Tp::PendingVariantMap
The PendingVariantMap class is a generic subclass of PendingOperation representing a pending D-Bus me...
Definition: pending-variant-map.h:38
QDBusConnection::asyncCall
QDBusPendingCall asyncCall(const QDBusMessage &message, int timeout) const
QDBusMessage::createError
QDBusMessage createError(const QString &name, const QString &msg)
Tp::PendingVariant
The PendingVariant class is a generic subclass of PendingOperation representing a pending D-Bus metho...
Definition: pending-variant.h:38
Tp::DBusProxy
The DBusProxy class is a base class representing a remote object available over D-Bus.
Definition: dbus-proxy.h:42
QDBusMessage::createMethodCall
QDBusMessage createMethodCall(const QString &service, const QString &path, const QString &interface, const QString &method)
Tp
Definition: abstract-adaptor.cpp:31