#include <sane.hxx>
Public Member Functions | |
| Sane () | |
| ~Sane () | |
| BOOL | IsOpen () |
| String | GetOptionName (int n) |
| String | GetOptionTitle (int n) |
| SANE_Value_Type | GetOptionType (int n) |
| SANE_Unit | GetOptionUnit (int n) |
| String | GetOptionUnitName (int n) |
| SANE_Int | GetOptionCap (int n) |
| SANE_Constraint_Type | GetOptionConstraintType (int n) |
| const char ** | GetStringConstraint (int n) |
| int | GetRange (int, double *&) |
| int | GetOptionElements (int n) |
| int | GetOptionByName (const char *) |
| BOOL | GetOptionValue (int, BOOL &) |
| BOOL | GetOptionValue (int, ByteString &) |
| BOOL | GetOptionValue (int, double &, int nElement=0) |
| BOOL | GetOptionValue (int, double *) |
| BOOL | SetOptionValue (int, BOOL) |
| BOOL | SetOptionValue (int, const String &) |
| BOOL | SetOptionValue (int, double, int nElement=0) |
| BOOL | SetOptionValue (int, double *) |
| BOOL | ActivateButtonOption (int) |
| int | CountOptions () |
| int | GetDeviceNumber () |
| BOOL | Open (const char *) |
| BOOL | Open (int) |
| void | Close () |
| void | ReloadDevices () |
| void | ReloadOptions () |
| BOOL | Start (BitmapTransporter &) |
| Link | SetReloadOptionsHdl (const Link &rLink) |
Static Public Member Functions | |
| static BOOL | IsSane () |
| static int | CountDevices () |
| static String | GetName (int n) |
| static String | GetVendor (int n) |
| static String | GetModel (int n) |
| static String | GetType (int n) |
Private Member Functions | |
| oslGenericFunction | LoadSymbol (const char *) |
| void | Init () |
| void | DeInit () |
| void | Stop () |
| SANE_Status | ControlOption (int, SANE_Action, void *) |
| BOOL | CheckConsistency (const char *, BOOL bInit=FALSE) |
Private Attributes | |
| const SANE_Option_Descriptor ** | mppOptions |
| int | mnOptions |
| int | mnDevice |
| SANE_Handle | maHandle |
| Link | maReloadOptionsLink |
Static Private Attributes | |
| static int | nRefCount |
| static oslModule | pSaneLib |
| static SANE_Status(* | p_init )(SANE_Int *, SANE_Auth_Callback) |
| static void(* | p_exit )() |
| static SANE_Status(* | p_get_devices )(const SANE_Device ***, SANE_Bool) |
| static SANE_Status(* | p_open )(SANE_String_Const, SANE_Handle) |
| static void(* | p_close )(SANE_Handle) |
| static const SANE_Option_Descriptor *(* | p_get_option_descriptor )(SANE_Handle, SANE_Int) |
| static SANE_Status(* | p_control_option )(SANE_Handle, SANE_Int, SANE_Action, void *, SANE_Int *) |
| static SANE_Status(* | p_get_parameters )(SANE_Handle, SANE_Parameters *) |
| static SANE_Status(* | p_start )(SANE_Handle) |
| static SANE_Status(* | p_read )(SANE_Handle, SANE_Byte *, SANE_Int, SANE_Int *) |
| static void(* | p_cancel )(SANE_Handle) |
| static SANE_Status(* | p_set_io_mode )(SANE_Handle, SANE_Bool) |
| static SANE_Status(* | p_get_select_fd )(SANE_Handle, SANE_Int *) |
| static const SANE_String_Const(* | p_strstatus )(SANE_Status) |
| static SANE_Int | nVersion |
| static SANE_Device ** | ppDevices |
| static int | nDevices |
Definition at line 79 of file sane.hxx.
| Sane::~Sane | ( | ) |
| oslGenericFunction Sane::LoadSymbol | ( | const char * | ) | [inline, private] |
Definition at line 130 of file sane.cxx.
References bSaneSymbolLoadFailed, and pSaneLib.
Referenced by Init().
| void Sane::Init | ( | ) | [private] |
Definition at line 195 of file sane.cxx.
References bSaneSymbolLoadFailed, DeInit(), FAIL_SHUTDOWN_STATE, LoadSymbol(), nDevices, nVersion, p_cancel, p_close, p_control_option, p_exit, p_get_devices, p_get_option_descriptor, p_get_parameters, p_get_select_fd, p_init, p_open, p_read, p_set_io_mode, p_start, p_strstatus, ppDevices, and pSaneLib.
Referenced by ReloadDevices(), and Sane().
| void Sane::DeInit | ( | ) | [private] |
| void Sane::Stop | ( | ) | [private] |
| SANE_Status Sane::ControlOption | ( | int | , | |
| SANE_Action | , | |||
| void * | ||||
| ) | [private] |
Definition at line 142 of file sane.cxx.
References dbg_msg(), DUMP_STATE, GetOptionName(), maHandle, p_control_option, and ReloadOptions().
Referenced by ActivateButtonOption(), GetOptionValue(), and SetOptionValue().
| BOOL Sane::CheckConsistency | ( | const char * | , | |
| BOOL | bInit = FALSE | |||
| ) | [private] |
Definition at line 557 of file sane.cxx.
References dbg_msg(), and mppOptions.
Referenced by ReloadOptions(), and Start().
| static BOOL Sane::IsSane | ( | ) | [inline, static] |
Definition at line 132 of file sane.hxx.
References pSaneLib.
Referenced by SaneDlg::Execute(), IMPL_LINK(), SaneDlg::InitDevices(), SaneDlg::InitFields(), SaneDlg::LoadState(), SaneDlg::SaneDlg(), SaneDlg::SaveState(), SEQ(), and SaneDlg::SetAdjustedNumericalValue().
| BOOL Sane::IsOpen | ( | ) | [inline] |
Definition at line 134 of file sane.hxx.
References maHandle.
Referenced by SaneDlg::AcquirePreview(), SaneDlg::InitDevices(), SaneDlg::InitFields(), SaneDlg::LoadState(), ReloadDevices(), ReloadOptions(), ScannerThread::run(), SaneDlg::SetAdjustedNumericalValue(), SaneDlg::UpdateScanArea(), and ~Sane().
| static int Sane::CountDevices | ( | ) | [inline, static] |
Definition at line 136 of file sane.hxx.
References nDevices.
Referenced by IMPL_LINK(), SaneDlg::InitDevices(), and SaneDlg::LoadState().
| static String Sane::GetName | ( | int | n | ) | [inline, static] |
Definition at line 138 of file sane.hxx.
References ppDevices.
Referenced by IMPL_LINK(), SaneDlg::InitDevices(), and SaneDlg::LoadState().
| static String Sane::GetVendor | ( | int | n | ) | [inline, static] |
| static String Sane::GetModel | ( | int | n | ) | [inline, static] |
| static String Sane::GetType | ( | int | n | ) | [inline, static] |
| String Sane::GetOptionName | ( | int | n | ) | [inline] |
Definition at line 147 of file sane.hxx.
References mppOptions.
Referenced by ControlOption(), SaneDlg::EstablishBoolOption(), SaneDlg::EstablishButtonOption(), SaneDlg::EstablishNumericOption(), SaneDlg::EstablishQuantumRange(), SaneDlg::EstablishStringOption(), SaneDlg::EstablishStringRange(), SaneDlg::InitFields(), and SaneDlg::SaveState().
| String Sane::GetOptionTitle | ( | int | n | ) | [inline] |
Definition at line 149 of file sane.hxx.
References mppOptions.
Referenced by SaneDlg::InitFields().
| SANE_Value_Type Sane::GetOptionType | ( | int | n | ) | [inline] |
Definition at line 151 of file sane.hxx.
References mppOptions.
Referenced by SaneDlg::InitFields(), and SaneDlg::SaveState().
| SANE_Unit Sane::GetOptionUnit | ( | int | n | ) | [inline] |
Definition at line 153 of file sane.hxx.
References mppOptions.
Referenced by SaneDlg::InitFields(), and Start().
| String Sane::GetOptionUnitName | ( | int | n | ) |
Definition at line 999 of file sane.cxx.
References mppOptions.
Referenced by SaneDlg::EstablishNumericOption(), and SaneDlg::EstablishQuantumRange().
| SANE_Int Sane::GetOptionCap | ( | int | n | ) | [inline] |
Definition at line 156 of file sane.hxx.
References mppOptions.
Referenced by SaneDlg::InitFields().
| SANE_Constraint_Type Sane::GetOptionConstraintType | ( | int | n | ) | [inline] |
| const char** Sane::GetStringConstraint | ( | int | n | ) | [inline] |
Definition at line 160 of file sane.hxx.
References mppOptions.
Referenced by SaneDlg::EstablishStringRange().
| int Sane::GetRange | ( | int | , | |
| double *& | ||||
| ) |
Definition at line 923 of file sane.cxx.
References dbg_msg(), and mppOptions.
Referenced by SaneDlg::EstablishQuantumRange(), SaneDlg::InitFields(), and SaneDlg::SetAdjustedNumericalValue().
| int Sane::GetOptionElements | ( | int | n | ) | [inline] |
Definition at line 192 of file sane.hxx.
References mppOptions.
Referenced by SaneDlg::SaveState(), and SaneDlg::SetAdjustedNumericalValue().
| int Sane::GetOptionByName | ( | const char * | ) |
Definition at line 370 of file sane.cxx.
References mnOptions, and mppOptions.
Referenced by SaneDlg::AcquirePreview(), SaneDlg::InitFields(), SaneDlg::LoadState(), ScannerThread::run(), SaneDlg::SaveState(), SaneDlg::SetAdjustedNumericalValue(), and Start().
| BOOL Sane::GetOptionValue | ( | int | , | |
| BOOL & | ||||
| ) |
Definition at line 382 of file sane.cxx.
References ControlOption(), maHandle, and mppOptions.
Referenced by SaneDlg::EstablishBoolOption(), SaneDlg::EstablishNumericOption(), SaneDlg::EstablishQuantumRange(), SaneDlg::EstablishStringOption(), SaneDlg::EstablishStringRange(), SaneDlg::InitFields(), SaneDlg::SaveState(), and Start().
| BOOL Sane::GetOptionValue | ( | int | , | |
| ByteString & | ||||
| ) |
| BOOL Sane::GetOptionValue | ( | int | , | |
| double & | , | |||
| int | nElement = 0 | |||
| ) |
| BOOL Sane::GetOptionValue | ( | int | , | |
| double * | ||||
| ) |
| BOOL Sane::SetOptionValue | ( | int | , | |
| BOOL | ||||
| ) |
Definition at line 457 of file sane.cxx.
References ControlOption(), maHandle, and mppOptions.
Referenced by SaneDlg::AcquirePreview(), SaneDlg::LoadState(), ScannerThread::run(), and SaneDlg::SetAdjustedNumericalValue().
| BOOL Sane::SetOptionValue | ( | int | , | |
| const String & | ||||
| ) |
| BOOL Sane::SetOptionValue | ( | int | , | |
| double | , | |||
| int | nElement = 0 | |||
| ) |
| BOOL Sane::SetOptionValue | ( | int | , | |
| double * | ||||
| ) |
| BOOL Sane::ActivateButtonOption | ( | int | ) |
| int Sane::CountOptions | ( | ) | [inline] |
Definition at line 178 of file sane.hxx.
References mnOptions.
Referenced by SaneDlg::InitFields(), and SaneDlg::SaveState().
| int Sane::GetDeviceNumber | ( | ) | [inline] |
| BOOL Sane::Open | ( | const char * | ) |
Definition at line 313 of file sane.cxx.
References FAIL_STATE, maHandle, mnDevice, nDevices, p_open, ppDevices, and ReloadOptions().
Referenced by SaneDlg::InitDevices(), SaneDlg::LoadState(), Open(), and Stop().
| BOOL Sane::Open | ( | int | ) |
| void Sane::Close | ( | ) |
Definition at line 348 of file sane.cxx.
References maHandle, mnDevice, mppOptions, and p_close.
Referenced by SaneDlg::InitDevices(), SaneDlg::LoadState(), ReloadDevices(), Stop(), and ~Sane().
| void Sane::ReloadDevices | ( | ) |
| void Sane::ReloadOptions | ( | ) |
Definition at line 284 of file sane.cxx.
References CheckConsistency(), IsOpen(), maHandle, maReloadOptionsLink, mnOptions, mppOptions, p_control_option, p_get_option_descriptor, and p_strstatus.
Referenced by ControlOption(), and Open().
| BOOL Sane::Start | ( | BitmapTransporter & | ) |
Definition at line 583 of file sane.cxx.
References _ReadValue(), BYTE_BUFFER_SIZE, CheckConsistency(), DUMP_STATE, FrameStyle_BW, FrameStyle_Gray, FrameStyle_RGB, FrameStyle_Separated, GetOptionByName(), GetOptionUnit(), GetOptionValue(), BitmapTransporter::getStream(), BitmapTransporter::lock(), maHandle, p_get_parameters, p_get_select_fd, p_read, p_set_io_mode, and p_start.
Referenced by SaneDlg::AcquirePreview(), and ScannerThread::run().
| Link Sane::SetReloadOptionsHdl | ( | const Link & | rLink | ) | [inline] |
Definition at line 202 of file sane.hxx.
References maReloadOptionsLink.
Referenced by SaneDlg::SaneDlg().
int Sane::nRefCount [static, private] |
oslModule Sane::pSaneLib [static, private] |
SANE_Status(* Sane::p_init)(SANE_Int *, SANE_Auth_Callback)=0 [static, private] |
void(* Sane::p_exit)()=0 [static, private] |
SANE_Status(* Sane::p_get_devices)(const SANE_Device ***, SANE_Bool)=0 [static, private] |
SANE_Status(* Sane::p_open)(SANE_String_Const, SANE_Handle)=0 [static, private] |
void(* Sane::p_close)(SANE_Handle)=0 [static, private] |
const SANE_Option_Descriptor *(* Sane::p_get_option_descriptor)(SANE_Handle, SANE_Int)=0 [static, private] |
SANE_Status(* Sane::p_control_option)(SANE_Handle, SANE_Int, SANE_Action, void *, SANE_Int *)=0 [static, private] |
Definition at line 115 of file sane.cxx.
Referenced by ControlOption(), Init(), and ReloadOptions().
SANE_Status(* Sane::p_get_parameters)(SANE_Handle, SANE_Parameters *)=0 [static, private] |
SANE_Status(* Sane::p_start)(SANE_Handle)=0 [static, private] |
SANE_Status(* Sane::p_read)(SANE_Handle, SANE_Byte *, SANE_Int, SANE_Int *)=0 [static, private] |
void(* Sane::p_cancel)(SANE_Handle)=0 [static, private] |
SANE_Status(* Sane::p_set_io_mode)(SANE_Handle, SANE_Bool)=0 [static, private] |
SANE_Status(* Sane::p_get_select_fd)(SANE_Handle, SANE_Int *)=0 [static, private] |
const SANE_String_Const(* Sane::p_strstatus)(SANE_Status)=0 [static, private] |
SANE_Int Sane::nVersion [static, private] |
SANE_Device ** Sane::ppDevices [static, private] |
Definition at line 108 of file sane.hxx.
Referenced by GetModel(), GetName(), GetType(), GetVendor(), Init(), and Open().
int Sane::nDevices [static, private] |
const SANE_Option_Descriptor** Sane::mppOptions [private] |
Definition at line 111 of file sane.hxx.
Referenced by CheckConsistency(), Close(), GetOptionByName(), GetOptionCap(), GetOptionConstraintType(), GetOptionElements(), GetOptionName(), GetOptionTitle(), GetOptionType(), GetOptionUnit(), GetOptionUnitName(), GetOptionValue(), GetRange(), GetStringConstraint(), ReloadOptions(), and SetOptionValue().
int Sane::mnOptions [private] |
Definition at line 112 of file sane.hxx.
Referenced by CountOptions(), GetOptionByName(), and ReloadOptions().
int Sane::mnDevice [private] |
SANE_Handle Sane::maHandle [private] |
Definition at line 114 of file sane.hxx.
Referenced by Close(), ControlOption(), GetOptionValue(), IsOpen(), Open(), ReloadOptions(), SetOptionValue(), Start(), and Stop().
Link Sane::maReloadOptionsLink [private] |
1.5.1