[Telepathy-commits] [telepathy-gabble/master] GabbleRoomlistChannel: expose interfaces as a GObject property
Simon McVittie
simon.mcvittie at collabora.co.uk
Tue Aug 19 10:53:08 PDT 2008
20080606101220-53eee-3ed30b72e6989b82cd8a3e4560a4ba18c70421de.gz
---
src/gabble-roomlist-channel.c | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/src/gabble-roomlist-channel.c b/src/gabble-roomlist-channel.c
index 1a46d2d..1a56626 100644
--- a/src/gabble-roomlist-channel.c
+++ b/src/gabble-roomlist-channel.c
@@ -58,6 +58,10 @@ G_DEFINE_TYPE_WITH_CODE (GabbleRoomlistChannel, gabble_roomlist_channel,
G_IMPLEMENT_INTERFACE (TP_TYPE_CHANNEL_IFACE, NULL)
);
+static const gchar *gabble_roomlist_channel_interfaces[] = {
+ NULL
+};
+
/* properties */
enum
{
@@ -66,6 +70,7 @@ enum
PROP_HANDLE_TYPE,
PROP_HANDLE,
PROP_CONNECTION,
+ PROP_INTERFACES,
PROP_CONFERENCE_SERVER,
LAST_PROPERTY
};
@@ -154,6 +159,9 @@ gabble_roomlist_channel_get_property (GObject *object,
case PROP_CONNECTION:
g_value_set_object (value, priv->conn);
break;
+ case PROP_INTERFACES:
+ g_value_set_boxed (value, gabble_roomlist_channel_interfaces);
+ break;
case PROP_CONFERENCE_SERVER:
g_value_set_string (value, priv->conference_server);
break;
@@ -266,6 +274,13 @@ gabble_roomlist_channel_class_init (GabbleRoomlistChannelClass *gabble_roomlist_
G_PARAM_STATIC_BLURB);
g_object_class_install_property (object_class, PROP_CONFERENCE_SERVER,
param_spec);
+
+ param_spec = g_param_spec_boxed ("interfaces", "Extra D-Bus interfaces",
+ "Additional Channel.Interface.* interfaces",
+ G_TYPE_STRV,
+ 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);
}
static void stop_listing (GabbleRoomlistChannel *self);
@@ -595,9 +610,8 @@ static void
gabble_roomlist_channel_get_interfaces (TpSvcChannel *iface,
DBusGMethodInvocation *context)
{
- const char *interfaces[] = { NULL };
-
- tp_svc_channel_return_from_get_interfaces (context, interfaces);
+ tp_svc_channel_return_from_get_interfaces (context,
+ gabble_roomlist_channel_interfaces);
}
--
1.5.6.3
More information about the Telepathy-commits
mailing list