Quantcast

Using id instead of title for well known sources

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Using id instead of title for well known sources

Étienne Bersac-3
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 suggest to use :

      * flatbed
      * adf
      * adf-front
      * adf-back
      * sheetfed
      * film

We'd state that all source not starting with adf are manual.

Please comment.

Étienne.
--
Verso l'Alto !

--
sane-standard mailing list: [hidden email]
http://lists.alioth.debian.org/mailman/listinfo/sane-standard
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to  [hidden email]

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using id instead of title for well known sources

m. allan noah-3
On 1/20/07, Étienne Bersac <[hidden email]> 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)

then the frontend can ask the user 'how many images to aquire?' and can
clamp that value using page-remain. if '-1', the frontend can make the
question open-ended. the default could be 'all'.

the exact values in the 'source' option only need consistency for
translation purposes.

allan

--
"The truth is an offense, but not a sin"

--
sane-standard mailing list: [hidden email]
http://lists.alioth.debian.org/mailman/listinfo/sane-standard
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to  [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using id instead of title for well known sources

Étienne Bersac-3
Hi,

> 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.

This is a case where frontend needs to parse. However, adding a way to
know remaining page is nice. Especially in order to provide nice
proportionned progress bar for mass acquisition.

> 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)

I'd prefer to add 1 if backend know there is paper in the feeder, even
if it doesn't know how many. Because the final result will be the same.
By -1, do you mean "i'm not able to know if there is any paper" or "i'm
not able to count the paper in" ?

> the exact values in the 'source' option only need consistency for
> translation purposes.

GnomeScan parse source string in order to translate it into a GEnum.
This is another case for parsing.

Étienne.
--
Verso l'Alto !

--
sane-standard mailing list: [hidden email]
http://lists.alioth.debian.org/mailman/listinfo/sane-standard
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to  [hidden email]

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using id instead of title for well known sources

abel deuring
In reply to this post by m. allan noah-3
m. allan noah wrote:

> On 1/20/07, Étienne Bersac <[hidden email]> 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

--
sane-standard mailing list: [hidden email]
http://lists.alioth.debian.org/mailman/listinfo/sane-standard
Unsubscribe: Send mail with subject "unsubscribe your_password"
             to  [hidden email]
Loading...