summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Pessi <Pekka.Pessi@nokia.com>2010-10-20 17:05:52 +0300
committerPekka Pessi <Pekka.Pessi@nokia.com>2010-10-21 15:55:43 +0300
commiteada2e29386067f68463a6d22f3be536e4188e26 (patch)
treef3b3535e4a385856e219ceea61ffbbb91b0ee2b0
parentc7ba4947a7bbf1a829c03d2b2685b9ed75b4b76a (diff)
media-manager: support .InitialVideo = FALSE
-rw-r--r--src/ring-media-manager.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/ring-media-manager.c b/src/ring-media-manager.c
index dbfefc4..193fa98 100644
--- a/src/ring-media-manager.c
+++ b/src/ring-media-manager.c
@@ -520,6 +520,18 @@ tp_asv_get_initial_audio(GHashTable *properties, gboolean default_value)
return default_value;
}
+static gboolean
+tp_asv_get_initial_video (GHashTable *properties, gboolean default_value)
+{
+ GValue *value = g_hash_table_lookup (properties,
+ TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA ".InitialVideo");
+
+ if (value && G_VALUE_HOLDS_BOOLEAN (value))
+ return g_value_get_boolean (value);
+ else
+ return default_value;
+}
+
/* ---------------------------------------------------------------------- */
/* TpChannelManagerIface interface */
@@ -555,6 +567,7 @@ static char const * const ring_call_channel_allowed_properties[] =
{
TP_IFACE_CHANNEL ".TargetHandle",
TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA ".InitialAudio",
+ TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA ".InitialVideo",
NULL
};
@@ -618,6 +631,7 @@ static char const * const ring_conference_channel_allowed_properties[] =
RING_IFACE_CHANNEL_INTERFACE_CONFERENCE ".InitialChannels",
TP_IFACE_CHANNEL ".TargetHandleType",
TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA ".InitialAudio",
+ TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA ".InitialVideo",
NULL
};
@@ -729,7 +743,8 @@ ring_media_requestotron(RingMediaManager *self,
if (self->priv->status != TP_CONNECTION_STATUS_CONNECTED)
return FALSE;
- handle = tp_asv_get_uint32(properties, TP_IFACE_CHANNEL ".TargetHandle", NULL);
+ handle = tp_asv_get_uint32 (properties,
+ TP_IFACE_CHANNEL ".TargetHandle", NULL);
if (handle == priv->connection->parent.self_handle ||
handle == priv->connection->anon_handle)
@@ -743,6 +758,14 @@ ring_media_requestotron(RingMediaManager *self,
return ring_media_manager_outgoing_call(self, request, 0, 0, NULL, FALSE);
}
+ if (tp_asv_get_initial_video (properties, FALSE))
+ {
+ tp_channel_manager_emit_request_failed (self, request,
+ TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
+ "Video calls are not supported");
+ return TRUE;
+ }
+
if (handle != 0 &&
ring_properties_satisfy(properties,
ring_call_channel_fixed_properties(),
@@ -759,7 +782,7 @@ ring_media_requestotron(RingMediaManager *self,
g_error_free(error);
return TRUE;
}
- /* We do not support 'w' */
+ /* We do not yes support 'w' */
else if (strchr(target_id, 'w')) {
tp_channel_manager_emit_request_failed(
self, request,