[Telepathy-commits] [telepathy-gabble/master] GabbleMediaChannel: implement GabbleExportableChannel
Simon McVittie
simon.mcvittie at collabora.co.uk
Tue Aug 19 10:54:16 PDT 2008
20080725150954-53eee-c66f19f7f48389a1209800ba4d26c5ae95ac88d2.gz
---
src/media-channel.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/src/media-channel.c b/src/media-channel.c
index cb21739..459c44c 100644
--- a/src/media-channel.c
+++ b/src/media-channel.c
@@ -37,6 +37,7 @@
#include "connection.h"
#include "debug.h"
+#include "exportable-channel.h"
#include "media-factory.h"
#include "media-session.h"
#include "media-session.h"
@@ -68,6 +69,7 @@ G_DEFINE_TYPE_WITH_CODE (GabbleMediaChannel, gabble_media_channel,
tp_properties_mixin_iface_init);
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_DBUS_PROPERTIES,
tp_dbus_properties_mixin_iface_init);
+ G_IMPLEMENT_INTERFACE (GABBLE_TYPE_EXPORTABLE_CHANNEL, NULL);
G_IMPLEMENT_INTERFACE (TP_TYPE_CHANNEL_IFACE, NULL));
static const gchar *gabble_media_channel_interfaces[] = {
@@ -97,6 +99,8 @@ enum
PROP_CREATOR_ID,
PROP_FACTORY,
PROP_INTERFACES,
+ PROP_CHANNEL_DESTROYED,
+ PROP_CHANNEL_PROPERTIES,
/* TP properties (see also below) */
PROP_NAT_TRAVERSAL,
PROP_STUN_SERVER,
@@ -427,6 +431,21 @@ gabble_media_channel_get_property (GObject *object,
case PROP_INTERFACES:
g_value_set_boxed (value, gabble_media_channel_interfaces);
break;
+ case PROP_CHANNEL_DESTROYED:
+ g_value_set_boolean (value, priv->closed);
+ break;
+ case PROP_CHANNEL_PROPERTIES:
+ g_value_set_boxed (value,
+ gabble_tp_dbus_properties_mixin_make_properties_hash (object,
+ TP_IFACE_CHANNEL, "TargetHandle",
+ TP_IFACE_CHANNEL, "TargetHandleType",
+ TP_IFACE_CHANNEL, "ChannelType",
+ GABBLE_IFACE_CHANNEL_FUTURE, "TargetID",
+ GABBLE_IFACE_CHANNEL_FUTURE, "InitiatorHandle",
+ GABBLE_IFACE_CHANNEL_FUTURE, "InitiatorID",
+ GABBLE_IFACE_CHANNEL_FUTURE, "Requested",
+ NULL));
+ break;
default:
param_name = g_param_spec_get_name (pspec);
@@ -556,6 +575,11 @@ gabble_media_channel_class_init (GabbleMediaChannelClass *gabble_media_channel_c
"handle-type");
g_object_class_override_property (object_class, PROP_HANDLE, "handle");
+ g_object_class_override_property (object_class, PROP_CHANNEL_DESTROYED,
+ "channel-destroyed");
+ g_object_class_override_property (object_class, PROP_CHANNEL_PROPERTIES,
+ "channel-properties");
+
param_spec = g_param_spec_string ("target-id", "Target JID",
"Currently empty, because this channel always has handle 0.",
NULL,
--
1.5.6.3
More information about the Telepathy-commits
mailing list