[Xcb] [PATCH] sync: Change value list param of CreateAlarm and ChangeAlarm into switch

Louis-Francis Ratté-Boulianne louis-francis.ratte-boulianne at collabora.co.uk
Tue Jun 25 09:52:20 PDT 2013


 
On Sunday, June 23, 2013 07:35 EDT, Daniel Martin <consume.noise at gmail.com> wrote: 
 
> On Fri, Jun 21, 2013 at 02:13:40PM +0100, Louis-Francis Ratté-Boulianne wrote:
> > Values for "Value" and "Delta" fields are 64-bit that couldn't be passed through a regular value list/mask.
> > 
> > It does break the API, but CreateAlarm and ChangeAlarm are unusable without that change.
> > ---
> >  src/sync.xml |   64 ++++++++++++++++++++++++++++++++++++++++++++++++++++------
> >  1 file changed, 58 insertions(+), 6 deletions(-)
> > 
> > diff --git a/src/sync.xml b/src/sync.xml
> > index 516d149..d65c6c2 100644
> > --- a/src/sync.xml
> > +++ b/src/sync.xml
> > @@ -134,16 +134,68 @@ for licensing information.
> >  
> >    <request name="CreateAlarm" opcode="8">
> >      <field type="ALARM" name="id" />
> > -    <valueparam value-mask-type="CARD32"
> > -                value-mask-name="value_mask"
> > -                value-list-name="value_list" />
> > +    <field type="CARD32" name="value_mask" mask="CA" />
> > +    <switch name="value_list">
> > +      <fieldref>value_mask</fieldref>
> > +      <bitcase>
> > +        <enumref ref="CA">Counter</enumref>
> > +        <field type="COUNTER" name="counter" />
> > +      </bitcase>
> > +      <bitcase>
> > +        <enumref ref="CA">ValueType</enumref>
> > +        <field type="CARD32" name="valueType" mask="VALUETYPE" />
> > +      </bitcase>
> > +      <bitcase>
> > +        <enumref ref="CA">Value</enumref>
> > +        <field type="INT64" name="value" />
> > +      </bitcase>
> > +      <bitcase>
> > +        <enumref ref="CA">TestType</enumref>
> > +        <field type="CARD32" name="testType" mask="TESTTYPE" />
> > +      </bitcase>
> > +      <bitcase>
> > +        <enumref ref="CA">Delta</enumref>
> > +        <field type="INT64" name="delta" />
> > +      </bitcase>
> > +      <bitcase>
> > +        <enumref ref="CA">Events</enumref>
> > +        <field type="BOOL" name="events" />
> > +        <pad bytes="3" />
> > +      </bitcase>
> > +    </switch>
> >    </request>
> >  
> >    <request name="ChangeAlarm" opcode="9">
> >      <field type="ALARM" name="id" />
> > -    <valueparam value-mask-type="CARD32"
> > -                value-mask-name="value_mask"
> > -                value-list-name="value_list" />
> > +    <field type="CARD32" name="value_mask" mask="CA" />
> > +    <switch name="value_list">
> > +      <fieldref>value_mask</fieldref>
> > +      <bitcase>
> > +        <enumref ref="CA">Counter</enumref>
> > +        <field type="COUNTER" name="counter" />
> > +      </bitcase>
> > +      <bitcase>
> > +        <enumref ref="CA">ValueType</enumref>
> > +        <field type="CARD32" name="valueType" mask="VALUETYPE" />
> > +      </bitcase>
> > +      <bitcase>
> > +        <enumref ref="CA">Value</enumref>
> > +        <field type="INT64" name="value" />
> > +      </bitcase>
> > +      <bitcase>
> > +        <enumref ref="CA">TestType</enumref>
> > +        <field type="CARD32" name="testType" mask="TESTTYPE" />
> > +      </bitcase>
> > +      <bitcase>
> > +        <enumref ref="CA">Delta</enumref>
> > +        <field type="INT64" name="delta" />
> > +      </bitcase>
> > +      <bitcase>
> > +        <enumref ref="CA">Events</enumref>
> > +        <field type="BOOL" name="events" />
> > +        <pad bytes="3" />
> > +      </bitcase>
> > +    </switch>
> >    </request>
> >  
> >    <request name="DestroyAlarm" opcode="11">
> > -- 
> > 1.7.10.4
> 
> Reviewed-by: Daniel Martin <consume.noise at gmail.com>
> 
> You've forgotten to add a Signed-off-by tag. Do you give the permission
> to add it when applying the patch to the repo or could you send a
> version of the patch with the tag?

I give the permission to add the Signed-off-by tag before applying the patch to the repository.

> Thanks for the patch,
>     Daniel Martin
 
 My pleasure!

--
Louis-Francis
 
 



More information about the Xcb mailing list