Scanner button add-on

Donald Straney burntfuse at gmail.com
Sat Apr 14 08:02:33 PDT 2007


> From the discussion on the SANE mailing list, I had thought that
> someone else was working on the scanner button add-on, but about a
> week ago, since there was no sign of it in 0.5.9, I realized that
> maybe I had misinterpreted, and decided to give it a shot myself.
> Anyways, a problem has come up.  To open the scanner through SANE, it
> needs to have the SANE device name, but I can't find any reliable way
> to get that from its HAL entry.  Since the device naming is completely
> up to the backend, it can't be done directly with USB or SCSI IDs.
> With it all being so backend-dependent, it seems like the only way is
> to have a single add-on that calls sane_get_devices and does the
> button polling for all scanners, then refreshes the list when a device
> with the "scanner" capability is added or removed.  It's sort of
> hack-ish, but until SANE changes I can't see any better way to do it.
> So can a single HAL add-on handle multiple devices this way, instead
> of having a separate process launched for each device?

Sorry, I should have been clearer.  What I'm trying to say is this -
is there a way to register an addon so that it'll only be started for
the first scanner that's detected, instead of having a new instance
started for each scanner?  I haven't been able to find any docs on
writing HAL addons.

Donald Straney


More information about the hal mailing list