diff options
author | David Edmundson <kde@davidedmundson.co.uk> | 2013-04-03 23:24:34 +0200 |
---|---|---|
committer | Dario Freddi <dario.freddi@ispirata.com> | 2013-07-15 00:58:40 +0200 |
commit | d007ff722c77618cbbfbdbc5c495e5b263e14f80 (patch) | |
tree | 70f81f90c25657a4d9d2463464790871c7dbeda9 | |
parent | cc2e296d8e7fe0500c48574052b00778bb3840f4 (diff) |
account: add method Account::createDbusTubeRoom
fixes fd.o #63089
Reviewed-by: Dario Freddi <dario.freddi@ispirata.com>
-rw-r--r-- | TelepathyQt/account.cpp | 27 | ||||
-rw-r--r-- | TelepathyQt/account.h | 6 |
2 files changed, 33 insertions, 0 deletions
diff --git a/TelepathyQt/account.cpp b/TelepathyQt/account.cpp index c35759a3..c2ad581e 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<Tp::ChannelPtr> &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 e1e00c35..72f858f5 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<ChannelPtr> &channels, |