D-Bus "client" libraries?

Tobias Hunger tobias at aquazul.com
Sat Mar 29 23:08:22 GMT 2008


Hello there!

To make it as simple as possible to use Decibel I generated a "client library" 
that holds all the D-Bus interfaces exported by the decibel daemon incl. the 
type definitions and the marshalling code necessary to send those types over 
the bus. To do so I added my own version of Qt4_ADD_DBUS_INTERFACE that 
patches a export macro into the code generated by dbusxml2cpp. This was to 
get something rolling asap. Now that Decibel is in the queue for kdereview 
I'd like to come up with a proper solution.

So what is the proper way to provide access to D-Bus interfaces to other 
developers?

I can think of three options:

1) Adding export macros the the code generated by dbusxml2cpp and stuffing it 
(together with the required helper code) into a shared library.

2) Generate the code and wrap it into more code which is then exported. That 
is a valid approach if the wrapper provides some abstraction from the bare 
D-Bus interfaces. Otherwise it seems like a waste of time to me.

3) Provide XML files and ask developers to regenerate all the code themselves. 
This seems awfully impractical to me as some of the code can not get 
generated (marshalling, type definition). All users of those interfaces will 
need to redo that.

Am I missing something?

Eventually decibel will probably end up with option 2) in time. For now there 
is little code to make use of Decibel more convenience than using the bare 
D-Bus bindings, so I am currently favoring option 1).

Best Regards,
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080330/054dc29a/attachment.sig>
-------------- next part --------------
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


More information about the kde-core-devel mailing list