Fwd: [sane-standard] SANE2 proposal: split button/option handling

Étienne Bersac bersace03 at laposte.net
Wed Jan 17 21:53:46 CET 2007


Hi,

> sorry Étienne, you will get this twice....

Nop.

> it seems strange at first, but it actually makes it possible for a
> backend to expose new capabilities that were not thought of at the
> time sane was designed.

I don't want to freeze the available options nor buttons. The option
handling in SANE is very good and powerful, however, its use is quite
confusing. In SANE, "everything is option".

> > I propose to design two different way to handle devices options and
> > buttons. I have only a fuzzy idea of how to design it, however, i'm
> > quite sure that all those "button" options is just confusing and make
> > developer live harder.
> 
> how is writing MORE code in the frontend LESS complicated than the
> current situation?

frontend has to "parse" option name in order to determine if an option
is about a button. Also, several options stand for one button. I suggest
to unify this button handling.

SANE 2¹ seems to handle all buttons in three options. No way to know
button title/name/desc. How to determine that 4th bit of
scanner-buttons-status is "Scan film" ?


> the only change i think we need over the current system is the 'poll'
> capability to be added to the option descriptor, and for the frontend
> to get the value periodically.

ACK.

>  i dont see any advantage to adding a
> set of button routines?

That's just a suggestion. I don't have a clear idea of the API. But we
must add a clearer way for the frontend to know which buttons is for
what. (But does the backend even know it ?)

     1. http://sane.alioth.debian.org/sane2/0.08/doc014.html#s4.5.14

Étienne.
-- 
Verso l'Alto !
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : http://lists.alioth.debian.org/pipermail/sane-standard/attachments/20070117/0af4263f/attachment.pgp


More information about the sane-standard mailing list