GnomeScanner

GnomeScanner — An object representating a device

Synopsis




                    GnomeScanner;
void                gnome_scanner_foreach_options       (GnomeScanner *scanner,
                                                         GHFunc func,
                                                         gpointer data);
GnomeScannerOption* gnome_scanner_find_option           (GnomeScanner *scanner,
                                                         const gchar *name);
gpointer            gnome_scanner_get_id                (GnomeScanner *scanner);
const gchar*        gnome_scanner_get_vendor            (GnomeScanner *scanner);
const gchar*        gnome_scanner_get_product           (GnomeScanner *scanner);
GnomeScannerType    gnome_scanner_get_scanner_type      (GnomeScanner *scanner);
GValueArray*        gnome_scanner_get_sources           (GnomeScanner *scanner);
GValueArray*        gnome_scanner_get_colorspaces       (GnomeScanner *scanner);
GValueArray*        gnome_scanner_get_depths            (GnomeScanner *scanner);
GnomeScanGeometry*  gnome_scanner_get_geometry          (GnomeScanner *scanner);
GnomeScanRange*     gnome_scanner_get_resolution_range  (GnomeScanner *scanner);
GValueArray*        gnome_scanner_get_resolution_enum   (GnomeScanner *scanner);

Object Hierarchy


  GObject
   +----GnomeScanner

Properties


  "colorspaces"              GValueArray           : Read / Write / Construct Only
  "depths"                   GValueArray           : Read / Write / Construct Only
  "geometry"                 gpointer              : Read / Write / Construct Only
  "id"                       gpointer              : Read / Write / Construct Only
  "options"                  gpointer              : Read / Write / Construct Only
  "product"                  gchararray            : Read / Write / Construct Only
  "resolution-enum"          GValueArray           : Read / Write
  "resolution-range"         gpointer              : Read / Write
  "sources"                  GValueArray           : Read / Write / Construct Only
  "type"                     GnomeScannerType      : Read / Write / Construct Only
  "vendor"                   gchararray            : Read / Write / Construct Only

Description

This object gathers all meta-informations about a devices. It also contains device specific option. Application should use such object only for device listing or for special device configuration tools. Use GnomeScanContext to configure a scan not a device.

Details

GnomeScanner

typedef struct {
  const gchar*	       		vendor;
  const gchar*			product;
  GnomeScannerType		type;
  GnomeScanGeometry*		geometry;
  GValueArray*			sources;
  GValueArray*			colorspaces;
  GValueArray*			depths;
  GnomeScanRange*		resolution_range;
  GValueArray*			resolution_enum;
  GHashTable*			options;
} GnomeScanner;


gnome_scanner_foreach_options ()

void                gnome_scanner_foreach_options       (GnomeScanner *scanner,
                                                         GHFunc func,
                                                         gpointer data);

Retreive each option and apply the function func with a GnomeScannerOption and data as parameter.

scanner : a GnomeScanner
func : a GHFunc callback
data : an optional parameter to pass to func

gnome_scanner_find_option ()

GnomeScannerOption* gnome_scanner_find_option           (GnomeScanner *scanner,
                                                         const gchar *name);

Search an option by its name in the lists of options. If the search fail, a NULL pointer is returned.

scanner : a GnomeScanner
name : a unique option's name
Returns : the corresponding GnomeScannerOption or NULL

gnome_scanner_get_id ()

gpointer            gnome_scanner_get_id                (GnomeScanner *scanner);

Returns the unique id of the device. This function should be called only by GnomeScanBackend.

scanner : a GnomeScanner
Returns : the device's id

gnome_scanner_get_vendor ()

const gchar*        gnome_scanner_get_vendor            (GnomeScanner *scanner);

Returns a string describing the device's vendor.

scanner : a GnomeScanner
Returns : the device's vendor

gnome_scanner_get_product ()

const gchar*        gnome_scanner_get_product           (GnomeScanner *scanner);

Returns a string describing the device's product name.

scanner : a GnomeScanner
Returns : the product name

gnome_scanner_get_scanner_type ()

GnomeScannerType    gnome_scanner_get_scanner_type      (GnomeScanner *scanner);

Return the device type as a string.

scanner : a GnomeScanner
Returns : the device type

gnome_scanner_get_sources ()

GValueArray*        gnome_scanner_get_sources           (GnomeScanner *scanner);

Retrieve available document source on the device.

scanner : a GnomeScanner
Returns : the availables document sources

gnome_scanner_get_colorspaces ()

GValueArray*        gnome_scanner_get_colorspaces       (GnomeScanner *scanner);

Retieve available colorspaces from the device.

scanner : a GnomeScanner
Returns : The array of available colorspaces

gnome_scanner_get_depths ()

GValueArray*        gnome_scanner_get_depths            (GnomeScanner *scanner);

Retrieve available depths from device.

scanner : a GnomeScanner
Returns : The array of available depths.

gnome_scanner_get_geometry ()

GnomeScanGeometry*  gnome_scanner_get_geometry          (GnomeScanner *scanner);

Retrieve the geometry of the device, and thus, the max image size.

scanner : a GnomeScanner
Returns : the device size

gnome_scanner_get_resolution_range ()

GnomeScanRange*     gnome_scanner_get_resolution_range  (GnomeScanner *scanner);

Retrieve the range of the available resolution.

scanner : a GnomeScanner
Returns : the resolution range

gnome_scanner_get_resolution_enum ()

GValueArray*        gnome_scanner_get_resolution_enum   (GnomeScanner *scanner);

scanner :
Returns :

Property Details

The "colorspaces" property

  "colorspaces"              GValueArray           : Read / Write / Construct Only

Available colorspaces.


The "depths" property

  "depths"                   GValueArray           : Read / Write / Construct Only

Availabled depths.


The "geometry" property

  "geometry"                 gpointer              : Read / Write / Construct Only

Geometry of the device's scan area in mm.


The "id" property

  "id"                       gpointer              : Read / Write / Construct Only

Backend unique device identifier.


The "options" property

  "options"                  gpointer              : Read / Write / Construct Only

All device's options.


The "product" property

  "product"                  gchararray            : Read / Write / Construct Only

Device product name.

Default value: "Unknown"


The "resolution-enum" property

  "resolution-enum"          GValueArray           : Read / Write

Enumeration of available resolutions on the device.


The "resolution-range" property

  "resolution-range"         gpointer              : Read / Write

Range of available resolutions on the device.


The "sources" property

  "sources"                  GValueArray           : Read / Write / Construct Only

Available document sources on the device.


The "type" property

  "type"                     GnomeScannerType      : Read / Write / Construct Only

Device type.

Default value: GNOME_SCANNER_UNKNOWN


The "vendor" property

  "vendor"                   gchararray            : Read / Write / Construct Only

Device vendor name.

Default value: "Unknown"