[Telepathy-commits] [telepathy-haze/master] Implement Channel DBus properties on IMChannel

Will Thompson will.thompson at collabora.co.uk
Mon Aug 18 10:52:50 PDT 2008


---
 src/im-channel.c |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/src/im-channel.c b/src/im-channel.c
index 912ac93..a1da4dd 100644
--- a/src/im-channel.c
+++ b/src/im-channel.c
@@ -471,6 +471,21 @@ haze_im_channel_class_init (HazeIMChannelClass *klass)
     GParamSpec *param_spec;
 
     static gboolean properties_mixin_initialized = FALSE;
+    static TpDBusPropertiesMixinPropImpl channel_props[] = {
+        { "TargetHandleType", "handle-type", NULL },
+        { "TargetHandle", "handle", NULL },
+        { "ChannelType", "channel-type", NULL },
+        { "Interfaces", "interfaces", NULL },
+        { NULL }
+    };
+    static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
+        { TP_IFACE_CHANNEL,
+          tp_dbus_properties_mixin_getter_gobject_properties,
+          NULL,
+          channel_props,
+        },
+        { NULL }
+    };
 
 
     g_type_class_add_private (klass, sizeof (HazeIMChannelPrivate));
@@ -513,7 +528,7 @@ haze_im_channel_class_init (HazeIMChannelClass *klass)
     if (!properties_mixin_initialized)
     {
         properties_mixin_initialized = TRUE;
-        klass->properties_class.interfaces = NULL;
+        klass->properties_class.interfaces = prop_interfaces;
         tp_dbus_properties_mixin_class_init (object_class,
             G_STRUCT_OFFSET (HazeIMChannelClass, properties_class));
     }
-- 
1.5.6.3




More information about the Telepathy-commits mailing list