simon.mcvittie at collabora.co.uk
Tue Feb 26 01:34:13 PST 2008
-----BEGIN PGP SIGNED MESSAGE-----
On Mon, 25 Feb 2008 at 18:05:18 +0100, Luigi Paioro wrote:
> Of course at that time this was a good solution, but I
> was wondering whether this issue has been carried forward, defining a
> formal translation object<->dictionary / dictionary<->object. I could
> define my private map, but if there were a general map, a standard,
> agreed upon by the DBus community, I would rather use it.
I don't think this makes a whole lot of sense in general. You can define a
mapping between what your particular use-case sees as an "object" and a
dict, but remember that D-Bus is meant to interoperate with many object
models: GObject, QObject, Python, Java, .Net, Perl, PHP (under
development, according to recent messages on this list!), object
models that haven't even been invented yet, and non-OO languages.
I'd suggest instead that your D-Bus API specification (you have one, right? :-)
describes the semantics of the contents of the dictionary in terms of
D-Bus only - implementors are then free to map it to a C++ class, a Perl hash,
or anything in between.
Imagine things that interoperate with your application being
implemented in Perl and Java, and consider whether your API still makes
sense in both cases. If it does, you're probably getting it right.
(I consider the Telepathy specification and the freedesktop.org Desktop
Notification specification to be good examples of interoperable D-Bus
APIs, although I'm biased because I'm involved in writing the Telepathy spec.)
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----
More information about the dbus