#ifndef NOTMUCH_OPTS_H #define NOTMUCH_OPTS_H #include "notmuch.h" enum notmuch_opt_type { NOTMUCH_OPT_NULL = 0, NOTMUCH_OPT_BOOLEAN, NOTMUCH_OPT_INT, NOTMUCH_OPT_KEYWORD, NOTMUCH_OPT_STRING, NOTMUCH_OPT_POSITION }; typedef struct notmuch_keyword { const char *name; int value; } notmuch_keyword_t; typedef struct notmuch_opt_desc { const char *name; int arg_id; enum notmuch_opt_type opt_type; struct notmuch_keyword *keywords; void *output_var; } notmuch_opt_desc_t; notmuch_bool_t parse_option (const char *arg, const notmuch_opt_desc_t* options); notmuch_bool_t parse_position_arg (const char *arg, int position_arg_index, const notmuch_opt_desc_t* options); int parse_arguments(int argc, char **argv, const notmuch_opt_desc_t *options, int opt_index); #endif