summaryrefslogtreecommitdiffstats
path: root/src/opt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/opt.h')
-rw-r--r--src/opt.h27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/opt.h b/src/opt.h
index 297c679..322c25c 100644
--- a/src/opt.h
+++ b/src/opt.h
@@ -1,30 +1,25 @@
#ifndef _RCC_OPT_H
#define _RCC_OPT_H
-struct rcc_option_defval_t {
- rcc_option option;
- rcc_option_value value;
-};
-typedef struct rcc_option_defval_t rcc_option_defval;
+#include "internal.h"
-enum rcc_option_type_t {
- RCC_OPTION_TYPE_BOOLEAN = 0,
- RCC_OPTION_TYPE_RANGE,
- RCC_OPTION_TYPE_FLAGS,
- RCC_OPTION_TYPE_MENU,
- RCC_OPTION_TYPE_MAX
-};
-typedef enum rcc_option_type_t rcc_option_type;
+typedef const char *rcc_option_value_name;
+typedef const rcc_option_value_name *rcc_option_value_names;
struct rcc_option_description_t {
rcc_option option;
+ rcc_option_value value;
+ rcc_option_range range;
+ rcc_option_type type;
const char *sn;
- rcc_option_type;
- rcc_option_value min;
- rcc_option_value max;
+ rcc_option_value_names vsn;
};
typedef struct rcc_option_description_t rcc_option_description;
+const char *rccOptionDescriptionGetName(rcc_option_description *desc);
+rcc_option rccOptionDescriptionGetOption(rcc_option_description *desc);
+const char *rccOptionDescriptionGetValueName(rcc_option_description *desc, rcc_option_value value);
+rcc_option_value rccOptionDescriptionGetValueByName(rcc_option_description *desc, const char *name);
#endif /* _RCC_OPT_H */