This function can be used to query the list of devices that are
available. If the function executes successfully, it stores a pointer
to a NULL terminated array of pointers to SANE_Device
structures in *device_list. The returned list is guaranteed
to remain unchanged and valid until (a) another call to this function
is performed or (b) a call to sane_exit() is performed. This
function can be called repeatedly to detect when new devices become
available. If argument local_only is true, only local devices
are returned (devices directly attached to the machine that SANE is
running on). If it is false, the device list includes all remote
devices that are accessible to the SANE library.
SANE_Status sane_get_devices (const SANE_Device *** device_list,
SANE_Bool local_only);
This function may fail with SANE_STATUS_NO_MEM if an insufficient amount of memory is available.
Backend Implementation NoteSANE does not require that this function is called before a sane_open() call is performed. A device name may be specified explicitly by a user which would make it unnecessary and undesirable to call this function first.