1141cc406Sopenharmony_ci/* sane - Scanner Access Now Easy.
2141cc406Sopenharmony_ci
3141cc406Sopenharmony_ci   Copyright (C) 2002-2006 Henning Meier-Geinitz <henning@meier-geinitz.de>
4141cc406Sopenharmony_ci
5141cc406Sopenharmony_ci   This file is part of the SANE package.
6141cc406Sopenharmony_ci
7141cc406Sopenharmony_ci   This program is free software; you can redistribute it and/or
8141cc406Sopenharmony_ci   modify it under the terms of the GNU General Public License as
9141cc406Sopenharmony_ci   published by the Free Software Foundation; either version 2 of the
10141cc406Sopenharmony_ci   License, or (at your option) any later version.
11141cc406Sopenharmony_ci
12141cc406Sopenharmony_ci   This program is distributed in the hope that it will be useful, but
13141cc406Sopenharmony_ci   WITHOUT ANY WARRANTY; without even the implied warranty of
14141cc406Sopenharmony_ci   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15141cc406Sopenharmony_ci   General Public License for more details.
16141cc406Sopenharmony_ci
17141cc406Sopenharmony_ci   You should have received a copy of the GNU General Public License
18141cc406Sopenharmony_ci   along with this program.  If not, see <https://www.gnu.org/licenses/>.
19141cc406Sopenharmony_ci
20141cc406Sopenharmony_ci   As a special exception, the authors of SANE give permission for
21141cc406Sopenharmony_ci   additional uses of the libraries contained in this release of SANE.
22141cc406Sopenharmony_ci
23141cc406Sopenharmony_ci   The exception is that, if you link a SANE library with other files
24141cc406Sopenharmony_ci   to produce an executable, this does not by itself cause the
25141cc406Sopenharmony_ci   resulting executable to be covered by the GNU General Public
26141cc406Sopenharmony_ci   License.  Your use of that executable is in no way restricted on
27141cc406Sopenharmony_ci   account of linking the SANE library code into it.
28141cc406Sopenharmony_ci
29141cc406Sopenharmony_ci   This exception does not, however, invalidate any other reasons why
30141cc406Sopenharmony_ci   the executable file might be covered by the GNU General Public
31141cc406Sopenharmony_ci   License.
32141cc406Sopenharmony_ci
33141cc406Sopenharmony_ci   If you submit changes to SANE to the maintainers to be included in
34141cc406Sopenharmony_ci   a subsequent release, you agree by submitting the changes that
35141cc406Sopenharmony_ci   those changes may be distributed with this exception intact.
36141cc406Sopenharmony_ci
37141cc406Sopenharmony_ci   If you write modifications of your own for SANE, it is your choice
38141cc406Sopenharmony_ci   whether to permit this exception to apply to your modifications.
39141cc406Sopenharmony_ci   If you do not wish that, delete this exception notice.
40141cc406Sopenharmony_ci
41141cc406Sopenharmony_ci   This backend is for testing frontends.
42141cc406Sopenharmony_ci*/
43141cc406Sopenharmony_ci
44141cc406Sopenharmony_ci#ifndef test_h
45141cc406Sopenharmony_ci#define test_h
46141cc406Sopenharmony_ci
47141cc406Sopenharmony_ci
48141cc406Sopenharmony_citypedef enum
49141cc406Sopenharmony_ci{
50141cc406Sopenharmony_ci  param_none = 0,
51141cc406Sopenharmony_ci  param_bool,
52141cc406Sopenharmony_ci  param_int,
53141cc406Sopenharmony_ci  param_fixed,
54141cc406Sopenharmony_ci  param_string
55141cc406Sopenharmony_ci}
56141cc406Sopenharmony_ciparameter_type;
57141cc406Sopenharmony_ci
58141cc406Sopenharmony_citypedef enum
59141cc406Sopenharmony_ci{
60141cc406Sopenharmony_ci  opt_num_opts = 0,
61141cc406Sopenharmony_ci  opt_mode_group,
62141cc406Sopenharmony_ci  opt_mode,
63141cc406Sopenharmony_ci  opt_depth,
64141cc406Sopenharmony_ci  opt_hand_scanner,
65141cc406Sopenharmony_ci  opt_three_pass,		/* 5 */
66141cc406Sopenharmony_ci  opt_three_pass_order,
67141cc406Sopenharmony_ci  opt_resolution,
68141cc406Sopenharmony_ci  opt_scan_source,
69141cc406Sopenharmony_ci  opt_special_group,
70141cc406Sopenharmony_ci  opt_test_picture,
71141cc406Sopenharmony_ci  opt_invert_endianess,
72141cc406Sopenharmony_ci  opt_read_limit,
73141cc406Sopenharmony_ci  opt_read_limit_size,
74141cc406Sopenharmony_ci  opt_read_delay,
75141cc406Sopenharmony_ci  opt_read_delay_duration,
76141cc406Sopenharmony_ci  opt_read_status_code,
77141cc406Sopenharmony_ci  opt_ppl_loss,
78141cc406Sopenharmony_ci  opt_fuzzy_parameters,
79141cc406Sopenharmony_ci  opt_non_blocking,
80141cc406Sopenharmony_ci  opt_select_fd,
81141cc406Sopenharmony_ci  opt_enable_test_options,
82141cc406Sopenharmony_ci  opt_print_options,
83141cc406Sopenharmony_ci  opt_geometry_group,
84141cc406Sopenharmony_ci  opt_tl_x,
85141cc406Sopenharmony_ci  opt_tl_y,
86141cc406Sopenharmony_ci  opt_br_x,
87141cc406Sopenharmony_ci  opt_br_y,
88141cc406Sopenharmony_ci  opt_bool_group,
89141cc406Sopenharmony_ci  opt_bool_soft_select_soft_detect,
90141cc406Sopenharmony_ci  opt_bool_hard_select_soft_detect,
91141cc406Sopenharmony_ci  opt_bool_hard_select,
92141cc406Sopenharmony_ci  opt_bool_soft_detect,
93141cc406Sopenharmony_ci  opt_bool_soft_select_soft_detect_emulated,
94141cc406Sopenharmony_ci  opt_bool_soft_select_soft_detect_auto,
95141cc406Sopenharmony_ci  opt_int_group,
96141cc406Sopenharmony_ci  opt_int,
97141cc406Sopenharmony_ci  opt_int_constraint_range,
98141cc406Sopenharmony_ci  opt_int_constraint_word_list,
99141cc406Sopenharmony_ci  opt_int_array,
100141cc406Sopenharmony_ci  opt_int_array_constraint_range,
101141cc406Sopenharmony_ci  opt_int_array_constraint_word_list,
102141cc406Sopenharmony_ci  opt_int_inexact,
103141cc406Sopenharmony_ci  opt_gamma_red,
104141cc406Sopenharmony_ci  opt_gamma_green,
105141cc406Sopenharmony_ci  opt_gamma_blue,
106141cc406Sopenharmony_ci  opt_gamma_all,
107141cc406Sopenharmony_ci  opt_fixed_group,
108141cc406Sopenharmony_ci  opt_fixed,
109141cc406Sopenharmony_ci  opt_fixed_constraint_range,
110141cc406Sopenharmony_ci  opt_fixed_constraint_word_list,
111141cc406Sopenharmony_ci  opt_string_group,
112141cc406Sopenharmony_ci  opt_string,
113141cc406Sopenharmony_ci  opt_string_constraint_string_list,
114141cc406Sopenharmony_ci  opt_string_constraint_long_string_list,
115141cc406Sopenharmony_ci  opt_button_group,
116141cc406Sopenharmony_ci  opt_button,
117141cc406Sopenharmony_ci  /* must come last: */
118141cc406Sopenharmony_ci  num_options
119141cc406Sopenharmony_ci}
120141cc406Sopenharmony_citest_opts;
121141cc406Sopenharmony_ci
122141cc406Sopenharmony_ci
123141cc406Sopenharmony_citypedef struct Test_Device
124141cc406Sopenharmony_ci{
125141cc406Sopenharmony_ci  struct Test_Device *next;
126141cc406Sopenharmony_ci  SANE_Device sane;
127141cc406Sopenharmony_ci  SANE_Option_Descriptor opt[num_options];
128141cc406Sopenharmony_ci  Option_Value val[num_options];
129141cc406Sopenharmony_ci  SANE_Bool loaded[num_options];
130141cc406Sopenharmony_ci  SANE_Parameters params;
131141cc406Sopenharmony_ci  SANE_String name;
132141cc406Sopenharmony_ci  SANE_Pid reader_pid;
133141cc406Sopenharmony_ci  SANE_Int reader_fds;
134141cc406Sopenharmony_ci  SANE_Int pipe;
135141cc406Sopenharmony_ci  FILE *pipe_handle;
136141cc406Sopenharmony_ci  SANE_Word pass;
137141cc406Sopenharmony_ci  SANE_Word bytes_per_line;
138141cc406Sopenharmony_ci  SANE_Word pixels_per_line;
139141cc406Sopenharmony_ci  SANE_Word lines;
140141cc406Sopenharmony_ci  size_t bytes_total;
141141cc406Sopenharmony_ci  SANE_Bool open;
142141cc406Sopenharmony_ci  SANE_Bool scanning;
143141cc406Sopenharmony_ci  SANE_Bool cancelled;
144141cc406Sopenharmony_ci  SANE_Bool eof;
145141cc406Sopenharmony_ci  SANE_Bool options_initialized;
146141cc406Sopenharmony_ci  SANE_Int number_of_scans;
147141cc406Sopenharmony_ci}
148141cc406Sopenharmony_ciTest_Device;
149141cc406Sopenharmony_ci
150141cc406Sopenharmony_ci#endif /* test_h */
151