1 /* sane - Scanner Access Now Easy. 2 3 Copyright (C) 2019 Povilas Kanapickas <povilas@radix.lt> 4 5 This file is part of the SANE package. 6 7 This program is free software; you can redistribute it and/or 8 modify it under the terms of the GNU General Public License as 9 published by the Free Software Foundation; either version 2 of the 10 License, or (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, but 13 WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program. If not, see <https://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef BACKEND_GENESYS_TEST_SETTINGS_H 22 #define BACKEND_GENESYS_TEST_SETTINGS_H 23 24 #include "scanner_interface.h" 25 #include "register_cache.h" 26 #include "test_usb_device.h" 27 #include <functional> 28 29 namespace genesys { 30 31 using TestCheckpointCallback = std::function<void(const Genesys_Device&, 32 TestScannerInterface&, 33 const std::string&)>; 34 35 bool is_testing_mode(); 36 void disable_testing_mode(); 37 void enable_testing_mode(std::uint16_t vendor_id, std::uint16_t product_id, 38 std::uint16_t bcd_device, 39 TestCheckpointCallback checkpoint_callback); 40 std::uint16_t get_testing_vendor_id(); 41 std::uint16_t get_testing_product_id(); 42 std::uint16_t get_testing_bcd_device(); 43 std::string get_testing_device_name(); 44 TestCheckpointCallback get_testing_checkpoint_callback(); 45 46 47 } // namespace genesys 48 49 #endif // BACKEND_GENESYS_TEST_SETTINGS_H 50