PDA support in HAL - making synchronisation "just work"
David Malcolm
dmalcolm at redhat.com
Mon Nov 8 13:12:23 PST 2004
(Crossposted to HAL and gnome-pilot mailing lists)
I've been looking at cleaning up parts of gnome-pilot, and feel that
some of it really belongs in HAL.
gnome-pilot has a daemon, gpilotd, which monitors for pilot devices, and
has a conduit system that can be invoked when a device connects.
Currently gnome-pilot's device monitoring requires the user to configure
the system, typing in names of devices, and potentially set up obscure
files on their computer (e.g. udev configuration).
If built on Linux with WITH_USB_VISOR, the gpilotd wakes up every 2
seconds and scans /proc/bus/usb/devices, looking for PDA devices based
on USB product/vendor ID pairs.
So I'm thinking that some of this really belongs in HAL instead; it
would be great if HAL could handle the low-level device detection work,
and provide desktop-level tools with a list of PDAs. When the user
wants to synchronise their data, HAL should make some call out to an
appropriate tool, perhaps in a similar way to how gnome-volume-manager
can mount devices automagically (perhaps even using gnome-volume-
manager, for the case of the GNOME desktop).
gnome-pilot has an XML file (gnome-pilot/gpilotd/devices.xml) which
contains information on known USB PDA devices, in its own format.
Attached is an XSL file which transforms that file into a HAL .fdi file;
I've also attached a copy of the resulting file (after going through
xmllint --format). I've been putting this file
into /usr/share/hal/fdi/50user for now.
The FDI file basically takes the list of specific USB vendor/product ID
pairs, and adds info.capability="pda" for every known pair; it also adds
a boolean "pda.use_net" based on the value in the original gnome-pilot
file.
Finally, I've attached a patch to hal-device-manager which adds an icon
for PDAs. I'm currently using an icon from gnome-pilot as hal-pda.png -
however that module is under a GPL license; I've emailed the artist,
hoping for permission to relicense.
The obligatory screenshot of hal-device-manager using all of the above
is here:
http://people.redhat.com/dmalcolm/Screenshot-PDA-HAL.png
Thoughts?
Dave Malcolm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: devices-to-fdi.xsl
Type: text/x-xslt
Size: 1483 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20041108/47d4b626/devices-to-fdi.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usb-pda-devices.fdi
Type: text/xml
Size: 10392 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20041108/47d4b626/usb-pda-devices.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-pda-to-hal-device-manager.patch
Type: text/x-patch
Size: 2086 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20041108/47d4b626/add-pda-to-hal-device-manager.bin
-------------- next part --------------
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list