h->current_scan_status->available_images = 0;
h->current_scan_status->downloaded_images = 0;
h->current_scan_status->complete_scanned = false;
- h->current_scan_status->feeder = DocumentFeeder;
h->read_info->scan_started = false;
h->read_info->cancel = false;
h->read_info->read_size = 0;
resp = NULL;
}
-void _kds_s2000w_handler_opts_set_scan_source(const option_descriptor* descriptor, handler* h, const char* value)
-{
- if (strcmp(descriptor->config_name, SCAN_SOURCE) != 0)
- return;
-
- if (strcmp(value, "Flatbed") == 0)
- h->current_scan_status->feeder = Flatbed;
- if (strcmp(value, "DocumentFeeder") == 0)
- h->current_scan_status->feeder = DocumentFeeder;
- if (strcmp(value, "Automatic") == 0)
- h->current_scan_status->feeder = Automatic;
-}
-
void _kds_s2000w_handler_opts_set_autostart_on(json_object* config)
{
uint32_t auto_start_value = AUTOSTART_ON;
}
json_object* value_object = json_object_object_get(config, descriptor->config_name);
- if (strcmp(descriptor->config_name, SCAN_SOURCE) == 0) {
- _kds_s2000w_handler_opts_write_value(value_object, descriptor->descriptor->type, value);
-
- if (strcmp(value, "Flatbed") == 0)
- h->current_scan_status->feeder = Flatbed;
-
- if (strcmp(value, "DocumentFeeder") == 0)
- h->current_scan_status->feeder = DocumentFeeder;
-
- if (strcmp(value, "Automatic") == 0)
- h->current_scan_status->feeder = Automatic;
-
- return;
- }
if (strcmp(descriptor->config_name, IMAGE_OFFSET_X) == 0) {
int32_t* int_value = (int32_t*) value;
&& strcmp(descriptor->config_name, IMAGE_HEIGHT) != 0)
_kds_s2000w_handler_opts_write_value_to_json(value_object, descriptor->descriptor->type, value);
- _kds_s2000w_handler_opts_set_scan_source(descriptor, h, value);
config = _kds_s2000w_handler_opts_reset(descriptor, h);
if (h->profile > PROFILE_MIN)
expect_function_call(__wrap_kds_s2000w_client_get_image);
expect_function_call(__wrap_kds_s2000w_client_delete_image);
handler* h = kds_s2000w_handler_init();
- h->current_scan_status->feeder = Flatbed;
const char* test_config = "{\"Configuration\": { \"ColorMode\": \"Color\" } }";
h->current_scanner_config = json_tokener_parse(test_config);