LibInsane: /build/libinsane/src/libinsane/subprojects/libinsane/include/libinsane/dumb.h Source File

| LibInsane 1.0.10 Cross-platform Cross-API Cross-driver Cross-image-scanner Image Scan Library

Loading...
Searching...
No Matches
dumb.h
Go to the documentation of this file.
1#ifndef __LIBINSANE_DUMB_H
2#define __LIBINSANE_DUMB_H
3
4#include "capi.h"
5#include "error.h"
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#define LIS_DUMB_DEV_ID_FORMAT "dumb dev%d"
12#define LIS_DUMB_DEV_ID_FIRST "dumb dev0"
13
20 extern enum lis_error lis_api_dumb(struct lis_api **impl, const char *name);
21
22 void lis_dumb_set_dev_descs(struct lis_api *impl, struct lis_device_descriptor **descs);
23
27 void lis_dumb_set_nb_devices(struct lis_api *self, int nb_devices);
28 void lis_dumb_set_nb_devices_with_type(
29 struct lis_api *self, int nb_devices, enum lis_item_type item_type
30 );
31 void lis_dumb_set_list_devices_return(struct lis_api *self, enum lis_error ret);
32 void lis_dumb_set_get_device_return(struct lis_api *self, enum lis_error ret);
33
34 void lis_dumb_add_option(struct lis_api *self, const struct lis_option_descriptor *opt,
35 const union lis_value *default_value, int set_flags);
36
37 struct lis_dumb_read {
38 const void *content;
39 size_t nb_bytes;
40};
41
42 void lis_dumb_set_scan_parameters(
43 struct lis_api *self, const struct lis_scan_parameters *params
44);
45 void lis_dumb_set_scan_result(
46 struct lis_api *self, const struct lis_dumb_read *read_contents,
47 int nb_reads
48);
49
50 void lis_dumb_reset_counters(struct lis_api *self);
51 int lis_dumb_get_nb_get(struct lis_api *self);
52 int lis_dumb_get_nb_set(struct lis_api *self);
53 int lis_dumb_get_nb_list_options(struct lis_api *self);
54
55
56#ifdef __cplusplus
57}
58#endif
59
60#endif
capi.h
lis_item_type
lis_item_type
Definition capi.h:341
lis_dumb_get_nb_list_options
int lis_dumb_get_nb_list_options(struct lis_api *self)
lis_dumb_set_nb_devices_with_type
void lis_dumb_set_nb_devices_with_type(struct lis_api *self, int nb_devices, enum lis_item_type item_type)
lis_dumb_set_nb_devices
void lis_dumb_set_nb_devices(struct lis_api *self, int nb_devices)
generate fake device (and device descriptors)
lis_dumb_add_option
void lis_dumb_add_option(struct lis_api *self, const struct lis_option_descriptor *opt, const union lis_value *default_value, int set_flags)
lis_dumb_set_dev_descs
void lis_dumb_set_dev_descs(struct lis_api *impl, struct lis_device_descriptor **descs)
lis_dumb_get_nb_get
int lis_dumb_get_nb_get(struct lis_api *self)
lis_dumb_set_get_device_return
void lis_dumb_set_get_device_return(struct lis_api *self, enum lis_error ret)
lis_dumb_set_list_devices_return
void lis_dumb_set_list_devices_return(struct lis_api *self, enum lis_error ret)
lis_dumb_get_nb_set
int lis_dumb_get_nb_set(struct lis_api *self)
lis_api_dumb
enum lis_error lis_api_dumb(struct lis_api **impl, const char *name)
Dumb implementation. Returns 0 scanners by default. Only useful for testing. Used mostly in unit test...
lis_dumb_set_scan_parameters
void lis_dumb_set_scan_parameters(struct lis_api *self, const struct lis_scan_parameters *params)
lis_dumb_reset_counters
void lis_dumb_reset_counters(struct lis_api *self)
lis_dumb_set_scan_result
void lis_dumb_set_scan_result(struct lis_api *self, const struct lis_dumb_read *read_contents, int nb_reads)
error.h
lis_error
lis_error
Definition error.h:13
lis_api
LibInsane C API.
Definition capi.h:422
lis_device_descriptor
Basic informations regarding a scanner.
Definition capi.h:15
lis_dumb_read
Definition dumb.h:37
lis_dumb_read::nb_bytes
size_t nb_bytes
Definition dumb.h:39
lis_dumb_read::content
const void * content
Definition dumb.h:38
lis_option_descriptor
Describes a scanner or source option and provides callback to read or change its value.
Definition capi.h:120
lis_scan_parameters
Describes what will be returned when scanning.
Definition capi.h:233
lis_value
Variable.
Definition capi.h:94