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

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

Loading...
Searching...
No Matches
Macros | Enumerations | Functions
error.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros
#define | LIS_ENUM_ERROR 0xFFFFFFF
#define | LIS_ERR_BIT (1 << 30)
#define | LIS_ERR_INTERNAL_BIT (1 << 29)
#define | LIS_IS_OK(err) (!((err) & LIS_ERR_BIT))
#define | LIS_IS_ERROR(err) ((err) & LIS_ERR_BIT)

## Enumerations
enum | lis_error { LIS_OK = 0 , LIS_WARMING_UP , LIS_ERR_DEVICE_BUSY = LIS_ERR_BIT , LIS_ERR_CANCELLED , LIS_ERR_UNSUPPORTED , LIS_ERR_INVALID_VALUE , LIS_ERR_JAMMED , LIS_ERR_COVER_OPEN , LIS_ERR_IO_ERROR , LIS_ERR_NO_MEM , LIS_ERR_ACCESS_DENIED , LIS_ERR_HW_IS_LOCKED , LIS_ERR_INTERNAL_IMG_FORMAT_NOT_SUPPORTED = LIS_ERR_BIT | LIS_ERR_INTERNAL_BIT , LIS_ERR_INTERNAL_NOT_IMPLEMENTED , LIS_ERR_INTERNAL_UNKNOWN_ERROR , LIS_ERR_OFFLINE }

## Functions
const char * | lis_strerror (enum lis_error)
| returns an English message corresponding to the error code.

## Macro Definition Documentation

## ◆ LIS_ENUM_ERROR

#define LIS_ENUM_ERROR 0xFFFFFFF

Definition at line 8 of file error.h.

## ◆ LIS_ERR_BIT

#define LIS_ERR_BIT (1 << 30)

Definition at line 10 of file error.h.

## ◆ LIS_ERR_INTERNAL_BIT

#define LIS_ERR_INTERNAL_BIT (1 << 29)

Definition at line 11 of file error.h.

## ◆ LIS_IS_ERROR

#define LIS_IS_ERROR | ( |  | err | ) | ((err) & LIS_ERR_BIT)

Definition at line 39 of file error.h.

## ◆ LIS_IS_OK

#define LIS_IS_OK | ( |  | err | ) | (!((err) & LIS_ERR_BIT))

Definition at line 38 of file error.h.

## Enumeration Type Documentation

## ◆ lis_error

enum lis_error

Enumerator
LIS_OK | Everything is fine.
LIS_WARMING_UP | Lamp must warm up first.
LIS_ERR_DEVICE_BUSY | Device already used by another process.
LIS_ERR_CANCELLED | Scan was cancelled, either by software or by hardware but scan_read() was attempted anyway
LIS_ERR_UNSUPPORTED | Operation is not supported.
LIS_ERR_INVALID_VALUE | Invalid value.
LIS_ERR_JAMMED | Your scanner is a mess. Go unmess it first.
LIS_ERR_COVER_OPEN | Scanner cover is opened. Please close the scanner first.
LIS_ERR_IO_ERROR | Basically, things didn't work and we don't know why.
LIS_ERR_NO_MEM | Out of memory
LIS_ERR_ACCESS_DENIED | Operation not allowed.
LIS_ERR_HW_IS_LOCKED | Scanner is locked and doesn't allow scanning
LIS_ERR_INTERNAL_IMG_FORMAT_NOT_SUPPORTED | Image format is not supported by LibInsane.
LIS_ERR_INTERNAL_NOT_IMPLEMENTED |
LIS_ERR_INTERNAL_UNKNOWN_ERROR | Backend returned an unknown error code
LIS_ERR_OFFLINE |

Definition at line 13 of file error.h.

## Function Documentation

## ◆ lis_strerror()

const char * lis_strerror | ( | enum | lis_error | ) |
| extern

returns an English message corresponding to the error code.

Returns
  a constant (no need to free).