Home · Modules · All Classes · All Namespaces
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 
45 {
46  Q_OBJECT
47 
48 public:
55  static inline QLatin1String staticInterfaceName()
56  {
57  return QLatin1String("org.freedesktop.Telepathy.ChannelDispatchOperation");
58  }
59 
68  const QString& busName,
69  const QString& objectPath,
70  QObject* parent = 0
71  );
72 
82  const QDBusConnection& connection,
83  const QString& busName,
84  const QString& objectPath,
85  QObject* parent = 0
86  );
87 
95 
107  {
108  return internalRequestProperty(QLatin1String("Interfaces"));
109  }
110 
124  {
125  return internalRequestProperty(QLatin1String("Connection"));
126  }
127 
139  {
140  return internalRequestProperty(QLatin1String("Account"));
141  }
142 
155  {
156  return internalRequestProperty(QLatin1String("Channels"));
157  }
158 
177  {
178  return internalRequestProperty(QLatin1String("PossibleHandlers"));
179  }
180 
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 }
Tp::PendingVariant * requestPropertyPossibleHandlers() const
Definition: cli-channel-dispatch-operation.h:176
static QLatin1String staticInterfaceName()
Definition: cli-channel-dispatch-operation.h:55
Tp::PendingVariantMap * requestAllProperties() const
Definition: cli-channel-dispatch-operation.h:187
Tp::PendingVariant * requestPropertyInterfaces() const
Definition: cli-channel-dispatch-operation.h:106
QDBusPendingReply HandleWith(const QString &handler, int timeout=-1)
Definition: cli-channel-dispatch-operation.h:238
The AbstractInterface class is the base class for all client side D-Bus interfaces,...
Definition: abstract-interface.h:42
The PendingVariant class is a generic subclass of PendingOperation representing a pending D-Bus metho...
Definition: pending-variant.h:38
Tp::PendingVariant * requestPropertyChannels() const
Definition: cli-channel-dispatch-operation.h:154
QDBusPendingReply Claim(int timeout=-1)
Definition: cli-channel-dispatch-operation.h:306
Tp::PendingVariant * requestPropertyAccount() const
Definition: cli-channel-dispatch-operation.h:138
The PendingVariantMap class is a generic subclass of PendingOperation representing a pending D-Bus me...
Definition: pending-variant-map.h:38
Tp::PendingVariant * requestPropertyConnection() const
Definition: cli-channel-dispatch-operation.h:123
Definition: cli-channel-dispatch-operation.h:44
QDBusPendingReply HandleWithTime(const QString &handler, qlonglong userActionTime, int timeout=-1)
Definition: cli-channel-dispatch-operation.h:350
Definition: abstract-adaptor.cpp:31
The DBusProxy class is a base class representing a remote object available over D-Bus.
Definition: dbus-proxy.h:42