From 9d3f0a30c4e5e18b2001ab6d74d400f351d00c1f Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Wed, 3 Apr 2013 23:24:34 +0200 Subject: [PATCH] add method Account::createDbusTubeRoom --- TelepathyQt/account.cpp | 27 +++++++++++++++++++++++++++ TelepathyQt/account.h | 6 ++++++ 2 files changed, 33 insertions(+) diff --git a/TelepathyQt/account.cpp b/TelepathyQt/account.cpp index c35759a..c2ad581 100644 --- a/TelepathyQt/account.cpp +++ b/TelepathyQt/account.cpp @@ -418,6 +418,20 @@ QVariantMap dbusTubeRequest(const Tp::ContactPtr &contact, const QString &servic return request; } +QVariantMap dbusTubeRoomRequest(const QString &roomName, const QString &serviceName) +{ + QVariantMap request; + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".ChannelType"), + TP_QT_IFACE_CHANNEL_TYPE_DBUS_TUBE); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType"), + (uint) Tp::HandleTypeRoom); + request.insert(TP_QT_IFACE_CHANNEL_TYPE_DBUS_TUBE + QLatin1String(".ServiceName"), + serviceName); + request.insert(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetID"), + roomName); + return request; +} + QVariantMap conferenceCommonRequest(const QString &channelType, Tp::HandleType targetHandleType, const QList &channels) { @@ -2892,6 +2906,19 @@ PendingChannelRequest* Account::createDBusTube( preferredHandler, true, hints); } +PendingChannelRequest* Account::createDBusTubeRoom( + const QString &room, + const QString &serviceName, + const QDateTime &userActionTime, + const QString &preferredHandler, + const ChannelRequestHints &hints) +{ + QVariantMap request = dbusTubeRoomRequest(room, serviceName); + + return new PendingChannelRequest(AccountPtr(this), request, userActionTime, + preferredHandler, true, hints); +} + /** * Start a request to create a conference media call with the given * channels \a channels. diff --git a/TelepathyQt/account.h b/TelepathyQt/account.h index e1e00c3..72f858f 100644 --- a/TelepathyQt/account.h +++ b/TelepathyQt/account.h @@ -330,6 +330,12 @@ public: const QDateTime &userActionTime = QDateTime::currentDateTime(), const QString &preferredHandler = QString(), const ChannelRequestHints &hints = ChannelRequestHints()); + PendingChannelRequest *createDBusTubeRoom( + const QString &room, + const QString &serviceName, + const QDateTime &userActionTime = QDateTime::currentDateTime(), + const QString &preferredHandler = QString(), + const ChannelRequestHints &hints = ChannelRequestHints()); TP_QT_DEPRECATED PendingChannelRequest *createConferenceStreamedMediaCall( const QList &channels, -- 1.7.10.4