summaryrefslogtreecommitdiff
path: root/include/sane/sanei_usb.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2021-02-16 18:25:42 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2021-02-16 18:25:42 +0100
commit64ddd1a4dfcefd11f662f5cf4bb05b590d901a97 (patch)
tree4303648095deff998ae20c2393b56db527742ac9 /include/sane/sanei_usb.h
parent5793a221e112fa49073de0137d6bfa750a61b0a1 (diff)
parentecaaf250cb33ff61f37a7b441f2337584a655350 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'include/sane/sanei_usb.h')
-rw-r--r--include/sane/sanei_usb.h53
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