summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmundson <kde@davidedmundson.co.uk>2013-04-03 21:24:34 (GMT)
committerDario Freddi <dario.freddi@ispirata.com>2013-07-14 22:58:40 (GMT)
commitd007ff722c77618cbbfbdbc5c495e5b263e14f80 (patch)
tree70f81f90c25657a4d9d2463464790871c7dbeda9
parentcc2e296d8e7fe0500c48574052b00778bb3840f4 (diff)
downloadtelepathy-qt4-d007ff722c77618cbbfbdbc5c495e5b263e14f80.tar.gz
telepathy-qt4-d007ff722c77618cbbfbdbc5c495e5b263e14f80.tar.xz
account: add method Account::createDbusTubeRoom
fixes fd.o #63089 Reviewed-by: Dario Freddi <dario.freddi@ispirata.com>
-rw-r--r--TelepathyQt/account.cpp27
-rw-r--r--TelepathyQt/account.h6
2 files changed, 33 insertions, 0 deletions
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<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 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<ChannelPtr> &channels,