GnomeScanner

## GnomeScanner GnomeScanner — Acquisition plugin |

## Synopsis

    #include <gnome-scanner.h>

    enum                GnomeScannerStatus;
    typedef             GnomeScanEvent;
                        GnomeScanner;
    void                gnome_scanner_settings_changed      (GnomeScanner *scanner);
    void                gnome_scanner_set_status            (GnomeScanner *scanner,
                                                             GnomeScannerStatus status);

## Object Hierarchy

      GObject
       +----GnomeScanPlugin
             +----GnomeScanner

## Properties

      "icon-name"                gchararray            : Read / Write / Construct Only
      "sensors"                  gpointer              : Read
      "status"                   GnomeScannerStatus    : Read

## Signals

      "event"                                          : Run Last
      "settings-changed"                               : Run Last
      "status-changed"                                 : Run Last

## Description

GnomeScanner is the base class for backend specific scanner (like e.g SANE). Following SANE design, Gnome Scan scanner has an undefined set of option. But unlike SANE, the scanner itself handle acquisition.

Each GnomeScanner should monitor its sensor (e.g. paper-in) and trigger an event on sensor state changes.

## Details

### enum GnomeScannerStatus

    typedef enum
    {
      GNOME_SCANNER_UNKNOWN,
      GNOME_SCANNER_READY,
      GNOME_SCANNER_BUSY
    } GnomeScannerStatus;

### GnomeScanEvent

    typedef gpointer GnomeScanEvent;

### GnomeScanner

    typedef struct {
      GnomeScannerStatus status;
    } GnomeScanner;

A GnomeScanner publish all instance specific plugins parameters and handle the real acquisition work (e.g. throug SANE, TWAIN, etc.)

### gnome_scanner_settings_changed ()

    void                gnome_scanner_settings_changed      (GnomeScanner *scanner);

Emit GnomeScanner::settings-changed signal.

`scanner` : | a GnomeScanner

### gnome_scanner_set_status ()

    void                gnome_scanner_set_status            (GnomeScanner *scanner,
                                                             GnomeScannerStatus status);

`scanner` : |
`status` : |

## Property Details

### The "`icon-name`" property

      "icon-name"                gchararray            : Read / Write / Construct Only

The icon name representing the device.

Default value: NULL

### The "`sensors`" property

      "sensors"                  gpointer              : Read

A list of sensor specification.

### The "`status`" property

      "status"                   GnomeScannerStatus    : Read

Device status

Default value: GNOME_SCANNER_UNKNOWN

## Signal Details

### The "event" signal

    void                user_function                      (GnomeScanner *scanner,
                                                            gpointer      event,
                                                            gpointer      user_data)      : Run Last

Emitted when an hardware event is triggered. (button, wheel, paper-in, etc.)

`scanner` : | the emitting GnomeScanner
`event` : | the emitted even.
`user_data` : | user data set when the signal handler was connected.

### The "settings-changed" signal

    void                user_function                      (GnomeScanner *scanner,
                                                            gpointer      user_data)      : Run Last

Emitted when the scanner has settings are hard setted.

`scanner` : | the emitting GnomeScanner
`user_data` : | user data set when the signal handler was connected.

### The "status-changed" signal

    void                user_function                      (GnomeScanner *scanner,
                                                            gpointer      user_data)      : Run Last

Emitted when the scanner status as changed.

`scanner` : | the emitting GnomeScanner
`user_data` : | user data set when the signal handler was connected.