kopia lustrzana https://gitlab.com/sane-project/backends
sanei_usb: Add function to check whether we are using fake data
rodzic
fd6adf2a46
commit
4edfb7a287
|
@ -219,6 +219,11 @@ extern SANE_Status sanei_usb_testing_enable_record(SANE_String_Const path,
|
|||
*/
|
||||
extern SANE_String sanei_usb_testing_get_backend();
|
||||
|
||||
/** Returns SANE_TRUE if replay testing mode is enabled, i.e. whether we are working with fake
|
||||
* scan data.
|
||||
*/
|
||||
extern SANE_Bool sanei_usb_is_replay_mode_enabled();
|
||||
|
||||
/** Initialize sanei_usb.
|
||||
*
|
||||
* Call this before any other sanei_usb function.
|
||||
|
|
|
@ -981,6 +981,14 @@ SANE_String sanei_usb_testing_get_backend()
|
|||
return ret;
|
||||
}
|
||||
|
||||
SANE_Bool sanei_usb_is_replay_mode_enabled()
|
||||
{
|
||||
if (testing_mode == sanei_usb_testing_mode_replay)
|
||||
return SANE_TRUE;
|
||||
|
||||
return SANE_FALSE;
|
||||
}
|
||||
|
||||
static void sanei_usb_add_endpoint(device_list_type* device,
|
||||
SANE_Int transfer_type,
|
||||
SANE_Int ep_address,
|
||||
|
|
Ładowanie…
Reference in New Issue