Re: Starting a discussion about SANE and TWAIN...

Petter Reinholdtsen (pere@hungry.com)
Wed, 11 Aug 1999 22:44:33 +0200

> My short term goal, though, doesn't target portable code quite so
> much as ported code. The model I am working from at this time
> posits a developer running either on UNIX, Windows or Macintosh
> saying "I'd like to run on one of the other platforms with as little
> effort as possible, to see if there is a market there."

I think you misunderstod me. There are at least two goals to reach
for when making TWAIN/SANE connections.

- Making SANE devices available on Win32 as TWAIN sources
- Making TWAIN applications available on Unix

I suggest reaching these goals by making a pseudo-frontend which
abstract the SANE API and present a TWAIN API and GUI to the
application layer. Maybe my first diagram did not show the different
levels of the TWAIN API and the SANE API. Here is another try:

+---------+------------+
| SANE | TWAIN app |
| +-------+----+
| frontend| TWAIN | GUI|
| | API +----+
+---------+------------+
| SANE backends |
+----------------------+

The SANE API (the SANE backends) is more lowlevel then the TWAIN API.
To avoid separating the effort, the code for the TWAIN pseudo-frontend
should be written to both work on Unix and Win32, with the GUI part of
the code separated to handle the two different platforms.

Currently, we hook up our scanners to the Unix server, but would like
to access it from windows clients. Having a TWAIN source making this
possible would solve our problems. :-)

> So, considering the diagram that you created, I suggest that the
> SANE and TWAIN would not merge as interfaces. Instead, TWAIN on
> UNIX would come with a generic Source that talks to SANE drivers.
> Thus, any TWAIN application on UNIX would be able to communicate
> with any SANE supported device.
>
> The same could be done for SANE on Windows and Macintosh platforms.
> But given the GUI-centric nature of most TWAIN Sources, there might
> not be as much benefit from doing that right now.

My suggestion is to share code to reach these two goals at once.

On the other hand, I do not think it is possible to port the TWAIN
scanner drivers to SANE without lot of work. Instead I think the
effort on Unix should be put on making SANE only scanner HW drivers.

-- 
##>  Petter Reinholdtsen <##    | pere@td.org.uit.no
 O-  <SCRIPT Language="Javascript">window.close()</SCRIPT>
http://www.hungry.com/~pere/    | Go Mozilla, go! Go!

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com