[sane-devel] SANE2 standard completion

Rene Rebe rene at exactcode.de
Wed Apr 9 19:38:26 UTC 2008


On 09.04.2008, at 21:27, stef wrote:

> Le Wednesday 09 April 2008 12:48:22 René Rebe, vous avez écrit :
>> As the backend controls the device and reads the image data somehow,
>> it should have knowledge about the actual head position and should be
>> able to perform the required actions even with the current interface.
>> Where exactly should there be the problem?
>> Yours,
> 	You are right that a backend can count how many times sane_cancel  
> has been
> called after last sane_start() and that also by knowing if all data  
> planned
> to be scan has been effectively read, it could sort things. But this a
> workaround more prone to bugs than to have a function for regular  
> end of
> scan, and another for error code path. It would also have to be  
> coded again
> and again into backends needing it.
> 	It is cheap to add, is about a one liner for frontends and help us  
> to  write
> better backends. For most backends, adding such a function would  
> simply
> resolve in renaming sane_cancel to internal_cancel, and have it  
> called by
> sane_cancel and the new function. Actively maintained backends will  
> be able
> to take advantage of it.

You are still just arguing around the dancing cow here.

With a potentially new sane_end whatever function you still would have  
keep track where the head is. A frontend may still read less data and in
any case you would need to know where the head is to move it that
specific way backwards in such a "CPU-less" "doing every step by
the host" device.

I can still do not see where another function call to signal a scan_end
would help you.

   René Rebe - ExactCODE GmbH - Europe, Germany, Berlin
   http://exactcode.de | http://t2-project.org | http://rene.rebe.name

More information about the sane-devel mailing list