Libinsane.ScanSession

g GObject.Object GObject.Object Libinsane.ScanSession Libinsane.ScanSession GObject.Object->Libinsane.ScanSession

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

cancel ()

end_of_feed ()

end_of_page ()

get_scan_parameters ()

read (buffer)

read_bytes (lng)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

object

r

Class Details

class Libinsane.ScanSession(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Libinsane.ScanSessionClass

cancel()
end_of_feed()
Return type:

bool

end_of_page()
Return type:

bool

get_scan_parameters()
Raises:

GLib.Error

Returns:

item scan parameters.

Return type:

Libinsane.ScanParameters

read(buffer)
Parameters:

buffer (bytes) – buffer to read data

Raises:

GLib.Error

Returns:

Number of bytes read, or -1 on error

Return type:

int

You must call Libinsane.ScanSession.end_of_feed() and Libinsane.ScanSession.end_of_page() after each call to this function before calling it again.

read_bytes(lng)
Parameters:

lng (int) – number of bytes wanted

Raises:

GLib.Error

Returns:

a new GLib.Bytes, or None if an error occured

Return type:

GLib.Bytes