dbus_message_get_args suggestion

John (J5) Palmieri johnp at redhat.com
Sat Aug 6 07:07:26 EST 2005


On Fri, 2005-08-05 at 15:45 -0400, Havoc Pennington wrote:
> On Fri, 2005-08-05 at 10:45 -0400, John (J5) Palmieri wrote:
> > 
> > I kind of like the idea but being that get_args is used in a lot of apps
> > I don't know if it is prudent at this point.  Of course we are not at
> > 1.0 yet so...  It is a tough call and people would scream if the change
> > went in.  I don't know if it is worth the trouble.  Havoc, what are your
> > thoughts?
> > 
> 
> I think it makes sense but "fixed" arrays (array of int etc.) should
> probably continue to be returned as they currently are.
> 
> > The other option is to create new types i.e. DBUS_TYPE_FOO_ITER and
> > deprecate the use of DBUS_TYPE_FOO for complex types.  In any case I
> > like having a separate type for iters because it tells you what it is
> > returning (and lets us know the programmer know what is going to happen
> > so if they do send in a type that is not supported we can return an
> > error). 
> 
> This is kind of ugly imo though, since DBUS_TYPE_* right now are all
> straight from the protocol. Maybe some kind of flag that gets |'d in,
> like DBUS_TYPE_INT32 | DBUS_GET_AS_ITER ?

This is fine if we are going to mix iter and data returns.  At least
this way if the flag is not present we can throw errors and prevent
people from thinking they are getting data back for types we don't
support.
 
-- 
John (J5) Palmieri <johnp at redhat.com>



More information about the dbus mailing list