On Sun, Apr 12, 2009 at 11:00:38PM +0200, Florian Lohoff wrote: > Subject: Re: [sane-devel] SANE API / How to detect disconnect of scanner > > On Sun, Apr 12, 2009 at 03:23:06PM -0400, m. allan noah wrote: > > Well, I wrote the fujitsu backend, so I feel justified in saying that > > is a bug :) What version of sane-backends are you using? > > Debian lenny package > > ii libsane 1.0.19-23 API > library for scanners > ii libsane-dev 1.0.19-23 API > development library for scanners [development file > ii libsane-extras 1.0.19.11 API > library for scanners -- extra backends > ii libsane-extras-dev 1.0.19.11 API > development library for scanners [development file > ii sane 1.0.14-7 > scanner graphical frontends > ii sane-utils 1.0.19-23 API > library for scanners -- utilities
I already had a look at the code and the only way for the fujitsu backend to make an immediate read or write with returning the state is set_sleep_mode it seems. It would be nice to extend the SANE api to explicitly only query for hardware state. I guess there is more use of that function than my little toying with scanner buttons. For long running applications which open the device its wise to regularly check if the hardware is still there. Flo -- Florian Lohoff flo at rfc822.org +49-171-2280134 Those who would give up a little freedom to get a little security shall soon have neither - Benjamin Franklin -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090412/4a015bc1/attachment-0001.pgp>