[sane-devel] A possible way to extend SANE API

Alessandro Zummo azummo-lists at towertech.it
Thu Jun 18 08:12:59 UTC 2009


On Thu, 18 Jun 2009 06:48:35 +0200
stef <stef.dev at free.fr> wrote:

> 
> 1 - warming up : 
> 
> 	To handle warming up, we could add a sane_prepare_to_scan() function 
> which would be called after sane_open() and before sane_start(). If the 
> scanner is ready, it will return SANE_STATUS_GOOD. If not it will return a
> SANE_PREPARATION_IN_PROGRESS status. The frontend will have then to wait until
> SANE_STATUS_GOOD is returned. In order to help the frontend to generate 
> a progress bar or a nice message, the function will also return the maximum
> time to wait left (in seconds):
> 	SANE_Status sane_prepare_to_scan(SANE_Int *max_remaining_time);


 there are buggy scanners that do not return a warming up condition unless
 you actually start to scan.

> 
> 2 - uncalibrated scan notification :
> 
> 	By extending the SANE_Parameters by adding a SANE_Bool uncalibrated_scan 
> field at the end of the structure, a backend will be able to signal that a 
> scan is uncalibrated. By default the field will be SANE_FALSE, and only 
> backends using it will set up to SANE_TRUE. 
> 	By calling sane_get_parameters(), a frontend will then know if the scan is 
> uncalibrated.

 ok, but since we are adding fields it might be worthwhile to
 add a bunch of flags all at once so the structure will not grow
 over time.

 
-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it




More information about the sane-devel mailing list