[Telepathy-commits] [telepathy-gabble/master] GabbleRoomlistChannel: implement spec 0.17.7 properties

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Aug 19 10:53:10 PDT 2008


20080606130004-53eee-db0b72516b2657b1545cb899233e9ffe94150a7a.gz
---
 src/gabble-roomlist-channel.c |   20 ++++++++++++++++++++
 src/gabble-roomlist-channel.h |    2 ++
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/src/gabble-roomlist-channel.c b/src/gabble-roomlist-channel.c
index d677e39..afa0ff3 100644
--- a/src/gabble-roomlist-channel.c
+++ b/src/gabble-roomlist-channel.c
@@ -30,6 +30,7 @@
 #include <telepathy-glib/interfaces.h>
 #include <telepathy-glib/channel-iface.h>
 #include <telepathy-glib/svc-channel.h>
+#include <telepathy-glib/svc-generic.h>
 
 #define DEBUG_FLAG GABBLE_DEBUG_ROOMLIST
 #include "debug.h"
@@ -230,6 +231,21 @@ static void gabble_roomlist_channel_finalize (GObject *object);
 static void
 gabble_roomlist_channel_class_init (GabbleRoomlistChannelClass *gabble_roomlist_channel_class)
 {
+  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 }
+  };
   GObjectClass *object_class = G_OBJECT_CLASS (gabble_roomlist_channel_class);
   GParamSpec *param_spec;
 
@@ -275,6 +291,10 @@ gabble_roomlist_channel_class_init (GabbleRoomlistChannelClass *gabble_roomlist_
       G_PARAM_READABLE |
       G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_STATIC_NAME);
   g_object_class_install_property (object_class, PROP_INTERFACES, param_spec);
+
+  gabble_roomlist_channel_class->dbus_props_class.interfaces = prop_interfaces;
+  tp_dbus_properties_mixin_class_init (object_class,
+      G_STRUCT_OFFSET (GabbleRoomlistChannelClass, dbus_props_class));
 }
 
 static void stop_listing (GabbleRoomlistChannel *self);
diff --git a/src/gabble-roomlist-channel.h b/src/gabble-roomlist-channel.h
index 8fd5da2..9bd697c 100644
--- a/src/gabble-roomlist-channel.h
+++ b/src/gabble-roomlist-channel.h
@@ -32,6 +32,8 @@ typedef struct _GabbleRoomlistChannelClass GabbleRoomlistChannelClass;
 
 struct _GabbleRoomlistChannelClass {
     GObjectClass parent_class;
+
+    TpDBusPropertiesMixinClass dbus_props_class;
 };
 
 struct _GabbleRoomlistChannel {
-- 
1.5.6.3




More information about the Telepathy-commits mailing list