1141cc406Sopenharmony_ci/* sane - Scanner Access Now Easy.
2141cc406Sopenharmony_ci
3141cc406Sopenharmony_ci   Copyright (C) 1997, 1998 Franck Schnefra, Michel Roelofs,
4141cc406Sopenharmony_ci   Emmanuel Blot, Mikko Tyolajarvi, David Mosberger-Tang, Wolfgang Goeller,
5141cc406Sopenharmony_ci   Petter Reinholdtsen, Gary Plewa, Sebastien Sable, Oliver Schwartz
6141cc406Sopenharmony_ci   and Kevin Charter
7141cc406Sopenharmony_ci
8141cc406Sopenharmony_ci   This file is part of the SANE package.
9141cc406Sopenharmony_ci
10141cc406Sopenharmony_ci   This program is free software; you can redistribute it and/or
11141cc406Sopenharmony_ci   modify it under the terms of the GNU General Public License as
12141cc406Sopenharmony_ci   published by the Free Software Foundation; either version 2 of the
13141cc406Sopenharmony_ci   License, or (at your option) any later version.
14141cc406Sopenharmony_ci
15141cc406Sopenharmony_ci   This program is distributed in the hope that it will be useful, but
16141cc406Sopenharmony_ci   WITHOUT ANY WARRANTY; without even the implied warranty of
17141cc406Sopenharmony_ci   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18141cc406Sopenharmony_ci   General Public License for more details.
19141cc406Sopenharmony_ci
20141cc406Sopenharmony_ci   You should have received a copy of the GNU General Public License
21141cc406Sopenharmony_ci   along with this program.  If not, see <https://www.gnu.org/licenses/>.
22141cc406Sopenharmony_ci
23141cc406Sopenharmony_ci   As a special exception, the authors of SANE give permission for
24141cc406Sopenharmony_ci   additional uses of the libraries contained in this release of SANE.
25141cc406Sopenharmony_ci
26141cc406Sopenharmony_ci   The exception is that, if you link a SANE library with other files
27141cc406Sopenharmony_ci   to produce an executable, this does not by itself cause the
28141cc406Sopenharmony_ci   resulting executable to be covered by the GNU General Public
29141cc406Sopenharmony_ci   License.  Your use of that executable is in no way restricted on
30141cc406Sopenharmony_ci   account of linking the SANE library code into it.
31141cc406Sopenharmony_ci
32141cc406Sopenharmony_ci   This exception does not, however, invalidate any other reasons why
33141cc406Sopenharmony_ci   the executable file might be covered by the GNU General Public
34141cc406Sopenharmony_ci   License.
35141cc406Sopenharmony_ci
36141cc406Sopenharmony_ci   If you submit changes to SANE to the maintainers to be included in
37141cc406Sopenharmony_ci   a subsequent release, you agree by submitting the changes that
38141cc406Sopenharmony_ci   those changes may be distributed with this exception intact.
39141cc406Sopenharmony_ci
40141cc406Sopenharmony_ci   If you write modifications of your own for SANE, it is your choice
41141cc406Sopenharmony_ci   whether to permit this exception to apply to your modifications.
42141cc406Sopenharmony_ci   If you do not wish that, delete this exception notice.
43141cc406Sopenharmony_ci
44141cc406Sopenharmony_ci   This file is a component of the implementation of a backend for many
45141cc406Sopenharmony_ci   of the AGFA SnapScan and Acer Vuego/Prisa flatbed scanners.
46141cc406Sopenharmony_ci*/
47141cc406Sopenharmony_ci
48141cc406Sopenharmony_ci/*
49141cc406Sopenharmony_ci   SnapScan backend scan data sources
50141cc406Sopenharmony_ci*/
51141cc406Sopenharmony_ci
52141cc406Sopenharmony_ci#ifndef SNAPSCAN_SOURCES_H
53141cc406Sopenharmony_ci#define SNAPSCAN_SOURCES_H
54141cc406Sopenharmony_ci
55141cc406Sopenharmony_citypedef struct source Source;
56141cc406Sopenharmony_ci
57141cc406Sopenharmony_citypedef SANE_Int (*SourceRemaining) (Source *ps);
58141cc406Sopenharmony_citypedef SANE_Int (*SourceBytesPerLine) (Source *ps);
59141cc406Sopenharmony_citypedef SANE_Int (*SourcePixelsPerLine) (Source *ps);
60141cc406Sopenharmony_citypedef SANE_Status (*SourceGet) (Source *ps, SANE_Byte *pbuf, SANE_Int *plen);
61141cc406Sopenharmony_citypedef SANE_Status (*SourceDone) (Source *ps);
62141cc406Sopenharmony_ci
63141cc406Sopenharmony_ci#define SOURCE_GUTS \
64141cc406Sopenharmony_ci    SnapScan_Scanner *pss;\
65141cc406Sopenharmony_ci    SourceRemaining remaining;\
66141cc406Sopenharmony_ci    SourceBytesPerLine bytesPerLine;\
67141cc406Sopenharmony_ci    SourcePixelsPerLine pixelsPerLine;\
68141cc406Sopenharmony_ci    SourceGet get;\
69141cc406Sopenharmony_ci    SourceDone done
70141cc406Sopenharmony_ci
71141cc406Sopenharmony_cistruct source
72141cc406Sopenharmony_ci{
73141cc406Sopenharmony_ci    SOURCE_GUTS;
74141cc406Sopenharmony_ci};
75141cc406Sopenharmony_ci
76141cc406Sopenharmony_cistatic SANE_Status Source_init (Source *pself,
77141cc406Sopenharmony_ci                                SnapScan_Scanner *pss,
78141cc406Sopenharmony_ci                                SourceRemaining remaining,
79141cc406Sopenharmony_ci                                SourceBytesPerLine bytesPerLine,
80141cc406Sopenharmony_ci                                SourcePixelsPerLine pixelsPerLine,
81141cc406Sopenharmony_ci                                SourceGet get,
82141cc406Sopenharmony_ci                                SourceDone done);
83141cc406Sopenharmony_ci
84141cc406Sopenharmony_ci/* base sources */
85141cc406Sopenharmony_ci
86141cc406Sopenharmony_ci#endif
87141cc406Sopenharmony_ci
88141cc406Sopenharmony_ci/*
89141cc406Sopenharmony_ci * Revision 1.5  2001/12/17 22:51:50  oliverschwartz
90141cc406Sopenharmony_ci * Update to snapscan-20011212 (snapscan 1.4.3)
91141cc406Sopenharmony_ci *
92141cc406Sopenharmony_ci * Revision 1.5  2001/12/12 19:44:59  oliverschwartz
93141cc406Sopenharmony_ci * Clean up CVS log
94141cc406Sopenharmony_ci *
95141cc406Sopenharmony_ci * Revision 1.4  2001/09/18 15:01:07  oliverschwartz
96141cc406Sopenharmony_ci * - Read scanner id string again after firmware upload
97141cc406Sopenharmony_ci *   to identify correct model
98141cc406Sopenharmony_ci * - Make firmware upload work for AGFA scanners
99141cc406Sopenharmony_ci * - Change copyright notice
100141cc406Sopenharmony_ci *
101141cc406Sopenharmony_ci * Revision 1.3  2001/03/17 22:53:21  sable
102141cc406Sopenharmony_ci * Applying Mikael Magnusson patch concerning Gamma correction
103141cc406Sopenharmony_ci * Support for 1212U_2
104141cc406Sopenharmony_ci *
105141cc406Sopenharmony_ci * Revision 1.2  2000/10/13 03:50:27  cbagwell
106141cc406Sopenharmony_ci * Updating to source from SANE 1.0.3.  Calling this version 1.1
107141cc406Sopenharmony_ci * */
108