diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2020-10-23 16:40:57 +0700 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2020-10-23 20:20:23 +0700 |
commit | 4165d048f381bc2255e635899ef6454f41623261 (patch) | |
tree | 6d60257c7c5cd38dc006455051efe64b7d88e358 /include/osmocom/vty | |
parent | efe1342b62d21ec8a5fdf64e9affc80a5836283e (diff) |
vty/command: introduce vty_dump_xml_ref_mode()
This change introduces an enumerated type 'vty_ref_gen_mode' that
(as the name suggests) defines the VTY reference generation mode:
- DEFAULT - all commands except deprecated and hidden,
- EXPERT - all commands including hidden, excluding deprecated;
and a new function vty_dump_xml_ref_mode(), that allows to specify
that mode. The old vty_dump_xml_ref() is now deprecated.
Change-Id: Ie2022a7f9e167e5ceacf15350c037dd43768ff40
Related: SYS#4910
Diffstat (limited to 'include/osmocom/vty')
-rw-r--r-- | include/osmocom/vty/command.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h index 92701fcb..eb7ee35e 100644 --- a/include/osmocom/vty/command.h +++ b/include/osmocom/vty/command.h @@ -29,6 +29,7 @@ #include "vector.h" #include <osmocom/core/defs.h> +#include <osmocom/core/utils.h> /*! \defgroup command VTY Command * @{ @@ -460,6 +461,18 @@ void print_version(int print_copyright); extern void *tall_vty_cmd_ctx; -int vty_dump_xml_ref(FILE *stream); +/*! VTY reference generation mode. */ +enum vty_ref_gen_mode { + /*! Default mode: all commands except deprecated and hidden. */ + VTY_REF_GEN_MODE_DEFAULT = 0, + /*! Expert mode: all commands including hidden, excluding deprecated. */ + VTY_REF_GEN_MODE_EXPERT, +}; + +extern const struct value_string vty_ref_gen_mode_names[]; +extern const struct value_string vty_ref_gen_mode_desc[]; + +int vty_dump_xml_ref_mode(FILE *stream, enum vty_ref_gen_mode mode); +int vty_dump_xml_ref(FILE *stream) OSMO_DEPRECATED("Use vty_dump_xml_ref_mode() instead"); /*! @} */ |