1 #define STUBS
2
3 #include "../include/sane/sanei_backend.h"
4
5 /* Now define the wrappers (we could use aliases here, but go for
6 robustness for now...: */
7
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11
12 SANE_Status
sane_init(SANE_Int *vc, SANE_Auth_Callback cb)13 sane_init (SANE_Int *vc, SANE_Auth_Callback cb)
14 {
15 return ENTRY(init) (vc, cb);
16 }
17
18 SANE_Status
sane_get_devices(const SANE_Device ***dl, SANE_Bool local)19 sane_get_devices (const SANE_Device ***dl, SANE_Bool local)
20 {
21 return ENTRY(get_devices) (dl, local);
22 }
23
24 SANE_Status
sane_open(SANE_String_Const name, SANE_Handle *h)25 sane_open (SANE_String_Const name, SANE_Handle *h)
26 {
27 return ENTRY(open) (name, h);
28 }
29
30 const SANE_Option_Descriptor *
sane_get_option_descriptor(SANE_Handle h, SANE_Int opt)31 sane_get_option_descriptor (SANE_Handle h, SANE_Int opt)
32 {
33 return ENTRY(get_option_descriptor) (h, opt);
34 }
35
36 SANE_Status
sane_control_option(SANE_Handle h, SANE_Int opt, SANE_Action act, void *val, SANE_Word *info)37 sane_control_option (SANE_Handle h, SANE_Int opt, SANE_Action act,
38 void *val, SANE_Word *info)
39 {
40 return ENTRY(control_option) (h, opt, act, val, info);
41 }
42
43 SANE_Status
sane_get_parameters(SANE_Handle h, SANE_Parameters *parms)44 sane_get_parameters (SANE_Handle h, SANE_Parameters *parms)
45 {
46 return ENTRY(get_parameters) (h, parms);
47 }
48
49 SANE_Status
sane_start(SANE_Handle h)50 sane_start (SANE_Handle h)
51 {
52 return ENTRY(start) (h);
53 }
54
55 SANE_Status
sane_read(SANE_Handle h, SANE_Byte *buf, SANE_Int maxlen, SANE_Int *lenp)56 sane_read (SANE_Handle h, SANE_Byte *buf, SANE_Int maxlen, SANE_Int *lenp)
57 {
58 return ENTRY(read) (h, buf, maxlen, lenp);
59 }
60
61 SANE_Status
sane_set_io_mode(SANE_Handle h, SANE_Bool non_blocking)62 sane_set_io_mode (SANE_Handle h, SANE_Bool non_blocking)
63 {
64 return ENTRY(set_io_mode) (h, non_blocking);
65 }
66
67 SANE_Status
sane_get_select_fd(SANE_Handle h, SANE_Int *fdp)68 sane_get_select_fd (SANE_Handle h, SANE_Int *fdp)
69 {
70 return ENTRY(get_select_fd) (h, fdp);
71 }
72
73 void
sane_cancel(SANE_Handle h)74 sane_cancel (SANE_Handle h)
75 {
76 ENTRY(cancel) (h);
77 }
78
79 void
sane_close(SANE_Handle h)80 sane_close (SANE_Handle h)
81 {
82 ENTRY(close) (h);
83 }
84
85 void
sane_exit(void)86 sane_exit (void)
87 {
88 ENTRY(exit) ();
89 }
90
91 #ifdef __cplusplus
92 } // extern "C"
93 #endif
94