|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.tuneology.sane.Sane
SANE is an application programming interface (API) that provides standardized access to any raster image scanner hardware. The standardized interface allows to write just one driver for each scanner device instead of one driver for each scanner and application. The reduction in the number of required drivers provides significant savings in development time. More importantly, SANE raises the level at which applications can work. As such, it will enable applications that were previously unheard of in the UNIX world. While SANE is primarily targeted at a UNIX environment, the standard has been carefully designed to make it possible to implement the API on virtually any hardware or operating system.
SANE is an acronym for 'Scanner Access Now Easy'. Also, the hope is that SANE is sane in the sense that it will allow easy implementation of the API while accommodating all features required by today's scanner hardware and applications. Specifically, SANE should be broad enough to accommodate devices such as scanners, digital still and video cameras, as well as virtual devices like image file filters.
Field Summary | |
static int |
CAP_ADVANCED
If set, this capability indicates that the option should be considered an advanced user option. |
static int |
CAP_ALWAYS_SETTABLE
|
static int |
CAP_AUTOMATIC
If set, this capability indicates that the backend (or the device) is capable to picking a reasonable option value automatically. |
static int |
CAP_EMULATED
If set, this capability indicates that an option is not directly supported by the device and is instead emulated in the backend. |
static int |
CAP_HARD_SELECT
The option value can be set by user-intervention (e.g., by flipping a switch). |
static int |
CAP_INACTIVE
If set, this capability indicates that the option is not currently active (e.g., because it's meaningful only if another option is set to some other value). |
static int |
CAP_SOFT_DETECT
The option value can be detected by software. |
static int |
CAP_SOFT_SELECT
The option value can be set by a call to setValues(). |
static int |
FRAME_BLUE
Blue band of a red/green/blue image. |
static int |
FRAME_GRAY
Band covering human visual range. |
static int |
FRAME_GREEN
Green band of a red/green/blue image. |
static int |
FRAME_RED
Red band of a red/green/blue image. |
static int |
FRAME_RGB
Pixel-interleaved red/green/blue bands. |
static int |
INFO_INEXACT
This value is returned when setting an option value resulted in a value being selected that does not exactly match the requested value. |
static int |
INFO_RELOAD_OPTIONS
The setting of an option may affect the value or availability of one or more other options. |
static int |
INFO_RELOAD_PARAMS
The setting of an option may affect the parameter values (see sane_get_parameters()). |
static int |
STATUS_ACCESS_DENIED
Access to resource has been denied. |
static int |
STATUS_CANCELLED
Operation was cancelled. |
static int |
STATUS_COVER_OPEN
Scanner cover is open. |
static int |
STATUS_DEVICE_BUSY
Device is busy---retry later. |
static int |
STATUS_EOF
No more data available (end-of-file). |
static int |
STATUS_GOOD
Operation completed succesfully. |
static int |
STATUS_INVAL
Data or argument is invalid. |
static int |
STATUS_IO_ERROR
Error during device I/O. |
static int |
STATUS_JAMMED
Document feeder jammed. |
static int |
STATUS_NO_DOCS
Document feeder out of documents. |
static int |
STATUS_NO_MEM
Out of memory. |
static int |
STATUS_UNSUPPORTED
Operation is not supported. |
static int |
TYPE_BOOL
Option value is of type boolean. |
static int |
TYPE_BUTTON
An option of this type has no value. |
static int |
TYPE_FIXED
Option value is of type int with 16 bits of integer value and 16 bits of fractional value. |
static int |
TYPE_GROUP
An option of this type has no value. |
static int |
TYPE_INT
Option value is of type int. |
static int |
TYPE_STRING
Option value is of type String. |
static int |
UNIT_BIT
|
static int |
UNIT_DPI
|
static int |
UNIT_MICROSECOND
|
static int |
UNIT_MM
|
static int |
UNIT_NONE
|
static int |
UNIT_PERCENT
|
static int |
UNIT_PIXEL
|
Method Summary | |
static void |
exit()
This function must be called to terminate use of a backend. |
static SaneDevice[] |
getDevices(boolean local_only)
This function can be used to query the list of devices that are available. |
static int |
getVersionCode()
Returns the version code of the backend. |
static void |
init()
This function must be called before any other SANE function can be called. |
static SaneScanner |
open(java.lang.String deviceName)
This function is used to establish a connection to a particular device. |
static void |
setAuthorizer(SaneAuthorization a)
The authorization function may be called by a backend in response to any of the following calls: open, setValue(s), getValue(s), setAutomatic, SaneScanner.start. |
static java.lang.String |
strstatus(int status)
This function can be used to translate a SANE status code into a printable string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int STATUS_GOOD
public static final int STATUS_UNSUPPORTED
public static final int STATUS_CANCELLED
public static final int STATUS_DEVICE_BUSY
public static final int STATUS_INVAL
public static final int STATUS_EOF
public static final int STATUS_JAMMED
public static final int STATUS_NO_DOCS
public static final int STATUS_COVER_OPEN
public static final int STATUS_IO_ERROR
public static final int STATUS_NO_MEM
public static final int STATUS_ACCESS_DENIED
public static final int UNIT_NONE
public static final int UNIT_PIXEL
public static final int UNIT_BIT
public static final int UNIT_MM
public static final int UNIT_DPI
public static final int UNIT_PERCENT
public static final int UNIT_MICROSECOND
public static final int CAP_SOFT_SELECT
public static final int CAP_HARD_SELECT
public static final int CAP_SOFT_DETECT
public static final int CAP_EMULATED
public static final int CAP_AUTOMATIC
public static final int CAP_INACTIVE
public static final int CAP_ADVANCED
public static final int CAP_ALWAYS_SETTABLE
public static final int TYPE_BOOL
public static final int TYPE_INT
public static final int TYPE_FIXED
public static final int TYPE_STRING
public static final int TYPE_BUTTON
public static final int TYPE_GROUP
public static final int FRAME_GRAY
public static final int FRAME_RGB
public static final int FRAME_RED
public static final int FRAME_GREEN
public static final int FRAME_BLUE
public static final int INFO_INEXACT
public static final int INFO_RELOAD_OPTIONS
public static final int INFO_RELOAD_PARAMS
Method Detail |
public static void init() throws SaneException
SaneException
public static void setAuthorizer(SaneAuthorization a)
a
- public static int getVersionCode()
public static SaneDevice[] getDevices(boolean local_only) throws SaneException
This function may fail with SANE_STATUS_NO_MEM if an insufficient amount of memory is available.
local_only
-
SaneException
public static SaneScanner open(java.lang.String deviceName) throws SaneException
This function may fail with one of the following SaneExceptions:
STATUS_DEVICE_BUSY: The device is currently busy (in use by somebody else).
SANE_STATUS_INVAL: The device name is not valid.
SANE_STATUS_IO_ERROR An error occured while communicating with the device.
SANE_STATUS_NO_MEM: An insufficent amount of memory is available.
SANE_STATUS_ACCESS_DENIED: Access to the device has been denied due to insufficient or invalid authentication.
deviceName
-
SaneException
public static java.lang.String strstatus(int status)
status
- the SANE status code.
public static void exit()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |