Errors and the introspection format

Daniel P. Berrange dan at
Mon Feb 20 05:29:23 PST 2006

On Sun, Feb 19, 2006 at 11:07:18PM -0500, Havoc Pennington wrote:
> On Sun, 2006-02-19 at 20:22 +0000, Daniel P. Berrange wrote:
> > There alreayd is an annotation
> > 
> >
> > 
> >   org.freedesktop.DBus.Method.NoReply
> > 
> > I'm not clear on how this is supposed to be used in pratice though. As
> > a service, I can annotate a method with this, and not send any return
> > message, but if a client isn't looking for the annotation, it'll hang
> > forever.
> Here's how it is supposed to work right now:
>  - the intent is that the NoReply annotation affects only _client_ 
>    code, not server code.
>  - servers should work as follows:
>    - if the "no reply" hint is set in DBusMessage, the server 
>      can send a reply if it wants, but need not
>    - otherwise, the server _must_ send a reply, either 
>      an empty success reply, a return value, or an error

Cool, that's the bit of the rules I hadn't worked out properly.

>  - this annotation should not appear in introspection results. 
>    it's not a property of the interface/server, it's a property 
>    of the generated code desired by the app programmer on the client 
>    side.

Actually I think it has to appear in the introspection data, even though
it is a property of the client code. In dynamic languages which generate
the remote method proxies on the fly, the client bindings would read the 
"no reply" hint at runtime to decide whether to do a fire & forget call.

> Looks like it's somewhat confusing to use the same file format for
> introspection data and client code generation. Maybe we can find a way
> to make that clearer, e.g. we could split "client annotations" and
> "server annotations" perhaps into distinct XML elements?

I'm not sure that it matters, because even with client annotations, the
data still needs to be passed around at runtime for dynamic languages
to use.

|=-            GPG key:       -=|
|=-       Perl modules:              -=|
|=-           Projects:               -=|
|=-   berrange at  -  Daniel Berrange  -  dan at    -=|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url :

More information about the dbus mailing list