using dbus_connection_read_write(_dispatch)

Fritz Code codefritz at googlemail.com
Wed Jun 18 14:30:28 PDT 2008


Hi,

I'm wondering how to implement my application, I cant use a higher language
API but I have to use the low-level C API.

On the one hand I use dbus_connection_register_object_path to register to
the interface of an object (let's call it Obj-xy) on  the bus to implement
some methods which gets called.
I create a DBusObjectPathVTable variable and add a function "message_obj-xy"
which handles the method calls from Obj-xy. I use
dbus_message_is_method_call to check incoming message.

At the same time I have setup a filter function (just before I also did
add_match), with this function I can check every message before it gets
dispatched by my message_obj-xy function.
Anyway basically the only difference between this to handlings is that in
the filter function I check only if there are messages of type signal, and
in message_obj-xy function I check only message of type method calls?
So far I'm sort of confused between the difference of adding a filter
function ( which always includes using add_match)
and on the other side implementing an interface of an object by using a
DBusObjectPathVTable.

With both techniques you basically can check incoming message, and I guess
of all three types, signal, method calls  and errors?



thanks



-- 
Regards,
--Codefritz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20080618/a6f8f87b/attachment.htm 


More information about the dbus mailing list