[sane-devel] a wish list for SANE improvements
stef.dev at free.fr
Thu Apr 10 19:33:50 UTC 2008
since the general mood is improving SANE without breaking everything, here's
- more well known-options, with their well-known groups and their capability.
Currently similar options show up in slightly different groups, and worse
in 'standard' or 'advanced' options, depending on the backend. It gives an
inconsistent look and feel to frontends.
- two new return code: SANE_STATUS_HARD_LOCK to tell the frontend that the
scanner is hard locked, and SANE_STATUS_WARMING_UP to tell that the backend
is warming up. These would be optional and wouldn't break any backend.
- more SANE_Format.
- adding a channels field to SANE_Parameters, it would avoid frontends to test
against each SANE_FRAME_* constants to calculate it, as new formats are going
to be added.
- adding a field to SANE_Device for capability flags. It will default to 0 if
not used and would allow backends to signal things such has being to handle
buttons, infra-red, ...
- a different function from sane_cancel() to call at regular end of scan,
which would help backend how to behave at end of scan.
- a SANE_TYPE_HARD_BUTTON for scanners' buttons. The constraint field would
allow to distinguish between push buttons (0 or 1 )and 'wheel buttons' (0 to
Some improvements or recommend practices that would help backend maintainer
or would be developper to code without having to wonder what should be done:
- common debugging levels. currently, each backend keeps on defining debugging
levels. And since debugging levels are different from backends to backends,
they have to be documented on a backend basis. Having a common way to do it
would allow for less coding in backends, document it for once in the general
- a common configuration reading function, so we don't have to code the same
thing. For a start it would be offered in sanei_* functions so that new or
maintained backends can benefit from it.
- a recommended (not compulsory) way of naming variables and private functions
would be nice.
All of this can be done without breaking everything.
More information about the sane-devel