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

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

Loading...
Searching...
No Matches
Data Structures | Macros | Functions
dumb.h File Reference
`#include "capi.h"`
`#include "error.h"`
Include dependency graph for dumb.h:

Go to the source code of this file.

## Data Structures
struct | lis_dumb_read

## Macros
#define | LIS_DUMB_DEV_ID_FORMAT "dumb dev%d"
#define | LIS_DUMB_DEV_ID_FIRST "dumb dev0"

## Functions
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 tests.
void | lis_dumb_set_dev_descs (struct lis_api *impl, struct lis_device_descriptor **descs)
void | lis_dumb_set_nb_devices (struct lis_api *self, int nb_devices)
| generate fake device (and device descriptors)
void | lis_dumb_set_nb_devices_with_type (struct lis_api *self, int nb_devices, enum lis_item_type item_type)
void | lis_dumb_set_list_devices_return (struct lis_api *self, enum lis_error ret)
void | lis_dumb_set_get_device_return (struct lis_api *self, enum lis_error ret)
void | lis_dumb_add_option (struct lis_api *self, const struct lis_option_descriptor *opt, const union lis_value *default_value, int set_flags)
void | lis_dumb_set_scan_parameters (struct lis_api *self, const struct lis_scan_parameters *params)
void | lis_dumb_set_scan_result (struct lis_api *self, const struct lis_dumb_read *read_contents, int nb_reads)
void | lis_dumb_reset_counters (struct lis_api *self)
int | lis_dumb_get_nb_get (struct lis_api *self)
int | lis_dumb_get_nb_set (struct lis_api *self)
int | lis_dumb_get_nb_list_options (struct lis_api *self)

## Macro Definition Documentation

## ◆ LIS_DUMB_DEV_ID_FIRST

#define LIS_DUMB_DEV_ID_FIRST "dumb dev0"

Definition at line 12 of file dumb.h.

## ◆ LIS_DUMB_DEV_ID_FORMAT

#define LIS_DUMB_DEV_ID_FORMAT "dumb dev%d"

Definition at line 11 of file dumb.h.

## Function Documentation

## ◆ lis_api_dumb()

enum lis_error lis_api_dumb | ( | struct lis_api ** | impl,
|  | const char * | name )
| extern

Dumb implementation. Returns 0 scanners by default. Only useful for testing. Used mostly in unit tests.

Parameters

  [out] | impl | will point to the Dumb implementation
  [in] | name | name of the API

## ◆ 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_get_nb_get()

int lis_dumb_get_nb_get | ( | struct lis_api * | self | ) |

## ◆ lis_dumb_get_nb_list_options()

int lis_dumb_get_nb_list_options | ( | struct lis_api * | self | ) |

## ◆ lis_dumb_get_nb_set()

int lis_dumb_get_nb_set | ( | struct lis_api * | self | ) |

## ◆ lis_dumb_reset_counters()

void lis_dumb_reset_counters | ( | struct lis_api * | self | ) |

## ◆ lis_dumb_set_dev_descs()

void lis_dumb_set_dev_descs | ( | struct lis_api * | impl,
|  | struct lis_device_descriptor ** | descs )

## ◆ 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_set_nb_devices()

void lis_dumb_set_nb_devices | ( | struct lis_api * | self,
|  | int | nb_devices )

generate fake device (and device descriptors)

## ◆ 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_scan_parameters()

void lis_dumb_set_scan_parameters | ( | struct lis_api * | self,
|  | const struct lis_scan_parameters * | params )

## ◆ 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 )