[Authentication] Item attributes types inconsistency
Michael Leupold
lemma at confuego.org
Thu Mar 17 13:47:46 PDT 2011
Hi Valentin,
Valentin Rusu wrote:
> Please be advised that I think that the spec has a little inconsistency
> when specifying item attributes.
>
> First, when creating an item, the signature of the CreateItem has a
> "properties" arg of type "a{sv}".
>
> Secondly, the created item has a "attributes" of type "a{ss}".
>
> This isn't consistent and I propose to stick with "a{sv}" as it's more
> flexible, as per attached patch.
>
> Any thoughts?
That's actually intended as there's a difference between Properties and
Attributes. Let me try to explain.
Attributes is a map of attribute names to attribute values, eg.
( "Attribute1" => "Value1", "Attribute2" => "Value2" ).
The properties argument of CreateItem is mapping property (as in D-Bus
property) names to property values, eg.
( "Attributes" => ( "Attribute1" => "Value1", "Attribute2" => "Value2" ) )
It's meant to be extensible so every writable property of an item can be set
using this string-variant map.
Regards
Michael
More information about the Authentication
mailing list