resp = NULL;
}
+void _kds_s2000w_handler_opts_set_scan_source(option_descriptor* descriptor, handler* h, 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;
&& strcmp(descriptor->config_name, IMAGE_HEIGHT) != 0)
_kds_s2000w_handler_opts_write_value_to_json(value_object, descriptor->descriptor->type, value);
- if (strcmp(descriptor->config_name, SCAN_SOURCE) == 0) {
- 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;
- }
+ _kds_s2000w_handler_opts_set_scan_source(descriptor, h, value);
if (strcmp(descriptor->config_name, RESET) == 0) {
_kds_s2000w_handler_opts_set_option_to_default(h);