[sane-devel] SANE2 standard completion

stef stef.dev at free.fr
Wed Apr 9 19:27:23 UTC 2008


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.

Regards,
	Stef




More information about the sane-devel mailing list