Interface LibSANE

The core SANE Emscripten module.

Hierarchy

  • LibSANE

Properties

Deprecated

Consider using the SANEConstraintType enum directly.

This object is not going away anytime soon (or ever probably).

But you should consider using the equivalent enum because it doesn't require having a reference to the library module. All enums are exported with the package.

SANE_CURRENT_MAJOR: number

SANE API version code (major).

SANE_CURRENT_MINOR: number

SANE API version code (minor).

SANE_FRAME: SANEEnum<typeof SANEFrame, SANEFrame>

Deprecated

Consider using the SANEFrame enum directly.

This object is not going away anytime soon (or ever probably).

But you should consider using the equivalent enum because it doesn't require having a reference to the library module. All enums are exported with the package.

SANE_STATUS: SANEEnum<typeof SANEStatus, SANEStatus>

Deprecated

Consider using the SANEStatus enum directly.

This object is not going away anytime soon (or ever probably).

But you should consider using the equivalent enum because it doesn't require having a reference to the library module. All enums are exported with the package.

Deprecated

Consider using the SANEValueType enum directly.

This object is not going away anytime soon (or ever probably).

But you should consider using the equivalent enum because it doesn't require having a reference to the library module. All enums are exported with the package.

SANE_UNIT: SANEEnum<typeof SANEUnit, SANEUnit>

Deprecated

Consider using the SANEUnit enum directly.

This object is not going away anytime soon (or ever probably).

But you should consider using the equivalent enum because it doesn't require having a reference to the library module. All enums are exported with the package.

SANE_WASM_BACKENDS: string

List of SANE API backends built into sane-wasm.

SANE_WASM_COMMIT: string

Commit hash of sane-wasm.

SANE_WASM_VERSION: string

Version code of sane-wasm.

sane_cancel: (() => Promise<{
    status: SANEStatus;
}>)

Type declaration

sane_close: (() => Promise<{
    status: SANEStatus;
}>)

Type declaration

sane_control_option_get_value: ((option) => Promise<{
    status: GOOD;
    value: any;
} | {
    status: UNSUPPORTED | CANCELLED | DEVICE_BUSY | INVAL | EOF | JAMMED | NO_DOCS | COVER_OPEN | IO_ERROR | NO_MEM | ACCESS_DENIED;
    value: null;
}>)

Type declaration

sane_control_option_set_auto: ((option) => Promise<{
    info: SANEInfo;
    status: GOOD;
} | {
    info: null;
    status: UNSUPPORTED | CANCELLED | DEVICE_BUSY | INVAL | EOF | JAMMED | NO_DOCS | COVER_OPEN | IO_ERROR | NO_MEM | ACCESS_DENIED;
}>)

Type declaration

sane_control_option_set_value: ((option, value) => Promise<{
    info: SANEInfo;
    status: GOOD;
} | {
    info: null;
    status: UNSUPPORTED | CANCELLED | DEVICE_BUSY | INVAL | EOF | JAMMED | NO_DOCS | COVER_OPEN | IO_ERROR | NO_MEM | ACCESS_DENIED;
}>)

Type declaration

sane_exit: (() => Promise<{
    status: SANEStatus;
}>)

Type declaration

sane_get_devices: (() => Promise<{
    devices: SANEDevice[];
    status: GOOD;
} | {
    devices: null;
    status: UNSUPPORTED | CANCELLED | DEVICE_BUSY | INVAL | EOF | JAMMED | NO_DOCS | COVER_OPEN | IO_ERROR | NO_MEM | ACCESS_DENIED;
}>)

Type declaration

sane_get_option_descriptor: ((option) => {
    option_descriptor: null | SANEOptionDescriptor;
    status: SANEStatus;
})

Type declaration

sane_get_parameters: (() => {
    parameters: SANEParameters;
    status: GOOD;
} | {
    parameters: null;
    status: UNSUPPORTED | CANCELLED | DEVICE_BUSY | INVAL | EOF | JAMMED | NO_DOCS | COVER_OPEN | IO_ERROR | NO_MEM | ACCESS_DENIED;
})

Type declaration

sane_get_state: (() => SANEState)

Type declaration

    • (): SANEState
    • Get the current state of the library.

      This is provided by sane-wasm, it's not part of SANE API.

      Returns SANEState

sane_init: (() => {
    status: GOOD;
    version_code: number;
} | {
    status: UNSUPPORTED | CANCELLED | DEVICE_BUSY | INVAL | EOF | JAMMED | NO_DOCS | COVER_OPEN | IO_ERROR | NO_MEM | ACCESS_DENIED;
    version_code: null;
})

Type declaration

sane_open: ((devicename) => Promise<{
    status: SANEStatus;
}>)

Type declaration

sane_read: (() => Promise<{
    data: Uint8Array;
    status: GOOD;
} | {
    data: null;
    status: UNSUPPORTED | CANCELLED | DEVICE_BUSY | INVAL | EOF | JAMMED | NO_DOCS | COVER_OPEN | IO_ERROR | NO_MEM | ACCESS_DENIED;
}>)

Type declaration

sane_start: (() => {
    status: SANEStatus;
})

Type declaration

sane_strstatus: ((status) => string)

Type declaration

Generated using TypeDoc