DBus API problems & UTF-8

Kimmo Hämäläinen kimmo.hamalainen at nokia.com
Mon Jun 12 06:42:47 PDT 2006


On Mon, 2006-06-12 at 16:15, ext Thiago Macieira wrote:
> Kimmo Hämäläinen wrote:
> >> The solution would probably be to have a DBusError that is attached to
> >> that message and is set by any failing functions. This way, there
> >> would be no API changes, but it would allow you to obtain the error
> >> condition.
> >
> >You mean that the caller could check if the message is valid (no errors
> >happened) before sending it?
> 
> No.
> 
> I mean that current functions continue to return FALSE in case of errors, 
> or -1 or whatever they do right now. If you need to understand the reason 
> they failed, you inspect this member.

I assume you mean the DBusError parameter. Yes, in those cases there is
no problem.

> For object types that aren't connected to a message or DBusConnection 
> (etc), they should return the reason for failure. I'm thinking of 
> DBusString or similar simple types.

I would prefer a numeric value (since it's convenient and efficient to
handle in a switch clause), similar to the C library. How would you do
the API change then? Because if we just change it, the distributions
etc. would need to do a syncronised migration to the new API. Easier way
would be to have the new API co-exist with the old API for some time.

BR, Kimmo



More information about the dbus mailing list