[packagekit] [Q] How "GetDepends" connect with "get_depends"

Richard Hughes hughsient at gmail.com
Wed Sep 17 05:04:22 PDT 2008


On Wed, 2008-09-17 at 18:55 +0800, NZzi wrote:
> > dbus_g_object_type_install_info (PK_TYPE_TRANSACTION,
> &dbus_glib_pk_transaction_object_info);
> > dbus_g_connection_register_g_object (connection, item->tid, G_OBJECT
> (item->transaction));
> > }}}
> > 
> > The last two lines register the PkTransaction object on the bus so
> that
> > it accepts the dbus method on that interface. Worthwhile to note is
> that
> > the "tid" is also the DBUS path.
> 
> 
> thanks for your patient reply.

No problem, this was all new to me once.

> after goting dbus method on that interface(PkTransaction),
> how packagekit know to invoke pk_transaction_get_depends(),
> when received a "GetDepends" method from dbus?

That last little step is done by dbus-glib, and I honestly don't know
how the internals works.

All I know is that if I call dbus_g_connection_register_g_object after
feeding it a .xml introspection file (look at Makefile.am) it converts a
dbus MethodNameLikeThis to a a function_name_like_this.

If you checkout the dbus-glib source code I'm sure it'll be interesting
reading -- I've never played much with the internals and so can't help
you much more, sorry.

Richard.




More information about the PackageKit mailing list