Errors and the introspection format

Thiago Macieira thiago.macieira at trolltech.com
Mon Feb 20 11:40:12 PST 2006


Havoc Pennington wrote:
>On Mon, 2006-02-20 at 20:02 +0100, Thiago Macieira wrote:
>> This will make the introspection data contain the
>> org.freedesktop.DBus.Method.NoReply annotation. When generating code
>> for one such method, I'll use the "fire-and-forget" mode.
>
>It's certainly fine to do it this way in a particular binding - the
>choice is essentially that the callee side of the binding tells the
>caller what kind of method wrapper to generate.
>
>I don't think any other binding would be obligated to pay attention to
>the noreply here though, or to provide noreply in its introspection
>data. The noreply annotation isn't part of the "ABI" you could say, I
>guess.

Agreed. As I said in another email, any annotation can be ignored without 
side-effects.

>My personal view remains that if I were writing a callee/server, I would
>not be able to state a guideline for when to add noreply; but if I were
>writing a caller/client, I would know exactly when ("use noreply when
>you won't be doing anything with the reply anyway").

The way I'm doing it (and, AFAIU, the other bindings too) is:

1) if the user declares his method to be "async", then add the annotation

2) when calling a method that was introspected and we found the 
annotation, set the noreply flag in the method-call message, send it and 
don't bother with replies. Also, return success to the user.

3) when receiving a call, send a reply regardless of whether this 
annotation is set on a particular method or not, except if the incoming 
message has the no-reply flag set. If it does, don't bother sending a 
reply, again regardless of the annotation.

This is the way I read the spec and you corroborated: there must always be 
a reply, unless the caller said it doesn't require one.

-- 
Thiago José Macieira - thiago.macieira AT trolltech.com
Trolltech AS - Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20060220/b4868eb1/attachment.pgp


More information about the dbus mailing list