Jeff Hostetler | bce9db6 | 2019-04-15 13:39:47 -0700 | [diff] [blame] | 1 | #ifndef TR2_SYSENV_H |
| 2 | #define TR2_SYSENV_H |
| 3 | |
| 4 | /* |
| 5 | * The Trace2 settings that can be loaded from /etc/gitconfig |
| 6 | * and/or user environment variables. |
| 7 | * |
| 8 | * Note that this set does not contain any of the transient |
| 9 | * environment variables used to pass information from parent |
SZEDER Gábor | e4b75d6 | 2019-05-19 16:43:08 +0200 | [diff] [blame] | 10 | * to child git processes, such "GIT_TRACE2_PARENT_SID". |
Jeff Hostetler | bce9db6 | 2019-04-15 13:39:47 -0700 | [diff] [blame] | 11 | */ |
| 12 | enum tr2_sysenv_variable { |
| 13 | TR2_SYSENV_CFG_PARAM = 0, |
Josh Steadmon | 3d3adaa | 2020-03-20 14:06:15 -0700 | [diff] [blame] | 14 | TR2_SYSENV_ENV_VARS, |
Jeff Hostetler | bce9db6 | 2019-04-15 13:39:47 -0700 | [diff] [blame] | 15 | |
| 16 | TR2_SYSENV_DST_DEBUG, |
| 17 | |
| 18 | TR2_SYSENV_NORMAL, |
| 19 | TR2_SYSENV_NORMAL_BRIEF, |
| 20 | |
| 21 | TR2_SYSENV_EVENT, |
| 22 | TR2_SYSENV_EVENT_BRIEF, |
| 23 | TR2_SYSENV_EVENT_NESTING, |
| 24 | |
| 25 | TR2_SYSENV_PERF, |
| 26 | TR2_SYSENV_PERF_BRIEF, |
| 27 | |
Josh Steadmon | 83e57b0 | 2019-10-04 15:08:20 -0700 | [diff] [blame] | 28 | TR2_SYSENV_MAX_FILES, |
| 29 | |
Jeff Hostetler | bce9db6 | 2019-04-15 13:39:47 -0700 | [diff] [blame] | 30 | TR2_SYSENV_MUST_BE_LAST |
| 31 | }; |
| 32 | |
| 33 | void tr2_sysenv_load(void); |
| 34 | |
| 35 | const char *tr2_sysenv_get(enum tr2_sysenv_variable); |
| 36 | const char *tr2_sysenv_display_name(enum tr2_sysenv_variable var); |
| 37 | void tr2_sysenv_release(void); |
| 38 | |
| 39 | #endif /* TR2_SYSENV_H */ |