add_library("sane-kds_s2000w_net"
SHARED
"src/kds_s2000w_net.c"
+ "src/kds_s2000w_option_descriptors.c"
"src/kds_s2000w_handler.c"
"src/kds_s2000w_client.c")
set_target_properties("sane-kds_s2000w_net" PROPERTIES VERSION 1)
#include <string.h>
#include <sane/sane.h>
#include <sane/saneopts.h>
+#include "kds_s2000w_option_descriptors.h"
#include "kds_s2000w_handler.h"
#define MAX_OPTION_COUNT 24
{
switch (option) {
case 0:
- option_descriptors[option].name = SANE_NAME_NUM_OPTIONS;
- option_descriptors[option].title = SANE_TITLE_NUM_OPTIONS;
- option_descriptors[option].desc = SANE_DESC_NUM_OPTIONS;
- option_descriptors[option].unit = SANE_UNIT_NONE;
- option_descriptors[option].cap = SANE_CAP_SOFT_DETECT;
- option_descriptors[option].constraint_type = SANE_CONSTRAINT_NONE;
- option_descriptors[option].constraint.string_list = NULL;
+ kds_s2000w_option_descriptor_num_options(&option_descriptors[option]);
break;
case 1:
option_descriptors[option].name = SANE_NAME_STANDARD;
switch (option) {
- case 0:
case 2:
case 8:
case 12:
--- /dev/null
+#include <stddef.h>
+#include <sane/saneopts.h>
+#include "kds_s2000w_option_descriptors.h"
+
+void kds_s2000w_option_descriptor_num_options(SANE_Option_Descriptor* descriptor)
+{
+ descriptor->name = SANE_NAME_NUM_OPTIONS;
+ descriptor->title = SANE_TITLE_NUM_OPTIONS;
+ descriptor->desc = SANE_DESC_NUM_OPTIONS;
+ descriptor->unit = SANE_UNIT_NONE;
+ descriptor->cap = SANE_CAP_SOFT_DETECT;
+ descriptor->constraint_type = SANE_CONSTRAINT_NONE;
+ descriptor->constraint.string_list = NULL;
+ descriptor->type = SANE_TYPE_INT;
+ descriptor->size = sizeof(SANE_Int);
+}
\ No newline at end of file
--- /dev/null
+#ifndef KDS_S2000W_OPTION_DESCRIPTORS_H
+#include <sane/sane.h>
+
+void kds_s2000w_option_descriptor_num_options(SANE_Option_Descriptor* descriptor);
+#endif
\ No newline at end of file