[sane-devel] backend integration
Sun, 1 Sep 2002 15:07:13 -0400
>* strictly speaking sane_set_io_mode() should return SANE_STATUS_GOOD
> for non_blocking == SANE_FALSE, at least that's what the standard
> says. I guess nobody will ever notice...
A suggestion for a very tiny edit in the API docs:
This function may fail with one of the following status codes:
No image acquisition is pending.
--- The backend does not support this operation.
+++ The backend does not support the requested I/O mode.
Hmm... and the more I look at this, the less I understand what the
SANE_STATUS_INVAL case is for. (The microtek backend is blocking-mode
exclusively, so I've never really dealt with this....) What does
"image acquistion is pending" mean? Is that before or after sane_start()
has been called?
It seems to me that the backend would want the frontend to call
sane_set_io_mode() *before* sane_start() --- so that sane_start() can
decide how to set up any data pipes, threads, etc. And then, after
sane_start() has been called and the imaging process is under way,
sane_set_io_mode() should return SANE_STATUS_INVAL, because "you can't
change your mind after the scan has begun". It certainly doesn't make
sense to call sane_set_io_mode() after sane_read()!
(Maybe this has been gone-over before; I've been on another planet for the