summaryrefslogtreecommitdiff
path: root/src/call-content.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-11-11 12:51:24 +0000
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-12-07 18:58:06 +0000
commitc249abb214c6e388a2c4adceb82faf7454e02835 (patch)
tree564e19ead0b268ca61d3fe7e549186f57e7f9d1d /src/call-content.c
parent236a4f41ea7d657c90d8d30950548eca53b43e55 (diff)
downloadtelepathy-gabble-c249abb214c6e388a2c4adceb82faf7454e02835.tar.gz
Implement the Type property on Content
Diffstat (limited to 'src/call-content.c')
-rw-r--r--src/call-content.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/call-content.c b/src/call-content.c
index 89dbc001a..a5573e13d 100644
--- a/src/call-content.c
+++ b/src/call-content.c
@@ -69,6 +69,7 @@ enum
PROP_TARGET_HANDLE,
PROP_CONTACT_CODEC_MAP,
+ PROP_MEDIA_TYPE,
PROP_STREAMS,
};
@@ -135,6 +136,13 @@ gabble_call_content_get_property (GObject *object,
case PROP_CONNECTION:
g_value_set_object (value, priv->conn);
break;
+ case PROP_MEDIA_TYPE:
+ {
+ JingleMediaType mtype;
+ g_object_get (priv->content, "media-type", &mtype, NULL);
+ g_value_set_uint (value, mtype);
+ break;
+ }
case PROP_STREAMS:
{
GPtrArray *arr = g_ptr_array_sized_new (2);
@@ -239,6 +247,7 @@ gabble_call_content_class_init (
GObjectClass *object_class = G_OBJECT_CLASS (gabble_call_content_class);
GParamSpec *param_spec;
static TpDBusPropertiesMixinPropImpl content_props[] = {
+ { "Type", "media-type", NULL },
{ "Streams", "streams", NULL },
{ NULL }
};
@@ -308,6 +317,13 @@ gabble_call_content_class_init (
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_CONNECTION, param_spec);
+ param_spec = g_param_spec_uint ("media-type", "Media Type",
+ "The media type of this channel",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+ g_object_class_install_property (object_class, PROP_MEDIA_TYPE,
+ param_spec);
+
param_spec = g_param_spec_boxed ("streams", "Stream",
"The streams of this content",
TP_ARRAY_TYPE_OBJECT_PATH_LIST,