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