On 05/12/2014 11:27 PM, Jakub Hrozek wrote:
Hi,
the attached patchset implement the
org.freedesktop.DBus.Properties.Get() interface for properties of
primitive types and arrays of primitive types (except for array of bools
as DBus bool is of different size than C-sized bool).
Getters are always synchronous, mostly to allow sane GetAll processing.
The getters also never error out, but rather return a default value.
The first two patches add utility functions, one by me and one by Pavel
that make it easier to return a primitive type or an array in a variant.
I wish the DBus library itself had a helper like this...
Patch 3/6 just allows the messages to be passed through to the IFP
responder.
The whole patchset is based on Stef's WIP branch and expands on it, that's
patch 4/6. There is a setter stub that, while not finished, is not
harmful either and can be expanded on later.
Patch 5/6 is the meat of the whole patchset. It implements the sbus
codegen to generate getter functions based on the XML description of the
interface and adds unit test for all the supported types and all
supported arrays. Pavel was kind enough to contribute several bugfixes
for this patch -- thank you!
Patch 6/6 is a bugfix by Pavel, one that I agree with, you can consider
the patch acked by me.
The next patch I'm going to send will implement a 'raw property getter'
that would allow the interface developer to return complex values for a
property value.
Ack. Nice work.