Re: [RFC PATCHv2] autopair: add autopair plugin
From: Scott James Remnant <hidden>
Date: 2012-01-30 21:40:04
On Mon, Jan 30, 2012 at 11:49 AM, Marcel Holtmann [off-list ref] wro= te:
quoted
+<!-- + =A0The autopair plugin will match devices, following the order of the =
XML
quoted
+ =A0file [1], on any combination of type, OUI, or name. + + =A0[1]: So specific devices should be at the top, and generic ones at =
the bottom,
quoted
+ =A0so settings for specific devices are overridden as expected. +--> + +<!DOCTYPE devices [ + =A0 =A0 <!ELEMENT devices (device)+> + =A0 =A0 <!ELEMENT device EMPTY> + =A0 =A0 <!ATTLIST device type (any|mouse|tablet|keyboard|headset|headp=
hones|audio|printer|network) "any">
quoted
+ =A0 =A0 <!ATTLIST device oui CDATA #IMPLIED> + =A0 =A0 <!ATTLIST device name CDATA #IMPLIED> + =A0 =A0 <!ATTLIST device pin CDATA #REQUIRED> +]>I think we need to have a discussion on this database format first. I honestly do not like it at all. It does matching and result handling in a single XML element. That seems like a bad idea. And in addition making pin attribute required and then trying to disable PIN with "NULL" magic is something that I rather not have. I am also wondering why this has to be XML and not simple key-value INI style files.
I tend to agree ;-) The reason it couldn't be pure INI-style (at least, parseable by glib) though is because you then need unique group names for each match, which is equally urgh to write. Scott --=20 Have you ever, ever felt like this? Had strange things happen? =A0Are you going round the twist?