[sane-standard] Using id instead of title for well known sources

abel deuring adeuring at gmx.net
Mon Jan 22 01:13:13 CET 2007


m. allan noah wrote:
> On 1/20/07, Étienne Bersac <bersace03 at laposte.net> wrote:
>> Hi,
>>
>> As i review the SANE 2 standard, i notice that 'source' option use title
>> as string. Those strings are longer (especially for ADF). But the
>> frontend has to know wether a source is ADF or manully feeded, in order
>> to loop or not the acquisition until "NO_DOCS" is returned. Therefore,
>> frontend needs to parse this string. Using ids instead of title helps
>> parsing source.
> 
> i will maintain that the frontend does not need to parse this string in
> order
> to determine the need to continue scanning. the backend should tell the
> frontend/user how many pages remain with another well-known option.
> 
> perhaps 'page-remain':
> 
> 0 for a flatbed or no more pages in any auto feeder (or a manual)
> -1 for a standard adf or film reel with unknown pages still to go,
> 0 for an auto feeder with a known number of pages (multi-slide holder)


This allows of course a frontend to decide, if it makes sense to
start a new scan without user intervention -- but I see two problems:

1. A low-end ADF scanner may be too dumb to be able to tell that the
   hopper is empty. Such a scanner might need to try to pull in a
   page from the hopper, before it can return the status "ADF
   empty". For such a dumb scanner, the current way to stop ADF
   scanning is better: check, if sane_start returns
   SANE_STATUS_ADF_NO_DOCS .

2. For a flatbed scanner, a single GUI button "start scan" is fine;
   for an ADF scanner, a frontend might provide two buttons: "start
   single scan" and "scan until ADF is empty". This requires a way
   to detect explicitly the presence of an ADF or somethong similar
   for slide scanners.

Abel



More information about the sane-standard mailing list