[sane-devel] Sane API Suggestion

Major A andras at users.sourceforge.net
Mon Jul 21 22:53:32 BST 2003


> I don't think that network transparency introduces a problem for "user 
> data" pointer sizes. Since Sane itself does not deal with this pointer, 
> the net backend does not need to send and receive the correct value of 
> this pointer to/from the Sane server. Instead, the net backend can use 
> the pointer value as passed by the application in the callback.

OK, you're right.

Back to the original question: I just realized that the callback
function is set when you call sane_init(), thus it must be the same
for all scanner instances. Therefore I can see little point in having
any kind of user_data since even a Scheme interface to SANE would only
use sane_init() once so it could store the user_data itself just the
same. (Unless, of course, the Scheme interface would allow for more
than one backend to be used at the same time, but with dynamic loading
etc. this would soon become a mess anyway.)

> Well, some time has passed sine my last look into the Sane 2 API docs, 
> but IIRC it has at least one more callback.

I can't remember any. The only thing that is similar in a way is the
file descriptor returned by sane_get_select_fd(), but it's not a
callback.

  Andras

===========================================================================
Major Andras
    e-mail: andras at users.sourceforge.net
    www:    http://andras.webhop.org/
===========================================================================



More information about the sane-devel mailing list