[sane-devel] Simplified installation procedure for Redhat Fedora Linux 1.0 and Epson 1670 scanner, also a report of a bug?

Henning Meier-Geinitz henning@meier-geinitz.de
Tue, 10 Feb 2004 20:35:19 +0100


Hi,

On Tue, Feb 10, 2004 at 01:30:14PM -0500, m. allan noah wrote:
> as far as option naming goes, that works, but i would rather have a 
> defined group (like 'advanced' does) for just buttons/sensors,

That may also work.

> and have an additional bit that gets or'd with the other SANE_CAP_*,
> something like SANE_CAP_SENSOR on a SANE_TYPE_BOOL

Is it really a new capability? A button is a typical read-only bool
option that's setable by the user I think.

Well, maybe add a flag like "auto-poll". That would be a new
capability. But keep in mind that new capabilities are SANE2-only
while new options can easily be added to SANE1 also.

A possible extensio would also be a "reread value before scan"
capability.

Both are not really capabilities but something like demands, however.

> this enables a front-end to ignore this group of fields (or just show them 
> as little fake leds or something) or ask the user which ones they care 
> about.

If the frontend knows about the new options it can use any special
handling it wants. If it doesn't, it shows the options just as normal
read-only bool options. So I don't see any problem here. This
detection is possible with all three ways we have discussed (special
option name, group or capability).

> it also allows the backend to give them nice names, that aren't 
> preceded with any 'magic' strings of text.

These names are not presented to the user anyway so I don't think it's
a problem at all to use scanner-button- (or whatever). Using fixed
option names follows the "tradition" of well-known options.

You can still use any title you like for the button by using the
"title" and add a help text in the "description".

We could define the intended behaviour of some button options
(scanner-button-scan, -mail, ...) so the frontend can have nice
defaults for these options. That works even if the title of the scan
button is "Big bear paw middle button" for Mustek BearPaw scanners :-)

> the fujitsus often have a single digit lcd panel on the scanner, and a 
> wheel that the user can use to increas or decrease the reading on that 
> lcd. when they press the scan button, the digit on the lcd is also 
> transmitted. this could be handled the same way, with cap SANE_CAP_SENSOR 
> set on a SANE_TYPE_INT perhaps.

As you say the transfer of that number only happens when pressing the
button. So either the backend should set SANE_INFO_RELOAD_OPTIONS when
the button status is read and place the number in some read only
option or just handle the number internally (brightness?). What I want
to say: this panel is different from buttons as cahnging the numbers
doesn't start an action on the computer itsself. For reading such data
from the scanner we already have read-only options. That's the reason
why they exist :-)

Bye,
  Henning