[Telepathy-commits] [telepathy-glib/master] BaseConnection: use invisible DBusPropertiesMixin for SelfHandle property
Will Thompson
will.thompson at collabora.co.uk
Tue Sep 9 08:44:31 PDT 2008
This makes tp_base_connection_class_register_with_dbus_properties_mixin
unnecessary, so remove it.
---
telepathy-glib/base-connection.c | 44 +++++++++++--------------------------
telepathy-glib/base-connection.h | 3 --
2 files changed, 13 insertions(+), 34 deletions(-)
diff --git a/telepathy-glib/base-connection.c b/telepathy-glib/base-connection.c
index bfdb288..dd970ea 100644
--- a/telepathy-glib/base-connection.c
+++ b/telepathy-glib/base-connection.c
@@ -536,6 +536,13 @@ tp_base_connection_constructor (GType type, guint n_construct_properties,
return (GObject *)self;
}
+
+static TpDBusPropertiesMixinPropImpl connection_properties[] = {
+ { "SelfHandle", "self-handle", NULL },
+ { NULL }
+};
+
+
static void
tp_base_connection_class_init (TpBaseConnectionClass *klass)
{
@@ -599,6 +606,12 @@ tp_base_connection_class_init (TpBaseConnectionClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+
+ tp_dbus_properties_mixin_class_init (object_class, 0);
+ tp_dbus_properties_mixin_implement_interface (object_class,
+ TP_IFACE_QUARK_CONNECTION,
+ tp_dbus_properties_mixin_getter_gobject_properties, NULL,
+ connection_properties);
}
static void
@@ -1849,34 +1862,3 @@ tp_base_connection_register_with_contacts_mixin (TpBaseConnection *self)
TP_IFACE_CONNECTION,
tp_base_connection_fill_contact_attributes);
}
-
-
-static TpDBusPropertiesMixinPropImpl connection_properties[] = {
- { "SelfHandle", "self-handle", NULL },
- { NULL }
-};
-
-/**
- * tp_base_connection_class_register_with_dbus_properties_mixin:
- * @cls: A subclass of #TpBaseConnectionClass which uses the D-Bus properties
- * mixin.
- *
- * Implements the Connection D-Bus properties of instances of this subclass
- * using the D-Bus properties mixin. The D-Bus properties mixin should be
- * initialized before this function is called, and this function must only
- * be called once.
- *
- * Having called this function, you must use
- * tp_base_connection_set_self_handle() rather than modifying the self_handle
- * field directly so that changes to the self handle can be correctly
- * signalled on the bus.
- *
- * Since: 0.7.UNRELEASED
- */
-void
-tp_base_connection_class_register_with_dbus_properties_mixin (GObjectClass *cls)
-{
- tp_dbus_properties_mixin_implement_interface (cls, TP_IFACE_QUARK_CONNECTION,
- tp_dbus_properties_mixin_getter_gobject_properties, NULL,
- connection_properties);
-}
diff --git a/telepathy-glib/base-connection.h b/telepathy-glib/base-connection.h
index e9a05c3..c42fc02 100644
--- a/telepathy-glib/base-connection.h
+++ b/telepathy-glib/base-connection.h
@@ -273,9 +273,6 @@ void tp_base_connection_dbus_request_handles (TpSvcConnection *iface,
void tp_base_connection_register_with_contacts_mixin (TpBaseConnection *self);
-void tp_base_connection_class_register_with_dbus_properties_mixin (
- GObjectClass *cls);
-
/* TYPE MACROS */
#define TP_TYPE_BASE_CONNECTION \
(tp_base_connection_get_type ())
--
1.5.6.3
More information about the Telepathy-commits
mailing list