summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2008-08-11 12:10:27 +0100
committerSjoerd Simons <sjoerd@luon.net>2008-08-11 12:49:51 +0100
commit0406459323274637e29e6b21eb295ae99303b844 (patch)
tree8eeb5b6c18f984560f01cc472b3ed9093e57b3af /src
parentfc30e83b41cb3a560df2eb8fab81ea7b9905dfc7 (diff)
downloadtelepathy-salut-0406459323274637e29e6b21eb295ae99303b844.tar.gz
SalutMucChannel: expose interface as a GObject property
Diffstat (limited to 'src')
-rw-r--r--src/salut-muc-channel.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/salut-muc-channel.c b/src/salut-muc-channel.c
index 7df53604..f3f682bf 100644
--- a/src/salut-muc-channel.c
+++ b/src/salut-muc-channel.c
@@ -61,6 +61,11 @@ G_DEFINE_TYPE_WITH_CODE(SalutMucChannel, salut_muc_channel, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL_TYPE_TEXT, text_iface_init);
)
+static const char *salut_muc_channel_interfaces[] = {
+ TP_IFACE_CHANNEL_INTERFACE_GROUP,
+ NULL
+};
+
/* signal enum */
enum
{
@@ -83,6 +88,7 @@ enum
PROP_NAME,
PROP_CREATOR,
PROP_XMPP_CONNECTION_MANAGER,
+ PROP_INTERFACES,
LAST_PROPERTY
};
@@ -161,6 +167,9 @@ salut_muc_channel_get_property (GObject *object,
case PROP_XMPP_CONNECTION_MANAGER:
g_value_set_object (value, priv->xmpp_connection_manager);
break;
+ case PROP_INTERFACES:
+ g_value_set_static_boxed (value, salut_muc_channel_interfaces);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -738,6 +747,14 @@ salut_muc_channel_class_init (SalutMucChannelClass *salut_muc_channel_class) {
g_object_class_install_property (object_class,
PROP_CREATOR, 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);
+
+
signals[READY] = g_signal_new (
"ready",
G_OBJECT_CLASS_TYPE (salut_muc_channel_class),
@@ -1135,9 +1152,8 @@ static void
salut_muc_channel_get_interfaces (TpSvcChannel *iface,
DBusGMethodInvocation *context)
{
- const char *interfaces[] = { TP_IFACE_CHANNEL_INTERFACE_GROUP, NULL };
-
- tp_svc_channel_return_from_get_interfaces (context, interfaces);
+ tp_svc_channel_return_from_get_interfaces (context,
+ salut_muc_channel_interfaces);
}