Duncan Webb wrote:
> 
> Regular expressions are generally a bad thing for programs, other than
> being difficult to read and so hard to maintain, they do tend to cause
> problems over time. For example just parsing the version string from
> mplayer, xine and xmame cause problems so mplayer and xine version
> checks have been removed. Parsing a kernel header file is really not a
> great idea, it is just asking for problems, they changed too often.

Fair enough, but as I stated, the header is the spec. right now. Not a
very good situation, but still...

> 
> The trickiest part is to determine which devices the events come from,
> you have chosen to open each device in /dev/input/eventX, which is can
> be a bit problematic as users can change udev rules to what they wish.

Well, creating strange device node names when there is an established
(even if just de facto) standard will get them in trouble anyway.

There are two solutions to this. Either they simply forgo the feature of
identifying devices by name (i.e. they have to give a device node) or we
make it configurable where it looks for device nodes.

> Another way is to check /sys/class/input/inputX/name. Using an event
> number will cause problems as input USB devices are added and removed.
> 

Hotplug support is an entirely different matter and requires a whole lot
of work. The best solution would probably be HAL integration, but such a
project is not something I have the time for.

> All that is need is to rework the program a little so that the events
> are not generated to run-time. How you choose to do this is completely
> up to you.
> 

I assume you're talking about the mappings. All you need to do is change:

if os.path.exists("/usr/include/linux/input.h"):
    parse_input_h("/usr/include/linux/input.h")
else:
    from evfallback import _types, _events, _ids, _buses

to:

from evfallback import _types, _events, _ids, _buses

in evdev.py.

Rgds
-- 
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  PulseAudio, core developer          http://pulseaudio.org
  rdesktop, core developer          http://www.rdesktop.org

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to