From: Bastian Dehn Date: Sat, 27 Jan 2024 18:27:10 +0000 (+0100) Subject: add constraint for scan source X-Git-Tag: v1.0.0^2~417 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=0ea6f99471e1bf97f4ab3adc87a620b6cb2d9b27;p=sane-kds-s2000w-net.git add constraint for scan source --- diff --git a/src/kds_s2000w_net.c b/src/kds_s2000w_net.c index c505168..7f62c8b 100644 --- a/src/kds_s2000w_net.c +++ b/src/kds_s2000w_net.c @@ -349,10 +349,15 @@ const SANE_Option_Descriptor* _sane_kds_s2000w_net_get_option_descriptor( case 22: option_descriptors[option].name = "scansource"; option_descriptors[option].title = "scansource"; - option_descriptors[option].desc = "ScanSoscansourceurce"; - option_descriptors[option].cap = SANE_CAP_SOFT_DETECT; - option_descriptors[option].constraint_type = SANE_CONSTRAINT_NONE; - option_descriptors[option].constraint.string_list = NULL; + option_descriptors[option].desc = "scansource"; + option_descriptors[option].cap = SANE_CAP_SOFT_DETECT | SANE_CAP_SOFT_SELECT;; + option_descriptors[option].constraint_type = SANE_CONSTRAINT_STRING_LIST; + SANE_String_Const* constraint_scan_source = malloc(sizeof(char*) * 4); + constraint_scan_source[0] = "DocumentFeeder"; + constraint_scan_source[1] = "Automatic"; + constraint_scan_source[2] = "Flatbed"; + constraint_scan_source[3] = NULL; + option_descriptors[option].constraint.string_list = constraint_scan_source; break; default: return NULL;