8 #ifndef IN_TP_QT_HEADER 12 #include <TelepathyQt/Types> 20 #include <QDBusPendingReply> 22 #include <TelepathyQt/AbstractInterface> 23 #include <TelepathyQt/DBusProxy> 24 #include <TelepathyQt/Global> 29 class PendingOperation;
59 return QLatin1String(
"org.freedesktop.DBus");
70 const QString& busName,
71 const QString& objectPath,
84 const QDBusConnection& connection,
85 const QString& busName,
86 const QString& objectPath,
124 return internalRequestAllProperties();
136 inline QDBusPendingReply<QString>
Hello(
int timeout = -1)
138 if (!invalidationReason().isEmpty()) {
139 return QDBusPendingReply<QString>(QDBusMessage::createError(
140 invalidationReason(),
141 invalidationMessage()
145 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
146 this->staticInterfaceName(), QLatin1String(
"Hello"));
147 return this->connection().asyncCall(callMessage, timeout);
158 inline QDBusPendingReply<uint>
RequestName(
const QString& name, uint flags,
int timeout = -1)
160 if (!invalidationReason().isEmpty()) {
161 return QDBusPendingReply<uint>(QDBusMessage::createError(
162 invalidationReason(),
163 invalidationMessage()
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);
181 inline QDBusPendingReply<uint>
ReleaseName(
const QString& name,
int timeout = -1)
183 if (!invalidationReason().isEmpty()) {
184 return QDBusPendingReply<uint>(QDBusMessage::createError(
185 invalidationReason(),
186 invalidationMessage()
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);
204 inline QDBusPendingReply<uint>
StartServiceByName(
const QString& service, uint flags,
int timeout = -1)
206 if (!invalidationReason().isEmpty()) {
207 return QDBusPendingReply<uint>(QDBusMessage::createError(
208 invalidationReason(),
209 invalidationMessage()
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);
227 inline QDBusPendingReply<bool>
NameHasOwner(
const QString& nameToCheck,
int timeout = -1)
229 if (!invalidationReason().isEmpty()) {
230 return QDBusPendingReply<bool>(QDBusMessage::createError(
231 invalidationReason(),
232 invalidationMessage()
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);
250 inline QDBusPendingReply<QStringList>
ListNames(
int timeout = -1)
252 if (!invalidationReason().isEmpty()) {
253 return QDBusPendingReply<QStringList>(QDBusMessage::createError(
254 invalidationReason(),
255 invalidationMessage()
259 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
260 this->staticInterfaceName(), QLatin1String(
"ListNames"));
261 return this->connection().asyncCall(callMessage, timeout);
274 if (!invalidationReason().isEmpty()) {
275 return QDBusPendingReply<QStringList>(QDBusMessage::createError(
276 invalidationReason(),
277 invalidationMessage()
281 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
282 this->staticInterfaceName(), QLatin1String(
"ListActivatableNames"));
283 return this->connection().asyncCall(callMessage, timeout);
294 inline QDBusPendingReply<>
AddMatch(
const QString& rule,
int timeout = -1)
296 if (!invalidationReason().isEmpty()) {
297 return QDBusPendingReply<>(QDBusMessage::createError(
298 invalidationReason(),
299 invalidationMessage()
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);
317 inline QDBusPendingReply<>
RemoveMatch(
const QString& rule,
int timeout = -1)
319 if (!invalidationReason().isEmpty()) {
320 return QDBusPendingReply<>(QDBusMessage::createError(
321 invalidationReason(),
322 invalidationMessage()
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);
340 inline QDBusPendingReply<QString>
GetNameOwner(
const QString& name,
int timeout = -1)
342 if (!invalidationReason().isEmpty()) {
343 return QDBusPendingReply<QString>(QDBusMessage::createError(
344 invalidationReason(),
345 invalidationMessage()
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);
363 inline QDBusPendingReply<QStringList>
ListQueuedOwners(
const QString& name,
int timeout = -1)
365 if (!invalidationReason().isEmpty()) {
366 return QDBusPendingReply<QStringList>(QDBusMessage::createError(
367 invalidationReason(),
368 invalidationMessage()
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);
388 if (!invalidationReason().isEmpty()) {
389 return QDBusPendingReply<uint>(QDBusMessage::createError(
390 invalidationReason(),
391 invalidationMessage()
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);
411 if (!invalidationReason().isEmpty()) {
412 return QDBusPendingReply<uint>(QDBusMessage::createError(
413 invalidationReason(),
414 invalidationMessage()
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);
434 if (!invalidationReason().isEmpty()) {
435 return QDBusPendingReply<QByteArray>(QDBusMessage::createError(
436 invalidationReason(),
437 invalidationMessage()
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);
457 if (!invalidationReason().isEmpty()) {
458 return QDBusPendingReply<>(QDBusMessage::createError(
459 invalidationReason(),
460 invalidationMessage()
464 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
465 this->staticInterfaceName(), QLatin1String(
"ReloadConfig"));
466 return this->connection().asyncCall(callMessage, timeout);
477 inline QDBusPendingReply<QString>
GetId(
int timeout = -1)
479 if (!invalidationReason().isEmpty()) {
480 return QDBusPendingReply<QString>(QDBusMessage::createError(
481 invalidationReason(),
482 invalidationMessage()
486 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
487 this->staticInterfaceName(), QLatin1String(
"GetId"));
488 return this->connection().asyncCall(callMessage, timeout);
495 void NameOwnerChanged(
const QString& name,
const QString& oldOwner,
const QString& newOwner);
500 void NameLost(
const QString& name);
505 void NameAcquired(
const QString& name);
508 virtual void invalidate(
Tp::DBusProxy *,
const QString &,
const QString &);
531 return QLatin1String(
"org.freedesktop.DBus.Introspectable");
542 const QString& busName,
543 const QString& objectPath,
556 const QDBusConnection& connection,
557 const QString& busName,
558 const QString& objectPath,
596 return internalRequestAllProperties();
608 inline QDBusPendingReply<QString>
Introspect(
int timeout = -1)
610 if (!invalidationReason().isEmpty()) {
611 return QDBusPendingReply<QString>(QDBusMessage::createError(
612 invalidationReason(),
613 invalidationMessage()
617 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
618 this->staticInterfaceName(), QLatin1String(
"Introspect"));
619 return this->connection().asyncCall(callMessage, timeout);
623 virtual void invalidate(
Tp::DBusProxy *,
const QString &,
const QString &);
646 return QLatin1String(
"org.freedesktop.DBus.Peer");
657 const QString& busName,
658 const QString& objectPath,
671 const QDBusConnection& connection,
672 const QString& busName,
673 const QString& objectPath,
711 return internalRequestAllProperties();
723 inline QDBusPendingReply<>
Ping(
int timeout = -1)
725 if (!invalidationReason().isEmpty()) {
726 return QDBusPendingReply<>(QDBusMessage::createError(
727 invalidationReason(),
728 invalidationMessage()
732 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
733 this->staticInterfaceName(), QLatin1String(
"Ping"));
734 return this->connection().asyncCall(callMessage, timeout);
747 if (!invalidationReason().isEmpty()) {
748 return QDBusPendingReply<QString>(QDBusMessage::createError(
749 invalidationReason(),
750 invalidationMessage()
754 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
755 this->staticInterfaceName(), QLatin1String(
"GetMachineId"));
756 return this->connection().asyncCall(callMessage, timeout);
760 virtual void invalidate(
Tp::DBusProxy *,
const QString &,
const QString &);
783 return QLatin1String(
"org.freedesktop.DBus.Properties");
794 const QString& busName,
795 const QString& objectPath,
808 const QDBusConnection& connection,
809 const QString& busName,
810 const QString& objectPath,
848 return internalRequestAllProperties();
860 inline QDBusPendingReply<QDBusVariant>
Get(
const QString& interfaceName,
const QString& propertyName,
int timeout = -1)
862 if (!invalidationReason().isEmpty()) {
863 return QDBusPendingReply<QDBusVariant>(QDBusMessage::createError(
864 invalidationReason(),
865 invalidationMessage()
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);
883 inline QDBusPendingReply<>
Set(
const QString& interfaceName,
const QString& propertyName,
const QDBusVariant& value,
int timeout = -1)
885 if (!invalidationReason().isEmpty()) {
886 return QDBusPendingReply<>(QDBusMessage::createError(
887 invalidationReason(),
888 invalidationMessage()
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);
906 inline QDBusPendingReply<QVariantMap>
GetAll(
const QString& interfaceName,
int timeout = -1)
908 if (!invalidationReason().isEmpty()) {
909 return QDBusPendingReply<QVariantMap>(QDBusMessage::createError(
910 invalidationReason(),
911 invalidationMessage()
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);
922 virtual void invalidate(
Tp::DBusProxy *,
const QString &,
const QString &);
static QLatin1String staticInterfaceName()
Definition: cli-dbus.h:57
Definition: cli-dbus.h:518
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