Are there public APIs available to check/validate ...
rony at wu.ac.at
Thu Jul 14 03:57:16 PDT 2011
On 14.07.2011 11:56, Simon McVittie wrote:
> 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).
Thank you very much for your kind offer! Will be implementing these
checks directly in ooRexx though, which will allow any ooRexx programmer
to look up the source right with the distribution.
> 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).
The ooRexx language binding should be as "environment agnostic" as
possible to allow it to be used in any environment where a DBUS
implementation is available.
> 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.
(The most authorative check would be the one dbus undertakes as the
result of that check determines whether a message can be sent
successfully or not.)
More information about the dbus