The interface we settled on is that a backend should now call the
function:
extern void sanei_config_attach_matching_devices (const char *name,
SANE_Status (*attach)
(const char *dev));
once for each device-name in the configuration file. This causes the
"attach" callback function to be called once for each matching device.
E.g., if called with "/dev/scanner", attach() will be called as
attach("/dev/scanner") as usual.
The neat thing is that you can now also specify something like "scsi
UMAX" as a "device-name". This will have the effect of invoking
attach() once for each SCSI device with a vendor name of UMAX (it is
up to the backend to make sure the opened device is really a scanner
that it can talk to). The exact syntax of what a legal device name is
will be documented in sane-scsi(5) (it's basically a string of the
form VENDOR MODEL BUS CHANNEL ID LUN, which correspond to SCSI vendor
and model-name, bus-number, channel-number, scsi-id, and the logical
unit number).
Anyhow, what this means is that each SCSI backend has to change
slightly. I went through all the backends to make this change, so you
may want to watch out for the next release of SANE to make sure
everything works as expected and to backport the change into your own
sources (it involves changing about 5 lines of code, so it's not too
bad).
Cheers,
--david
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com