telepathy-qt: ChannelClassSpec: Add mediaCall() method.
Dario Freddi
drf at kemper.freedesktop.org
Fri Jul 13 10:43:08 PDT 2012
Module: telepathy-qt
Branch: master
Commit: 1083491c611196246bfc0d4b203be95c6bd0b9d7
URL: http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=1083491c611196246bfc0d4b203be95c6bd0b9d7
Author: George Kiagiadakis <george.kiagiadakis at collabora.com>
Date: Fri Jul 13 18:43:11 2012 +0300
ChannelClassSpec: Add mediaCall() method.
This can be useful for observers that wish to observe both
audio and video calls. Using this method, they won't have to
have two channel filters, one for audio and one for video.
---
TelepathyQt/channel-class-spec.cpp | 15 +++++++++++++++
TelepathyQt/channel-class-spec.h | 7 +++----
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/TelepathyQt/channel-class-spec.cpp b/TelepathyQt/channel-class-spec.cpp
index 7b18f94..ae74b27 100644
--- a/TelepathyQt/channel-class-spec.cpp
+++ b/TelepathyQt/channel-class-spec.cpp
@@ -252,6 +252,21 @@ ChannelClassSpec ChannelClassSpec::unnamedTextChat(const QVariantMap &additional
}
}
+ChannelClassSpec ChannelClassSpec::mediaCall(const QVariantMap &additionalProperties)
+{
+ static ChannelClassSpec spec;
+
+ if (!spec.isValid()) {
+ spec = ChannelClassSpec(TP_QT_IFACE_CHANNEL_TYPE_CALL, HandleTypeContact);
+ }
+
+ if (additionalProperties.isEmpty()) {
+ return spec;
+ } else {
+ return ChannelClassSpec(spec, additionalProperties);
+ }
+}
+
ChannelClassSpec ChannelClassSpec::audioCall(const QVariantMap &additionalProperties)
{
static ChannelClassSpec spec;
diff --git a/TelepathyQt/channel-class-spec.h b/TelepathyQt/channel-class-spec.h
index 758cc74..90c6a24 100644
--- a/TelepathyQt/channel-class-spec.h
+++ b/TelepathyQt/channel-class-spec.h
@@ -193,10 +193,9 @@ public:
static ChannelClassSpec textChatroom(const QVariantMap &additionalProperties = QVariantMap());
static ChannelClassSpec unnamedTextChat(const QVariantMap &additionalProperties = QVariantMap());
- static ChannelClassSpec audioCall(const QVariantMap &additionalProperties =
- QVariantMap());
- static ChannelClassSpec videoCall(const QVariantMap &additionalProperties =
- QVariantMap());
+ static ChannelClassSpec mediaCall(const QVariantMap &additionalProperties = QVariantMap());
+ static ChannelClassSpec audioCall(const QVariantMap &additionalProperties = QVariantMap());
+ static ChannelClassSpec videoCall(const QVariantMap &additionalProperties = QVariantMap());
static ChannelClassSpec videoCallWithAudio(const QVariantMap &additionalProperties =
QVariantMap());
More information about the telepathy-commits
mailing list