[sane-devel] backend integration
Matto Marjanovic
maddog at mir.com
Sun Sep 1 20:07:13 BST 2002
>* 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:
4.3.12 sane_set_io_mode
...
This function may fail with one of the following status codes:
SANE_STATUS_INVAL:
No image acquisition is pending.
SANE_STATUS_UNSUPPORTED:
--- 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
last year....)
-matt m.
More information about the sane-devel
mailing list