Are there public APIs available to check/validate ...
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu Jul 14 02:56:07 PDT 2011
On Wed, 13 Jul 2011 at 21:49:35 +0200, rony wrote:
> Are there any public APIs avaiable for checking bus names, interface
> names, object paths and members?
Sadly not. I've reimplemented them twice, in dbus-python and telepathy-glib;
you're welcome to borrow either implementation (licensed under the Expat
license and the LGPL-2.1+, respectively).
If you're in a GLib/GObject environment, similar things are available in GLib
(for object paths, as part of GVariant, and UTF-8) and GIO (for the rest).
I must admit I'm not clear on why none of these are available as public API,
particularly when that would have been easy to do. Havoc, do you still
read this list? If so, why are these (apparently deliberately) not public?
It'd be good to have them public as part of the general principle of "if a
function has preconditions, then language bindings should be able to check
those preconditions themselves".
I think it'd be worth preparing a patch for dbus-1.5 that (finally) makes
these things available as public API, unless there's a compelling reason not
to; I'll open a bug.
S
More information about the dbus
mailing list