[sane-devel] Make source consistent accross backends

Étienne Bersac bersace03 at laposte.net
Tue May 22 11:58:12 UTC 2007


Hi,

Currently, SANE propose three macro for scan mode values (Color, Gray
and Lineart) in order to keep backends consistent.

Writing a frontend, i would like to know wether the source is ADF or
not, this will allow frontend to scan until SANE_STATUS_NO_DOCS is
returned or just do one scan. However, backends have inconsistent
source values.

From grepping the cvs tree, i tried to list how backends handle Source/ADF :

 * ibm, bh, artec use a boolean option "Use ADF"
 * avision use "ADF" + "ADF Rear" + "ADF Duplex"; fujitsu is similar
with "ADF Front" + "ADF Back" + "ADF Duplex", pixma too.
 * epson use an "adf_mode" option (simplex/duplex).
 * test,microtek2,nec, plustek,sharp, snapscan, sp15c, umax use
"source" string list (Flatbed, FB, Normal, ADF, Automatic Document
Feeder, …)

Obviously, there is duplicates effort (SANE_I18N("Automatic Document
Feeder") is defined 6 times).

SANE 2 standard states to use a well-known string list option
"source". Well known values are "Flatbed", "Transparancy Adapter" and
"Automatic Document Feeder".

SANE 1 already provide macros for consistent scan mode, even if it's
not in the 1.X standard. Do we really need to wait until SANE 2 to see
a consistent source handling accross backend ?

Backend developers, would you like to implement this option ? Please comment :).

Best regards,
Étienne.
-- 
verso l'Alto !


More information about the sane-devel mailing list