1/* sane - Scanner Access Now Easy.
2
3   Copyright (C) 1997, 1998 Franck Schnefra, Michel Roelofs,
4   Emmanuel Blot, Mikko Tyolajarvi, David Mosberger-Tang, Wolfgang Goeller,
5   Petter Reinholdtsen, Gary Plewa, Sebastien Sable, Oliver Schwartz
6   and Kevin Charter
7
8   This file is part of the SANE package.
9
10   This program is free software; you can redistribute it and/or
11   modify it under the terms of the GNU General Public License as
12   published by the Free Software Foundation; either version 2 of the
13   License, or (at your option) any later version.
14
15   This program is distributed in the hope that it will be useful, but
16   WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18   General Public License for more details.
19
20   You should have received a copy of the GNU General Public License
21   along with this program.  If not, see <https://www.gnu.org/licenses/>.
22
23   As a special exception, the authors of SANE give permission for
24   additional uses of the libraries contained in this release of SANE.
25
26   The exception is that, if you link a SANE library with other files
27   to produce an executable, this does not by itself cause the
28   resulting executable to be covered by the GNU General Public
29   License.  Your use of that executable is in no way restricted on
30   account of linking the SANE library code into it.
31
32   This exception does not, however, invalidate any other reasons why
33   the executable file might be covered by the GNU General Public
34   License.
35
36   If you submit changes to SANE to the maintainers to be included in
37   a subsequent release, you agree by submitting the changes that
38   those changes may be distributed with this exception intact.
39
40   If you write modifications of your own for SANE, it is your choice
41   whether to permit this exception to apply to your modifications.
42   If you do not wish that, delete this exception notice.
43
44   This file is a component of the implementation of a backend for many
45   of the AGFA SnapScan and Acer Vuego/Prisa flatbed scanners.
46*/
47
48/*
49   SnapScan backend scan data sources
50*/
51
52#ifndef SNAPSCAN_SOURCES_H
53#define SNAPSCAN_SOURCES_H
54
55typedef struct source Source;
56
57typedef SANE_Int (*SourceRemaining) (Source *ps);
58typedef SANE_Int (*SourceBytesPerLine) (Source *ps);
59typedef SANE_Int (*SourcePixelsPerLine) (Source *ps);
60typedef SANE_Status (*SourceGet) (Source *ps, SANE_Byte *pbuf, SANE_Int *plen);
61typedef SANE_Status (*SourceDone) (Source *ps);
62
63#define SOURCE_GUTS \
64    SnapScan_Scanner *pss;\
65    SourceRemaining remaining;\
66    SourceBytesPerLine bytesPerLine;\
67    SourcePixelsPerLine pixelsPerLine;\
68    SourceGet get;\
69    SourceDone done
70
71struct source
72{
73    SOURCE_GUTS;
74};
75
76static SANE_Status Source_init (Source *pself,
77                                SnapScan_Scanner *pss,
78                                SourceRemaining remaining,
79                                SourceBytesPerLine bytesPerLine,
80                                SourcePixelsPerLine pixelsPerLine,
81                                SourceGet get,
82                                SourceDone done);
83
84/* base sources */
85
86#endif
87
88/*
89 * Revision 1.5  2001/12/17 22:51:50  oliverschwartz
90 * Update to snapscan-20011212 (snapscan 1.4.3)
91 *
92 * Revision 1.5  2001/12/12 19:44:59  oliverschwartz
93 * Clean up CVS log
94 *
95 * Revision 1.4  2001/09/18 15:01:07  oliverschwartz
96 * - Read scanner id string again after firmware upload
97 *   to identify correct model
98 * - Make firmware upload work for AGFA scanners
99 * - Change copyright notice
100 *
101 * Revision 1.3  2001/03/17 22:53:21  sable
102 * Applying Mikael Magnusson patch concerning Gamma correction
103 * Support for 1212U_2
104 *
105 * Revision 1.2  2000/10/13 03:50:27  cbagwell
106 * Updating to source from SANE 1.0.3.  Calling this version 1.1
107 * */
108