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;
57 return QLatin1String(
"org.freedesktop.Telepathy.ChannelDispatcher");
68 const QString& busName,
69 const QString& objectPath,
82 const QDBusConnection& connection,
83 const QString& busName,
84 const QString& objectPath,
107 return internalRequestProperty(QLatin1String(
"Interfaces"));
125 return internalRequestProperty(QLatin1String(
"SupportsRequestHints"));
136 return internalRequestAllProperties();
197 inline QDBusPendingReply<QDBusObjectPath>
CreateChannel(
const QDBusObjectPath& account,
const QVariantMap& requestedProperties, qlonglong userActionTime,
const QString& preferredHandler,
int timeout = -1)
199 if (!invalidationReason().isEmpty()) {
200 return QDBusPendingReply<QDBusObjectPath>(QDBusMessage::createError(
201 invalidationReason(),
202 invalidationMessage()
206 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
207 this->staticInterfaceName(), QLatin1String(
"CreateChannel"));
208 callMessage << QVariant::fromValue(account) << QVariant::fromValue(requestedProperties) << QVariant::fromValue(userActionTime) << QVariant::fromValue(preferredHandler);
209 return this->connection().asyncCall(callMessage, timeout);
267 inline QDBusPendingReply<QDBusObjectPath>
EnsureChannel(
const QDBusObjectPath& account,
const QVariantMap& requestedProperties, qlonglong userActionTime,
const QString& preferredHandler,
int timeout = -1)
269 if (!invalidationReason().isEmpty()) {
270 return QDBusPendingReply<QDBusObjectPath>(QDBusMessage::createError(
271 invalidationReason(),
272 invalidationMessage()
276 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
277 this->staticInterfaceName(), QLatin1String(
"EnsureChannel"));
278 callMessage << QVariant::fromValue(account) << QVariant::fromValue(requestedProperties) << QVariant::fromValue(userActionTime) << QVariant::fromValue(preferredHandler);
279 return this->connection().asyncCall(callMessage, timeout);
414 inline QDBusPendingReply<QDBusObjectPath>
CreateChannelWithHints(
const QDBusObjectPath& account,
const QVariantMap& requestedProperties, qlonglong userActionTime,
const QString& preferredHandler,
const QVariantMap& hints,
int timeout = -1)
416 if (!invalidationReason().isEmpty()) {
417 return QDBusPendingReply<QDBusObjectPath>(QDBusMessage::createError(
418 invalidationReason(),
419 invalidationMessage()
423 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
424 this->staticInterfaceName(), QLatin1String(
"CreateChannelWithHints"));
425 callMessage << QVariant::fromValue(account) << QVariant::fromValue(requestedProperties) << QVariant::fromValue(userActionTime) << QVariant::fromValue(preferredHandler) << QVariant::fromValue(hints);
426 return this->connection().asyncCall(callMessage, timeout);
534 inline QDBusPendingReply<QDBusObjectPath>
EnsureChannelWithHints(
const QDBusObjectPath& account,
const QVariantMap& requestedProperties, qlonglong userActionTime,
const QString& preferredHandler,
const QVariantMap& hints,
int timeout = -1)
536 if (!invalidationReason().isEmpty()) {
537 return QDBusPendingReply<QDBusObjectPath>(QDBusMessage::createError(
538 invalidationReason(),
539 invalidationMessage()
543 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
544 this->staticInterfaceName(), QLatin1String(
"EnsureChannelWithHints"));
545 callMessage << QVariant::fromValue(account) << QVariant::fromValue(requestedProperties) << QVariant::fromValue(userActionTime) << QVariant::fromValue(preferredHandler) << QVariant::fromValue(hints);
546 return this->connection().asyncCall(callMessage, timeout);
628 inline QDBusPendingReply<Tp::ObjectPathList, Tp::NotDelegatedMap>
DelegateChannels(
const Tp::ObjectPathList& channels, qlonglong userActionTime,
const QString& preferredHandler,
int timeout = -1)
630 if (!invalidationReason().isEmpty()) {
631 return QDBusPendingReply<Tp::ObjectPathList, Tp::NotDelegatedMap>(QDBusMessage::createError(
632 invalidationReason(),
633 invalidationMessage()
637 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
638 this->staticInterfaceName(), QLatin1String(
"DelegateChannels"));
639 callMessage << QVariant::fromValue(channels) << QVariant::fromValue(userActionTime) << QVariant::fromValue(preferredHandler);
640 return this->connection().asyncCall(callMessage, timeout);
678 inline QDBusPendingReply<>
PresentChannel(
const QDBusObjectPath& channel, qlonglong userActionTime,
int timeout = -1)
680 if (!invalidationReason().isEmpty()) {
681 return QDBusPendingReply<>(QDBusMessage::createError(
682 invalidationReason(),
683 invalidationMessage()
687 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
688 this->staticInterfaceName(), QLatin1String(
"PresentChannel"));
689 callMessage << QVariant::fromValue(channel) << QVariant::fromValue(userActionTime);
690 return this->connection().asyncCall(callMessage, timeout);
694 virtual void invalidate(
Tp::DBusProxy *,
const QString &,
const QString &);
717 return QLatin1String(
"org.freedesktop.Telepathy.ChannelDispatcher.Interface.Messages1");
728 const QString& busName,
729 const QString& objectPath,
742 const QDBusConnection& connection,
743 const QString& busName,
744 const QString& objectPath,
782 return internalRequestAllProperties();
873 inline QDBusPendingReply<QString>
SendMessage(
const QDBusObjectPath& account,
const QString& targetID,
const Tp::MessagePartList& message, uint flags,
int timeout = -1)
875 if (!invalidationReason().isEmpty()) {
876 return QDBusPendingReply<QString>(QDBusMessage::createError(
877 invalidationReason(),
878 invalidationMessage()
882 QDBusMessage callMessage = QDBusMessage::createMethodCall(this->service(), this->path(),
883 this->staticInterfaceName(), QLatin1String(
"SendMessage"));
884 callMessage << QVariant::fromValue(account) << QVariant::fromValue(targetID) << QVariant::fromValue(message) << QVariant::fromValue(flags);
885 return this->connection().asyncCall(callMessage, timeout);
889 virtual void invalidate(
Tp::DBusProxy *,
const QString &,
const QString &);
static QLatin1String staticInterfaceName()
Definition: cli-channel-dispatcher.h:55
QDBusPendingReply< QDBusObjectPath > EnsureChannelWithHints(const QDBusObjectPath &account, const QVariantMap &requestedProperties, qlonglong userActionTime, const QString &preferredHandler, const QVariantMap &hints, int timeout=-1)
Definition: cli-channel-dispatcher.h:534
Definition: cli-channel-dispatcher.h:704
Tp::PendingVariantMap * requestAllProperties() const
Definition: cli-channel-dispatcher.h:134
Definition: build/TelepathyQt/_gen/types.h:84
Definition: cli-channel-dispatcher.h:44
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::PendingVariantMap * requestAllProperties() const
Definition: cli-channel-dispatcher.h:780
QDBusPendingReply< QString > SendMessage(const QDBusObjectPath &account, const QString &targetID, const Tp::MessagePartList &message, uint flags, int timeout=-1)
Definition: cli-channel-dispatcher.h:873
QDBusPendingReply< Tp::ObjectPathList, Tp::NotDelegatedMap > DelegateChannels(const Tp::ObjectPathList &channels, qlonglong userActionTime, const QString &preferredHandler, int timeout=-1)
Definition: cli-channel-dispatcher.h:628
QDBusPendingReply< QDBusObjectPath > CreateChannel(const QDBusObjectPath &account, const QVariantMap &requestedProperties, qlonglong userActionTime, const QString &preferredHandler, int timeout=-1)
Definition: cli-channel-dispatcher.h:197
QDBusPendingReply< QDBusObjectPath > CreateChannelWithHints(const QDBusObjectPath &account, const QVariantMap &requestedProperties, qlonglong userActionTime, const QString &preferredHandler, const QVariantMap &hints, int timeout=-1)
Definition: cli-channel-dispatcher.h:414
The PendingVariantMap class is a generic subclass of PendingOperation representing a pending D-Bus me...
Definition: pending-variant-map.h:38
Tp::PendingVariant * requestPropertyInterfaces() const
Definition: cli-channel-dispatcher.h:105
Tp::PendingVariant * requestPropertySupportsRequestHints() const
Definition: cli-channel-dispatcher.h:123
Definition: abstract-adaptor.cpp:31
The PendingVariant class is a generic subclass of PendingOperation representing a pending D-Bus metho...
Definition: pending-variant.h:38
static QLatin1String staticInterfaceName()
Definition: cli-channel-dispatcher.h:715
QList< MessagePart > MessagePartList
Definition: build/TelepathyQt/_gen/types.h:2040
The DBusProxy class is a base class representing a remote object available over D-Bus.
Definition: dbus-proxy.h:42
QDBusPendingReply< QDBusObjectPath > EnsureChannel(const QDBusObjectPath &account, const QVariantMap &requestedProperties, qlonglong userActionTime, const QString &preferredHandler, int timeout=-1)
Definition: cli-channel-dispatcher.h:267
QDBusPendingReply PresentChannel(const QDBusObjectPath &channel, qlonglong userActionTime, int timeout=-1)
Definition: cli-channel-dispatcher.h:678