[sane-devel] SANE2 proposal

Oliver Rauch oliver.rauch at rauch-domain.de
Mon Apr 15 17:21:37 BST 2002


Frank Zago wrote:
> 
> Hi Oliver,
> 
> Here are my comments:
> 
> - section 4.2.1
> 
> Is there any reason why SANE_Word can't be suppressed? SANE_Word and
> SANE_int are implemented the same and have close definitions.

This comes frome SANE1. I don`t see a reason to change this. It does not make any
problems.
SANE_Word defines a size of a value but does not say anything about the contents,
SANE_Int defines that it is an integer.

> 
> - section 4.2.7 (status type).
> 
> The panasonic scanners scan a whole page before giving it back to the
> scanner. ie they must be able to cache the page. However if a high
> resolution is used, the internal memory isn't enough, the scan rejects
> the scan command with an insufficient memory error. SANE1/2 does not
> have a error status for that. Returning SANE_STATUS_NO_MEM is
> misleading because it is not the backend which is out of memory. What
> about adding a SANE_STATUS_SCANNER_OOM? Or adding several reserved
> error code for use by the backend (with a corresponding sane_strstatus()
> function)?
> 

I added an entry for adding SANE_STATUS_DEVICE_NO_MEM to the todo list.


> - section 4.2.9
> 
> SANE_OPTION_IS_SETTABLE(cap) should add that the option must also be
> active.

Where is the problem to test for IS_SETTABLE && IS_ACTIVE ?
I am not sure if it makes any problems when we change this.

> 
> - section 4.2.9
> 
> A new macro SANE_OPTION_IS_GETTABLE(cap) could return SANE_TRUE is the
> option is active an readable. I needed one in my backend tester. Maybe
> some frontend also need it.
> 
>  #define SANE_OPTION_IS_GETTABLE(cap)   (((cap) & (SANE_CAP_SOFT_DETECT |
> SANE_CAP_INACTIVE)) == SANE_CAP_SOFT_DETECT)

Added to the todo list.

> 
> - section 4.3.8
> For SANE FRAME RAW, and possibly others, what is the endianness to use?
> 

I will take a look if this has been lost in the changes, I think it has been
defined in SANE1.


> - Some scanner can find and decode 5 or 10 barcodes per sheet. How can
> such a scanner transfer a decoded barcode? With a MIME type?

Yes. MIME is for everything that does not fit into SANE_FRAME_RAW.
May be there should be defined some "well known types" e.g. in this case.

> 
> - I'd like to have all the SANE functions (sane_init, sane_open, ...)
> declared in a structure. Only that structure would be exported. eg:
>   static ... sane_open(...)
>   static ... sane_init(...)
> 
> backend_desc backendname_desc {
> 
>   /* backend entry points */
>   sane_open,
>   sane_init,
>   ...
>   /* Backend info */
>   "backendname",
>   0,               /* backend capabilities */
>   6544,            /* backend version */
>   ...
>   /* Reserved fields */
>   NULL,
>   ...
>   0,
>   ...
> } backendname_desc;
> 
> Some of the info here are from the SANE_Device structure. I don't think
> they belong there.
> 
> I know that would be a big change.

Hm. Why such a big change, what advantages do you see?

 
> - well known options (eg "source") and well know option values (eg
>   "Flatbed") should have a corresponding #define to avoid mispellings
>   and ease translations.

Yes. They will be listed in sane2opts.h

> 
> - the .desc format description should be added too, and expanded. I'd
>   like to see an fcc id field.

Can the backend find out the fcc number? I do not know about that.
What .desc format description?

Bye
Oliver

-- 
Homepage:	http://www.rauch-domain.de
sane-umax:	http://www.rauch-domain.de/sane-umax
xsane:		http://www.xsane.org
E-Mail:		mailto:Oliver.Rauch at rauch-domain.de



More information about the sane-devel mailing list