From 0eb97e8a7ead0f3e0fcfef51db6c4c3f7216b0ab Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sun, 5 Oct 2025 09:42:55 +0200 Subject: [PATCH] change descriptor method prefix --- src/kds_s2000w_handler_opts.c | 4 ++-- src/kds_s2000w_option_descriptors.c | 2 +- src/kds_s2000w_option_descriptors.h | 2 +- tests/kds_s2000w_option_descriptor_tests.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/kds_s2000w_handler_opts.c b/src/kds_s2000w_handler_opts.c index dfec6f0..8ea46f0 100644 --- a/src/kds_s2000w_handler_opts.c +++ b/src/kds_s2000w_handler_opts.c @@ -339,7 +339,7 @@ void kds_s2000w_handler_opts_get_option(handler* h, uint32_t option, void* value if (h->current_scanner_config != NULL) config = json_object_object_get(h->current_scanner_config, "Configuration"); - option_descriptor* descriptor = kds_s2000w_option_descriptor_full_get_by_number(option); + option_descriptor* descriptor = kds_s2000w_option_descriptors_full_get_by_number(option); json_object* value_object = NULL; if (strcmp(descriptor->config_name, OPTION_COUNT) == 0) { config = json_object_object_get(h->current_scanner_config, "Configuration"); @@ -383,7 +383,7 @@ void kds_s2000w_handler_opts_set_option(handler* h, uint32_t option, void* value if (h->current_scanner_config != NULL) config = json_object_object_get(h->current_scanner_config, "Configuration"); - option_descriptor* descriptor = kds_s2000w_option_descriptor_full_get_by_number(option); + option_descriptor* descriptor = kds_s2000w_option_descriptors_full_get_by_number(option); json_object* value_object = NULL; value_object = json_object_object_get(config, descriptor->config_name); diff --git a/src/kds_s2000w_option_descriptors.c b/src/kds_s2000w_option_descriptors.c index 699d48f..fcc8792 100644 --- a/src/kds_s2000w_option_descriptors.c +++ b/src/kds_s2000w_option_descriptors.c @@ -1417,7 +1417,7 @@ uint8_t kds_s2000w_option_descriptors_get_max_option_count() return max_option_count; } -option_descriptor* kds_s2000w_option_descriptor_full_get_by_number(uint32_t number) +option_descriptor* kds_s2000w_option_descriptors_full_get_by_number(uint32_t number) { kds_s2000w_debug_printf(ALL, "kds_s2000w_option_descriptor_full_get_by_number"); diff --git a/src/kds_s2000w_option_descriptors.h b/src/kds_s2000w_option_descriptors.h index 9479674..846d1d3 100644 --- a/src/kds_s2000w_option_descriptors.h +++ b/src/kds_s2000w_option_descriptors.h @@ -73,7 +73,7 @@ void kds_s2000w_option_descriptors_init(uint8_t profile); void kds_s2000w_option_descriptors_free(); uint8_t kds_s2000w_option_descriptors_get_max_option_count(); -option_descriptor* kds_s2000w_option_descriptor_full_get_by_number(uint32_t number); +option_descriptor* kds_s2000w_option_descriptors_full_get_by_number(uint32_t number); SANE_Option_Descriptor* kds_s2000w_option_descriptors_get_by_number(uint32_t number); __attribute_deprecated__ SANE_Option_Descriptor* kds_s2000w_option_descriptors_get_by_name(const char* name); SANE_Option_Descriptor* kds_s2000w_option_descriptors_get_by_config_name(const char* name); diff --git a/tests/kds_s2000w_option_descriptor_tests.c b/tests/kds_s2000w_option_descriptor_tests.c index 2521383..315aaa9 100644 --- a/tests/kds_s2000w_option_descriptor_tests.c +++ b/tests/kds_s2000w_option_descriptor_tests.c @@ -851,7 +851,7 @@ void kds_s2000w_option_get_descriptor_over_max_options_test() void kds_s2000w_option_full_get_descriptor_by_number() { - option_descriptor* option = kds_s2000w_option_descriptor_full_get_by_number(31); + option_descriptor* option = kds_s2000w_option_descriptors_full_get_by_number(31); assert_string_equal(option->config_name, "Reset"); } @@ -860,7 +860,7 @@ void kds_s2000w_option_full_get_descriptor_over_max_options_test() { uint8_t max_option_count = kds_s2000w_option_descriptors_get_max_option_count(); - option_descriptor* option = kds_s2000w_option_descriptor_full_get_by_number(max_option_count); + option_descriptor* option = kds_s2000w_option_descriptors_full_get_by_number(max_option_count); assert_null(option); } \ No newline at end of file -- 2.47.3