Scanner button add-on

Donald Straney burntfuse at gmail.com
Wed Apr 18 11:34:01 PDT 2007


> I'm actually not sure that's what you need / want. If you're trying to
> implement the scanner button hal addon as I detailed here (which I think
> would be great)
>
> http://lists.alioth.debian.org/pipermail/sane-devel/2007-March/018864.html
>
> you really want an addon _per_ scanner; I mean, just because one libsane
> app is using scanner A, it doesn't mean that we shouldn't run the addon
> for scanner B. Or maybe you're trying to do something else?

That is what I'm trying to do, but the problem is mapping the
scanner's HAL entry to a SANE device name to use with sane_open.
Since the SANE device names are up to the backends, I can't see any
way to get them from bus IDs or anything similar, so it seems like the
only way is to have a singleton addon which gets the list of scanners
directly from SANE and polls them all, then calls sane_get_devices
again to refresh the list when HAL notifies it that a scanner has been
added or removed.  Of course it would be much better to have one addon
per scanner, but unless SANE changes I don't think there's a way to do
that.

Donald Straney


More information about the hal mailing list