[sane-devel] sane vs sanei_usb
Mbosowo I Sampson
Fri, 3 Sep 2004 18:56:59 -0400 (EDT)
Thanks for the reply. It cleared a few things up. I couldn't figure out
why sane_open and sanei_usb_open were being called independently in the
back end I was looking at (hp5400). Turns out that sane_open was calling
5400Open which was a wrapper for sanei_usb_open. I vaguely remember
reading something about why its done this way. Was it in case multiple
back ends were to be loaded? Something to do with unique names to avoid
Thanks again for the speedy reply.
On Sat, 4 Sep 2004, Bertrik Sikken wrote:
> Mbosowo I Sampson wrote:
>> Have a question about the functionality of sane_open vs sanei_usb_open
>> (and other parallel functions). As I understand it, sanei_usb_open opens
>> up a connection to send and receive usb specific information. What I'm
>> confused about is if there is any overlap with operation sane_open. Could
>> someone highlight the difference of the two for me. In the same spirit are
>> sanei_usb_read_bulk and sane_read mutually exclusive in the function they
>> perform? is there any over lap? what's the explicit purpose for each one?
>> what can each do that the other can't?
> sane_open is something that the specific backend needs to implement
> (well actually, YOU, the backend developer :) ).
> sanei_usb_open is provided by the sane framework to make it a little
> easier (and platform-independent) to write the sane_read function.
> In other words, the sane backend implements the sane_open function
> which will usually call the function sanei_usb_open.
> The same goes for sane_read and sanei_usb_read_bulk:
> the backend implements the sane_read function. The sane framework
> implements the sanei_usb_read_bulk function, which can be used
> by sane_read (which also does some other stuff).
> sane-devel mailing list: firstname.lastname@example.org
> Unsubscribe: Send mail with subject "unsubscribe your_password"
> to email@example.com