DBusGProxy as parent gobject [PATCH]
robert.mcqueen at collabora.co.uk
Wed Jan 4 09:35:25 PST 2006
Havoc Pennington wrote:
> The property should be "connection" IMO rather than "manager" and the
> manager object should remain private.
> The "connection" property would take a DBusGConnection I think.
Yeah, I'd agree the patch looks a little confused here... the property
is called "manager" but is passed a DBusGConnection in most places, and
when it's set, it finds and stores the manager via a slot on the
DBusConnection. Conversely, when you get the "manager" property, you do
get the manager. I'd go for a "connection" property which was a
DBusGConnection, and when it's set, find and store the manager in the
current way, then you can implement the get using
DBUS_G_CONNECTION_FROM_CONNECTION on priv->manager->connection.
> You need to use the "private" feature of GObject to move the fields of
> DBusGProxy into a private struct. See g_type_class_add_private, etc. GTK
> has some examples of using it iirc you could grep for. There should be
> no public fields, only accessors (properties, functions).
I spoke to Ricardo on IRC, the 2nd version of the patch he just posted
More information about the dbus