]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
add full profile load option descriptor
authorBastian Dehn <hhaalo@arcor.de>
Tue, 23 Sep 2025 07:31:09 +0000 (09:31 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Tue, 23 Sep 2025 07:31:09 +0000 (09:31 +0200)
src/kds_s2000w_option_descriptors.c
src/kds_s2000w_option_descriptors.h

index 3a657caef4ba46b9bcbd14e6e46a2268d1f450ae..4ff7a6fef8e24d7f95e9fd534cb31bb9c034d863 100644 (file)
@@ -1107,10 +1107,8 @@ SANE_Option_Descriptor _kds_s2000w_option_descriptor_feeder_group()
        return descriptor;
 }
 
-void kds_s2000w_option_descriptors_init(uint8_t profile)
+void _kds_s2000w_option_descriptors_init_full_profile()
 {
-       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_init_option_descriptors");
-
        descriptors = malloc(sizeof(option_descriptor*) * MAX_OPTION_COUNT);
        for (int i = 0; i < MAX_OPTION_COUNT; i++) {
                descriptors[i] = malloc(sizeof(option_descriptor));
@@ -1212,6 +1210,14 @@ void kds_s2000w_option_descriptors_init(uint8_t profile)
        descriptors[46]->descriptor = _kds_s2000w_option_descriptor_document_feeder_timeout_response();
 }
 
+void kds_s2000w_option_descriptors_init(uint8_t profile)
+{
+       kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_init_option_descriptors");
+
+       if (profile == PROFILE_FULL)
+               _kds_s2000w_option_descriptors_init_full_profile();
+}
+
 void kds_s2000w_option_descriptors_free()
 {
        kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_free_option_descriptors");
index b4baaf2c2d13c1c0ebe8a1fb646ebceeb59233e1..3523e2fdcaddcac993b8e7e390be02dde918e376 100644 (file)
@@ -64,6 +64,9 @@
 #define DOCUMENT_FEEDER_TIMEOUT "DocumentFeederTimeout"
 #define DOCUMENT_FEEDER_TIMEOUT_RESPONSE "DocumentFeederTimeoutResponse"
 
+enum {
+       PROFILE_FULL
+};
 
 typedef struct {
        const char* config_name;