[sane-devel] Scanner buttons (kind of RFC)
Wed, 11 Sep 2002 12:52:48 -0400
>I don't know, whether you've read my first posting, but the only problem is,
>that there's no way for a frontend to detect whether a button has been
>pressed. What Norman Urs Baier requests is a job for the *frontend* and not
>for the backend :-)
...But, my little epiphany was that if the frontend thinks that the scanner
has an ADF, we're all set (assuming ADF's are handled properly, which they
I believe (from a quick read of the web/man pages) that the behavior of
scanadf is to keep requesting scans from a scanner until either:
a) SANE_STATUS_NO_DOCS is returned (presumably because the scanner reports
that the ADF is empty),
b) a page limit is reached,
c) the user kills it.
This frontend has no idea when the next page is ready; the scanner knows this
and the backend just waits until the scanner has set up the page.
With the button-enabled scanner, the scenario is the same, except that the
user becomes the "manual document feeder". The frontend keeps asking for
pages from the backend; the backend waits at every request until the button
is pressed; when the user is completely done, she cancels the frontend's
loop by some means (either a "cancel" button in the "repeat scanning..."
window, or by just killing it, etc.)
The user still has to initiate the whole process ("start ADF scan") from
the frontend, but then she slides her chair over to the scanner for the
duration of her document.