46 #include <sys/types.h>
48 #define MAX_MEM (1024 * 1024)
60 typedef void (*WireCodecFunc) (
struct Wire *w,
void *val_ptr);
61 typedef ssize_t (*WireReadFunc) (
int fd,
void * buf,
size_t len);
62 typedef ssize_t (*WireWriteFunc) (
int fd,
const void * buf,
size_t len);
67 WireDirection direction;
75 WireCodecFunc w_string;
96 extern void sanei_w_init (Wire *w,
void (*codec_init)(Wire *));
97 extern void sanei_w_exit (Wire *w);
98 extern void sanei_w_space (Wire *w,
size_t howmuch);
99 extern void sanei_w_void (Wire *w,
void *);
100 extern void sanei_w_byte (Wire *w, SANE_Byte *v);
101 extern void sanei_w_char (Wire *w, SANE_Char *v);
102 extern void sanei_w_word (Wire *w, SANE_Word *v);
103 extern void sanei_w_bool (Wire *w, SANE_Bool *v);
104 extern void sanei_w_ptr (Wire *w,
void **v, WireCodecFunc w_value,
106 extern void sanei_w_string (Wire *w, SANE_String *v);
107 extern void sanei_w_status (Wire *w, SANE_Status *v);
108 extern void sanei_w_constraint_type (Wire *w, SANE_Constraint_Type *v);
109 extern void sanei_w_value_type (Wire *w, SANE_Value_Type *v);
110 extern void sanei_w_unit (Wire *w, SANE_Unit *v);
111 extern void sanei_w_action (Wire *w, SANE_Action *v);
112 extern void sanei_w_frame (Wire *w, SANE_Frame *v);
113 extern void sanei_w_range (Wire *w, SANE_Range *v);
114 extern void sanei_w_range_ptr (Wire *w, SANE_Range **v);
115 extern void sanei_w_device (Wire *w, SANE_Device *v);
116 extern void sanei_w_device_ptr (Wire *w, SANE_Device **v);
117 extern void sanei_w_option_descriptor (Wire *w, SANE_Option_Descriptor *v);
118 extern void sanei_w_option_descriptor_ptr (Wire *w,
119 SANE_Option_Descriptor **v);
120 extern void sanei_w_parameters (Wire *w, SANE_Parameters *v);
122 extern void sanei_w_array (Wire *w, SANE_Word *len,
void **v,
123 WireCodecFunc w_element,
size_t element_size);
125 extern void sanei_w_set_dir (Wire *w, WireDirection dir);
126 extern void sanei_w_call (Wire *w, SANE_Word proc_num,
127 WireCodecFunc w_arg,
void *arg,
128 WireCodecFunc w_reply,
void *reply);
129 extern void sanei_w_reply (Wire *w, WireCodecFunc w_reply,
void *reply);
130 extern void sanei_w_free (Wire *w, WireCodecFunc w_reply,
void *reply);
SANE_Status ENTRY() read(SANE_Handle, SANE_Byte *, SANE_Int, SANE_Int *)
Internationalization for SANE backends.
SANE_Status ENTRY() start(SANE_Handle)
Internationalization for SANE backends.