diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2021-05-18 07:43:35 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2021-05-18 07:43:35 +0200 |
commit | 9f8889f928ce86ba4a78659d378c6ba29bc9f735 (patch) | |
tree | c9567cb0d015b68ce3da8d03472b6443f1cb1ca9 /include/sane/sanei_usb.h | |
parent | 446e9454b8cbe5b689149415d11d36e88442ca88 (diff) | |
parent | 154785ab2d5df7ddc8c2cf813b773c340e5e2aea (diff) |
Merge branch 'release/debian/1.0.32-1'debian/1.0.32-1
Diffstat (limited to 'include/sane/sanei_usb.h')
-rw-r--r-- | include/sane/sanei_usb.h | 53 |
1 files changed, 33 insertions, 20 deletions
diff --git a/include/sane/sanei_usb.h b/include/sane/sanei_usb.h index 1c1699d..81032db 100644 --- a/include/sane/sanei_usb.h +++ b/include/sane/sanei_usb.h @@ -16,8 +16,8 @@ License for more details. You should have received a copy of the GNU General Public License - along with sane; see the file COPYING. If not, write to the Free - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with sane; see the file COPYING. + If not, see <https://www.gnu.org/licenses/>. As a special exception, the authors of SANE give permission for additional uses of the libraries contained in this release of SANE. @@ -186,7 +186,7 @@ struct sanei_usb_dev_descriptor must be called before sanei_usb_init(). The sanei_usb subsystem also implements a "development mode". It modifies - the XML data file with the actual commands of the test run and attemps to + the XML data file with the actual commands of the test run and attempts to proceed testing until a mismatching input command is found for which input data is required. @@ -224,6 +224,19 @@ extern SANE_String sanei_usb_testing_get_backend(); */ extern SANE_Bool sanei_usb_is_replay_mode_enabled(); +/** Clears currently recorded data. + + This is useful on certain backends to clear the currently recorded data if it relates to + other devices than the one that the scan will be performed on. On these backends all + devices that the backend supports are opened multiple times. Recording this interaction + to XML file makes it impossible to replay it, as the existence of these devices is not mocked + currently. + + This function may only be called when no USB devices are open, otherwise the behavior is + unpredictable. + */ +extern void sanei_usb_testing_record_clear(); + /** Records a debug message in the captured USB data if testing mode is enabled. If testing mode * is not enabled, this function does nothing. * @@ -246,7 +259,7 @@ extern void sanei_usb_exit (void); /** Search for USB devices. * - * Search USB busses for scanner devices. + * Search USB buses for scanner devices. */ extern void sanei_usb_scan_devices (void); @@ -390,9 +403,9 @@ extern SANE_Status sanei_usb_reset (SANE_Int dn); * @param size size of the data * * @return - * - SANE_STATUS_GOOD - on succes + * - SANE_STATUS_GOOD - on success * - SANE_STATUS_EOF - if zero bytes have been read - * - SANE_STATUS_IO_ERROR - if an error occured during the read + * - SANE_STATUS_IO_ERROR - if an error occurred during the read * - SANE_STATUS_INVAL - on every other error * */ @@ -409,8 +422,8 @@ sanei_usb_read_bulk (SANE_Int dn, SANE_Byte * buffer, size_t * size); * @param size size of the data * * @return - * - SANE_STATUS_GOOD - on succes - * - SANE_STATUS_IO_ERROR - if an error occured during the write + * - SANE_STATUS_GOOD - on success + * - SANE_STATUS_IO_ERROR - if an error occurred during the write * - SANE_STATUS_INVAL - on every other error */ extern SANE_Status @@ -418,7 +431,7 @@ sanei_usb_write_bulk (SANE_Int dn, const SANE_Byte * buffer, size_t * size); /** Send/receive a control message to/from a USB device. * - * This function is only supported for libusb devices and kernel acces with + * This function is only supported for libusb devices and kernel access with * Linux 2.4.13 and newer. * For a detailed explanation of the parameters, have a look at the USB * specification at the <a href="http://www.usb.org/developers/docs/"> @@ -455,9 +468,9 @@ sanei_usb_control_msg (SANE_Int dn, SANE_Int rtype, SANE_Int req, * @param size size of the data * * @return - * - SANE_STATUS_GOOD - on succes + * - SANE_STATUS_GOOD - on success * - SANE_STATUS_EOF - if zero bytes have been read - * - SANE_STATUS_IO_ERROR - if an error occured during the read + * - SANE_STATUS_IO_ERROR - if an error occurred during the read * - SANE_STATUS_INVAL - on every other error * */ @@ -493,9 +506,9 @@ sanei_usb_attach_matching_devices (const char *name, * @param configuration, configuration nummber * * @return - * - SANE_STATUS_GOOD - on succes + * - SANE_STATUS_GOOD - on success * - SANE_STATUS_EOF - if zero bytes have been read - * - SANE_STATUS_IO_ERROR - if an error occured during the read + * - SANE_STATUS_IO_ERROR - if an error occurred during the read * - SANE_STATUS_INVAL - on every other error * */ @@ -511,9 +524,9 @@ sanei_usb_set_configuration (SANE_Int dn, SANE_Int configuration); * @param interface_number interface number * * @return - * - SANE_STATUS_GOOD - on succes + * - SANE_STATUS_GOOD - on success * - SANE_STATUS_EOF - if zero bytes have been read - * - SANE_STATUS_IO_ERROR - if an error occured during the read + * - SANE_STATUS_IO_ERROR - if an error occurred during the read * - SANE_STATUS_INVAL - on every other error * */ @@ -529,9 +542,9 @@ sanei_usb_claim_interface (SANE_Int dn, SANE_Int interface_number); * @param interface_number interface number * * @return - * - SANE_STATUS_GOOD - on succes + * - SANE_STATUS_GOOD - on success * - SANE_STATUS_EOF - if zero bytes have been read - * - SANE_STATUS_IO_ERROR - if an error occured during the read + * - SANE_STATUS_IO_ERROR - if an error occurred during the read * - SANE_STATUS_INVAL - on every other error * */ @@ -547,9 +560,9 @@ sanei_usb_release_interface (SANE_Int dn, SANE_Int interface_number); * @param alternate, alternate nummber * * @return - * - SANE_STATUS_GOOD - on succes + * - SANE_STATUS_GOOD - on success * - SANE_STATUS_EOF - if zero bytes have been read - * - SANE_STATUS_IO_ERROR - if an error occured during the read + * - SANE_STATUS_IO_ERROR - if an error occurred during the read * - SANE_STATUS_INVAL - on every other error * */ @@ -566,7 +579,7 @@ sanei_usb_set_altinterface (SANE_Int dn, SANE_Int alternate); * @param desc where to put the information to * * @return - * - SANE_STATUS_GOOD - on succes + * - SANE_STATUS_GOOD - on success * - SANE_STATUS_UNSUPPORTED - if the feature is not supported by the OS or * SANE. * - SANE_STATUS_INVAL - on every other error |