[sane-devel] SANE 2 proposal : sane_get_device_descriptor()
Étienne Bersac
bersace03 at laposte.net
Sat Aug 19 23:57:11 UTC 2006
Hello,
> > Using SANE 1, application can retreive informations only about detected
> > devices by sane_get_devices(). That would be nice if SANE allow to
> > retreive such data for any device name.
>
> i do not see the advantage to this? you are just adding an extra function
> call, to get the same data you can get now with one?
>
> can you explain why this is good?
When sane fail to detect a device (such as networked hpaio devices), a
useful feature is to manually tel the device name. (ex: hp-makeuir
produce the hpaio:/net/officejet_7100_series?ip=192.168.0.2 sane device
name). Using xsane allow to select a device just by passing his sane
name at the cmd line. But that make the UI showing an
"unknown:officejet_7100_series?ip=192.168.0.2" device which is ugly.
Also that does not allow app to know further informations on device
(especially with sane 2 which add more information in
SANE_Device_Descriptor).
Here is another use. You have a capplet that handle device
configuration. User wants to add manually a device one time (like he
does with printers), so that application append manually added devices
to detected devices list.
This API design allow to correctly handle auto detection failures.
You may just add the sane_get_device_descriptor function and keep the
sane_get_devices and SANE_Device_Desriptor as they are. That's not
important. The most important things in my proposal is the
sane_get_device_descriptor() function.
Étienne.
--
Verso l'Alto !
More information about the sane-devel
mailing list