Home · Modules · All Classes · All Namespaces
cli-dbus.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 namespace DBus
37 {
38 
46 class TP_QT_EXPORT DBusDaemonInterface : public Tp::AbstractInterface
47 {
48  Q_OBJECT
49 
50 public:
57  static inline QLatin1String staticInterfaceName()
58  {
59  return QLatin1String("org.freedesktop.DBus");
60  }
61 
70  const QString& busName,
71  const QString& objectPath,
72  QObject* parent = 0
73  );
74 
84  const QDBusConnection& connection,
85  const QString& busName,
86  const QString& objectPath,
87  QObject* parent = 0
88  );
89 
97 
105  explicit DBusDaemonInterface(const Tp::AbstractInterface& mainInterface);
106 
114  DBusDaemonInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);
115 
123  {
124  return internalRequestAllProperties();
125  }
126 
127 public Q_SLOTS:
136  inline QDBusPendingReply<QString> Hello(int timeout = -1)
137  {
138  if (!invalidationReason().isEmpty()) {
139  return QDBusPendingReply<QString>(QDBusMessage::createError(
140  invalidationReason(),
141  invalidationMessage()
142  ));
143  }
144 
145  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
146  this->staticInterfaceName(), QLatin1String("Hello"));
147  return this->connection().asyncCall(callMessage, timeout);
148  }
149 
158  inline QDBusPendingReply<uint> RequestName(const QString& name, uint flags, int timeout = -1)
159  {
160  if (!invalidationReason().isEmpty()) {
161  return QDBusPendingReply<uint>(QDBusMessage::createError(
162  invalidationReason(),
163  invalidationMessage()
164  ));
165  }
166 
167  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
168  this->staticInterfaceName(), QLatin1String("RequestName"));
169  callMessage << QVariant::fromValue(name) << QVariant::fromValue(flags);
170  return this->connection().asyncCall(callMessage, timeout);
171  }
172 
181  inline QDBusPendingReply<uint> ReleaseName(const QString& name, int timeout = -1)
182  {
183  if (!invalidationReason().isEmpty()) {
184  return QDBusPendingReply<uint>(QDBusMessage::createError(
185  invalidationReason(),
186  invalidationMessage()
187  ));
188  }
189 
190  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
191  this->staticInterfaceName(), QLatin1String("ReleaseName"));
192  callMessage << QVariant::fromValue(name);
193  return this->connection().asyncCall(callMessage, timeout);
194  }
195 
204  inline QDBusPendingReply<uint> StartServiceByName(const QString& service, uint flags, int timeout = -1)
205  {
206  if (!invalidationReason().isEmpty()) {
207  return QDBusPendingReply<uint>(QDBusMessage::createError(
208  invalidationReason(),
209  invalidationMessage()
210  ));
211  }
212 
213  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
214  this->staticInterfaceName(), QLatin1String("StartServiceByName"));
215  callMessage << QVariant::fromValue(service) << QVariant::fromValue(flags);
216  return this->connection().asyncCall(callMessage, timeout);
217  }
218 
227  inline QDBusPendingReply<bool> NameHasOwner(const QString& nameToCheck, int timeout = -1)
228  {
229  if (!invalidationReason().isEmpty()) {
230  return QDBusPendingReply<bool>(QDBusMessage::createError(
231  invalidationReason(),
232  invalidationMessage()
233  ));
234  }
235 
236  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
237  this->staticInterfaceName(), QLatin1String("NameHasOwner"));
238  callMessage << QVariant::fromValue(nameToCheck);
239  return this->connection().asyncCall(callMessage, timeout);
240  }
241 
250  inline QDBusPendingReply<QStringList> ListNames(int timeout = -1)
251  {
252  if (!invalidationReason().isEmpty()) {
253  return QDBusPendingReply<QStringList>(QDBusMessage::createError(
254  invalidationReason(),
255  invalidationMessage()
256  ));
257  }
258 
259  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
260  this->staticInterfaceName(), QLatin1String("ListNames"));
261  return this->connection().asyncCall(callMessage, timeout);
262  }
263 
272  inline QDBusPendingReply<QStringList> ListActivatableNames(int timeout = -1)
273  {
274  if (!invalidationReason().isEmpty()) {
275  return QDBusPendingReply<QStringList>(QDBusMessage::createError(
276  invalidationReason(),
277  invalidationMessage()
278  ));
279  }
280 
281  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
282  this->staticInterfaceName(), QLatin1String("ListActivatableNames"));
283  return this->connection().asyncCall(callMessage, timeout);
284  }
285 
294  inline QDBusPendingReply<> AddMatch(const QString& rule, int timeout = -1)
295  {
296  if (!invalidationReason().isEmpty()) {
297  return QDBusPendingReply<>(QDBusMessage::createError(
298  invalidationReason(),
299  invalidationMessage()
300  ));
301  }
302 
303  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
304  this->staticInterfaceName(), QLatin1String("AddMatch"));
305  callMessage << QVariant::fromValue(rule);
306  return this->connection().asyncCall(callMessage, timeout);
307  }
308 
317  inline QDBusPendingReply<> RemoveMatch(const QString& rule, int timeout = -1)
318  {
319  if (!invalidationReason().isEmpty()) {
320  return QDBusPendingReply<>(QDBusMessage::createError(
321  invalidationReason(),
322  invalidationMessage()
323  ));
324  }
325 
326  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
327  this->staticInterfaceName(), QLatin1String("RemoveMatch"));
328  callMessage << QVariant::fromValue(rule);
329  return this->connection().asyncCall(callMessage, timeout);
330  }
331 
340  inline QDBusPendingReply<QString> GetNameOwner(const QString& name, int timeout = -1)
341  {
342  if (!invalidationReason().isEmpty()) {
343  return QDBusPendingReply<QString>(QDBusMessage::createError(
344  invalidationReason(),
345  invalidationMessage()
346  ));
347  }
348 
349  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
350  this->staticInterfaceName(), QLatin1String("GetNameOwner"));
351  callMessage << QVariant::fromValue(name);
352  return this->connection().asyncCall(callMessage, timeout);
353  }
354 
363  inline QDBusPendingReply<QStringList> ListQueuedOwners(const QString& name, int timeout = -1)
364  {
365  if (!invalidationReason().isEmpty()) {
366  return QDBusPendingReply<QStringList>(QDBusMessage::createError(
367  invalidationReason(),
368  invalidationMessage()
369  ));
370  }
371 
372  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
373  this->staticInterfaceName(), QLatin1String("ListQueuedOwners"));
374  callMessage << QVariant::fromValue(name);
375  return this->connection().asyncCall(callMessage, timeout);
376  }
377 
386  inline QDBusPendingReply<uint> GetConnectionUnixUser(const QString& connectionName, int timeout = -1)
387  {
388  if (!invalidationReason().isEmpty()) {
389  return QDBusPendingReply<uint>(QDBusMessage::createError(
390  invalidationReason(),
391  invalidationMessage()
392  ));
393  }
394 
395  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
396  this->staticInterfaceName(), QLatin1String("GetConnectionUnixUser"));
397  callMessage << QVariant::fromValue(connectionName);
398  return this->connection().asyncCall(callMessage, timeout);
399  }
400 
409  inline QDBusPendingReply<uint> GetConnectionUnixProcessID(const QString& connectionName, int timeout = -1)
410  {
411  if (!invalidationReason().isEmpty()) {
412  return QDBusPendingReply<uint>(QDBusMessage::createError(
413  invalidationReason(),
414  invalidationMessage()
415  ));
416  }
417 
418  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
419  this->staticInterfaceName(), QLatin1String("GetConnectionUnixProcessID"));
420  callMessage << QVariant::fromValue(connectionName);
421  return this->connection().asyncCall(callMessage, timeout);
422  }
423 
432  inline QDBusPendingReply<QByteArray> GetConnectionSELinuxSecurityContext(const QString& connectionName, int timeout = -1)
433  {
434  if (!invalidationReason().isEmpty()) {
435  return QDBusPendingReply<QByteArray>(QDBusMessage::createError(
436  invalidationReason(),
437  invalidationMessage()
438  ));
439  }
440 
441  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
442  this->staticInterfaceName(), QLatin1String("GetConnectionSELinuxSecurityContext"));
443  callMessage << QVariant::fromValue(connectionName);
444  return this->connection().asyncCall(callMessage, timeout);
445  }
446 
455  inline QDBusPendingReply<> ReloadConfig(int timeout = -1)
456  {
457  if (!invalidationReason().isEmpty()) {
458  return QDBusPendingReply<>(QDBusMessage::createError(
459  invalidationReason(),
460  invalidationMessage()
461  ));
462  }
463 
464  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
465  this->staticInterfaceName(), QLatin1String("ReloadConfig"));
466  return this->connection().asyncCall(callMessage, timeout);
467  }
468 
477  inline QDBusPendingReply<QString> GetId(int timeout = -1)
478  {
479  if (!invalidationReason().isEmpty()) {
480  return QDBusPendingReply<QString>(QDBusMessage::createError(
481  invalidationReason(),
482  invalidationMessage()
483  ));
484  }
485 
486  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
487  this->staticInterfaceName(), QLatin1String("GetId"));
488  return this->connection().asyncCall(callMessage, timeout);
489  }
490 
491 Q_SIGNALS:
495  void NameOwnerChanged(const QString& name, const QString& oldOwner, const QString& newOwner);
496 
500  void NameLost(const QString& name);
501 
505  void NameAcquired(const QString& name);
506 
507 protected:
508  virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
509 };
510 
519 {
520  Q_OBJECT
521 
522 public:
529  static inline QLatin1String staticInterfaceName()
530  {
531  return QLatin1String("org.freedesktop.DBus.Introspectable");
532  }
533 
542  const QString& busName,
543  const QString& objectPath,
544  QObject* parent = 0
545  );
546 
556  const QDBusConnection& connection,
557  const QString& busName,
558  const QString& objectPath,
559  QObject* parent = 0
560  );
561 
569 
577  explicit IntrospectableInterface(const Tp::AbstractInterface& mainInterface);
578 
586  IntrospectableInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);
587 
595  {
596  return internalRequestAllProperties();
597  }
598 
599 public Q_SLOTS:
608  inline QDBusPendingReply<QString> Introspect(int timeout = -1)
609  {
610  if (!invalidationReason().isEmpty()) {
611  return QDBusPendingReply<QString>(QDBusMessage::createError(
612  invalidationReason(),
613  invalidationMessage()
614  ));
615  }
616 
617  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
618  this->staticInterfaceName(), QLatin1String("Introspect"));
619  return this->connection().asyncCall(callMessage, timeout);
620  }
621 
622 protected:
623  virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
624 };
625 
633 class TP_QT_EXPORT PeerInterface : public Tp::AbstractInterface
634 {
635  Q_OBJECT
636 
637 public:
644  static inline QLatin1String staticInterfaceName()
645  {
646  return QLatin1String("org.freedesktop.DBus.Peer");
647  }
648 
657  const QString& busName,
658  const QString& objectPath,
659  QObject* parent = 0
660  );
661 
671  const QDBusConnection& connection,
672  const QString& busName,
673  const QString& objectPath,
674  QObject* parent = 0
675  );
676 
684 
692  explicit PeerInterface(const Tp::AbstractInterface& mainInterface);
693 
701  PeerInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);
702 
710  {
711  return internalRequestAllProperties();
712  }
713 
714 public Q_SLOTS:
723  inline QDBusPendingReply<> Ping(int timeout = -1)
724  {
725  if (!invalidationReason().isEmpty()) {
726  return QDBusPendingReply<>(QDBusMessage::createError(
727  invalidationReason(),
728  invalidationMessage()
729  ));
730  }
731 
732  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
733  this->staticInterfaceName(), QLatin1String("Ping"));
734  return this->connection().asyncCall(callMessage, timeout);
735  }
736 
745  inline QDBusPendingReply<QString> GetMachineId(int timeout = -1)
746  {
747  if (!invalidationReason().isEmpty()) {
748  return QDBusPendingReply<QString>(QDBusMessage::createError(
749  invalidationReason(),
750  invalidationMessage()
751  ));
752  }
753 
754  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
755  this->staticInterfaceName(), QLatin1String("GetMachineId"));
756  return this->connection().asyncCall(callMessage, timeout);
757  }
758 
759 protected:
760  virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
761 };
762 
770 class TP_QT_EXPORT PropertiesInterface : public Tp::AbstractInterface
771 {
772  Q_OBJECT
773 
774 public:
781  static inline QLatin1String staticInterfaceName()
782  {
783  return QLatin1String("org.freedesktop.DBus.Properties");
784  }
785 
794  const QString& busName,
795  const QString& objectPath,
796  QObject* parent = 0
797  );
798 
808  const QDBusConnection& connection,
809  const QString& busName,
810  const QString& objectPath,
811  QObject* parent = 0
812  );
813 
821 
829  explicit PropertiesInterface(const Tp::AbstractInterface& mainInterface);
830 
838  PropertiesInterface(const Tp::AbstractInterface& mainInterface, QObject* parent);
839 
847  {
848  return internalRequestAllProperties();
849  }
850 
851 public Q_SLOTS:
860  inline QDBusPendingReply<QDBusVariant> Get(const QString& interfaceName, const QString& propertyName, int timeout = -1)
861  {
862  if (!invalidationReason().isEmpty()) {
863  return QDBusPendingReply<QDBusVariant>(QDBusMessage::createError(
864  invalidationReason(),
865  invalidationMessage()
866  ));
867  }
868 
869  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
870  this->staticInterfaceName(), QLatin1String("Get"));
871  callMessage << QVariant::fromValue(interfaceName) << QVariant::fromValue(propertyName);
872  return this->connection().asyncCall(callMessage, timeout);
873  }
874 
883  inline QDBusPendingReply<> Set(const QString& interfaceName, const QString& propertyName, const QDBusVariant& value, int timeout = -1)
884  {
885  if (!invalidationReason().isEmpty()) {
886  return QDBusPendingReply<>(QDBusMessage::createError(
887  invalidationReason(),
888  invalidationMessage()
889  ));
890  }
891 
892  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
893  this->staticInterfaceName(), QLatin1String("Set"));
894  callMessage << QVariant::fromValue(interfaceName) << QVariant::fromValue(propertyName) << QVariant::fromValue(value);
895  return this->connection().asyncCall(callMessage, timeout);
896  }
897 
906  inline QDBusPendingReply<QVariantMap> GetAll(const QString& interfaceName, int timeout = -1)
907  {
908  if (!invalidationReason().isEmpty()) {
909  return QDBusPendingReply<QVariantMap>(QDBusMessage::createError(
910  invalidationReason(),
911  invalidationMessage()
912  ));
913  }
914 
915  QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
916  this->staticInterfaceName(), QLatin1String("GetAll"));
917  callMessage << QVariant::fromValue(interfaceName);
918  return this->connection().asyncCall(callMessage, timeout);
919  }
920 
921 protected:
922  virtual void invalidate(Tp::DBusProxy *, const QString &, const QString &);
923 };
924 }
925 }
926 }
927 Q_DECLARE_METATYPE(Tp::Client::DBus::DBusDaemonInterface*)
929 Q_DECLARE_METATYPE(Tp::Client::DBus::PeerInterface*)
930 Q_DECLARE_METATYPE(Tp::Client::DBus::PropertiesInterface*)
static QLatin1String staticInterfaceName()
Definition: cli-dbus.h:57
QDBusPendingReply< uint > GetConnectionUnixUser(const QString &connectionName, int timeout=-1)
Definition: cli-dbus.h:386
static QLatin1String staticInterfaceName()
Definition: cli-dbus.h:781
Tp::PendingVariantMap * requestAllProperties() const
Definition: cli-dbus.h:846
Definition: cli-dbus.h:770
Tp::PendingVariantMap * requestAllProperties() const
Definition: cli-dbus.h:709
QDBusPendingReply< QStringList > ListQueuedOwners(const QString &name, int timeout=-1)
Definition: cli-dbus.h:363
Definition: cli-dbus.h:46
QDBusPendingReply< QString > Introspect(int timeout=-1)
Definition: cli-dbus.h:608
QDBusPendingReply< QString > GetId(int timeout=-1)
Definition: cli-dbus.h:477
QDBusPendingReply< QStringList > ListNames(int timeout=-1)
Definition: cli-dbus.h:250
QDBusPendingReply< uint > GetConnectionUnixProcessID(const QString &connectionName, int timeout=-1)
Definition: cli-dbus.h:409
QDBusPendingReply< uint > RequestName(const QString &name, uint flags, int timeout=-1)
Definition: cli-dbus.h:158
QDBusPendingReply Set(const QString &interfaceName, const QString &propertyName, const QDBusVariant &value, int timeout=-1)
Definition: cli-dbus.h:883
QDBusPendingReply< QVariantMap > GetAll(const QString &interfaceName, int timeout=-1)
Definition: cli-dbus.h:906
The AbstractInterface class is the base class for all client side D-Bus interfaces,...
Definition: abstract-interface.h:42
QDBusPendingReply< QStringList > ListActivatableNames(int timeout=-1)
Definition: cli-dbus.h:272
static QLatin1String staticInterfaceName()
Definition: cli-dbus.h:644
QDBusPendingReply< QDBusVariant > Get(const QString &interfaceName, const QString &propertyName, int timeout=-1)
Definition: cli-dbus.h:860
QDBusPendingReply< QString > GetNameOwner(const QString &name, int timeout=-1)
Definition: cli-dbus.h:340
QDBusPendingReply< QString > GetMachineId(int timeout=-1)
Definition: cli-dbus.h:745
QDBusPendingReply AddMatch(const QString &rule, int timeout=-1)
Definition: cli-dbus.h:294
Tp::PendingVariantMap * requestAllProperties() const
Definition: cli-dbus.h:594
Tp::PendingVariantMap * requestAllProperties() const
Definition: cli-dbus.h:122
QDBusPendingReply< uint > StartServiceByName(const QString &service, uint flags, int timeout=-1)
Definition: cli-dbus.h:204
static QLatin1String staticInterfaceName()
Definition: cli-dbus.h:529
Definition: cli-dbus.h:633
The PendingVariantMap class is a generic subclass of PendingOperation representing a pending D-Bus me...
Definition: pending-variant-map.h:38
QDBusPendingReply< uint > ReleaseName(const QString &name, int timeout=-1)
Definition: cli-dbus.h:181
QDBusPendingReply Ping(int timeout=-1)
Definition: cli-dbus.h:723
QDBusPendingReply ReloadConfig(int timeout=-1)
Definition: cli-dbus.h:455
QDBusPendingReply< QString > Hello(int timeout=-1)
Definition: cli-dbus.h:136
QDBusPendingReply< bool > NameHasOwner(const QString &nameToCheck, int timeout=-1)
Definition: cli-dbus.h:227
Definition: abstract-adaptor.cpp:31
QDBusPendingReply RemoveMatch(const QString &rule, int timeout=-1)
Definition: cli-dbus.h:317
The DBusProxy class is a base class representing a remote object available over D-Bus.
Definition: dbus-proxy.h:42
QDBusPendingReply< QByteArray > GetConnectionSELinuxSecurityContext(const QString &connectionName, int timeout=-1)
Definition: cli-dbus.h:432