[compiz] dbus introspection

Mike Dransfield mike at blueroot.co.uk
Thu Mar 1 05:30:02 PST 2007


Travis Watkins wrote:
> On 2/27/07, Mike Dransfield <mike at blueroot.co.uk> wrote:
>> I have had a quick look and I think its possible to have a
>> variant number of key value pairs with something like this
>> as the signature.
>>
>> "a(sv)"
>>
>> Which is probably the same as something like this (but will
>> probably not marshall as well)
>>
>> "a{sv}"
>>
>> Does this sound about right?
>
> No, variant type means the value includes it's type info in itself.
> it's not a catchall of any sort.
>

I know, but we can change activate methods to accept a{sv} - it
would only require a small change and it would mean that you
can add introspection data for the activate/terminate methods.

At the moment it just reads data in kv pairs so the signature currently
varies but is normally something like "sisiss" the dbusHandleActionMessage
can be changed so that it loops through the array, then takes each
dict entry and converts it to a CompOption.  This would involve opening
the variant container and reading its value into the option, but thats not
a problem.

It is impossible to determine what parameters an action option will
take at runtime.

How else were you planning to do this?  Activate methods can
take a variable number of arbitrary parameters.




More information about the compiz mailing list