C convenience lib (was Re: Is dbus_pending_call_set_notify() thread safe?)
thiago at kde.org
Fri Aug 3 10:23:24 PDT 2007
Havoc Pennington wrote:
>> 1) does it handle properly the introspections for objects with
>> sub-nodes only (no interfaces)? I.e., object paths that were created
>> only because they have children objects, like /org for
>If you register a "fallback handler" for a whole subtree you would
>normally implement Introspect() on that subtree also, since libdbus
>doesn't know what's "inside" it.
I was talking about the leading path to an object that was registered.
That is, nothing registered /org, but it must exist
because /org/freedesktop/DBus does.
libdbus-1 must generate it.
>> 2) how does it insert the sub-nodes XML entries for existing objects?
>> That is, suppose I register /foo and /foo/bar. If I get the
>> introspection call for /foo, does libdbus-1 insert the <node
>> name="bar"/> into my XML data?
>The only thing libdbus does is that if all app handlers return
>NOT_YET_HANDLED for an Introspect(), it has a default Introspect()
>implementation that just lists the registered child nodes. This default
>implementation is used for nodes that nobody owns, for example usually
Good. This answers the question above.
>If you handle Introspect() at all, you have to handle it entirely by
>listing the child nodes and including them in your xml, with
Good, that makes sense. The apidox doesn't say so, but does it return only
dbus_connection_list_registered("/foo") returns "bar/baz" too?
>> 3) does dbus_bus_add_match causes a reference count to go up
>> somewhere? (preferrably, in the daemon)
>Right, if you add the same match 3 times you must remove it 3 times
>before it goes away.
Good. Those are the good answers to my questions.
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/dbus/attachments/20070803/36caec0f/attachment.pgp
More information about the dbus