c5d77517 |
1 | #ifndef OPTION_H |
2 | #define OPTION_H |
3 | |
4 | /* Options parsing mechanism */ |
5 | |
6 | /* Define a new command line option with a long name (--long_name), a short |
7 | one character name (-c), a descriptive text, the argument type, and a |
8 | pointer to where the argument value will be stored. For an option of |
9 | type LTTV_OPT_NONE, the argument is a boolean value set to true when the |
10 | option is present. */ |
11 | |
12 | /* Initial draft by Michel Dagenais May 2003 |
13 | * Reworked by Mathieu Desnoyers, May 2003 |
14 | */ |
15 | |
16 | typedef enum _lttv_option_type |
17 | {LTTV_OPT_NONE, LTTV_OPT_STRING, LTTV_OPT_INT, LTTV_OPT_LONG } |
18 | lttv_option_type; |
19 | |
20 | typedef void (*lttv_option_hook)(void *hook_data); |
21 | |
22 | void lttv_option_add(char *long_name, char char_name, char *description, |
23 | char *argDescription, lttv_option_type t, void *p, |
24 | lttv_option_hook h, void *hook_data); |
25 | |
26 | |
27 | |
28 | #endif // OPTION_H |