diff options
author | Matthew Jordan <mjordan@digium.com> | 2013-02-15 13:38:12 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2013-02-15 13:38:12 +0000 |
commit | d04ab3c6450f3d92aa004ae9d6e0e7da51f702a3 (patch) | |
tree | 821330ff71a4484afa46ade4a2bbd211c800a992 /include/asterisk/config_options.h | |
parent | edf0483f4f0e73ded128f1e613b60f31925af102 (diff) |
Add CLI configuration documentation
This patch allows a module to define its configuration in XML in source, such
that it can be parsed by the XML documentation engine. Documentation is
generated in a two-pass approach:
1. The documentation is first generated from the XML pulled from the source
2. The documentation is then enhanced by the registration of configuration
options that use the configuration framework
This patch include configuration documentation for the following modules:
* chan_motif
* res_xmpp
* app_confbridge
* app_skel
* udptl
Two new CLI commands have been added:
* config show help - show configuration help by module, category, and item
* xmldoc dump - dump the in-memory representation of the XML documentation to
a new XML file.
Review: https://reviewboard.asterisk.org/r/2278
Review: https://reviewboard.asterisk.org/r/2058
patches:
on review 2058 uploaded by twilson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/config_options.h')
-rw-r--r-- | include/asterisk/config_options.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asterisk/config_options.h b/include/asterisk/config_options.h index 1b0beb206..64d8d5089 100644 --- a/include/asterisk/config_options.h +++ b/include/asterisk/config_options.h @@ -109,6 +109,7 @@ typedef int (*aco_matchvalue_func)(const char *text); struct aco_type { /* common stuff */ enum aco_type_t type; /*!< Whether this is a global or item type */ + const char *name; /*!< The name of this type (must match XML documentation) */ const char *category; /*!< A regular expression for matching categories to be allowed or denied */ const char *matchfield; /*!< An option name to match for this type (i.e. a 'type'-like column) */ const char *matchvalue; /*!< The value of the option to require for matching (i.e. 'peer' for type= in sip.conf) */ @@ -202,6 +203,14 @@ static struct aco_info name = { \ __VA_ARGS__ \ }; +#define CONFIG_INFO_CORE(mod, name, arr, alloc, ...) \ +static struct aco_info name = { \ + .module = mod, \ + .global_obj = &arr, \ + .snapshot_alloc = alloc, \ + __VA_ARGS__ \ +}; + /*! \brief Initialize an aco_info structure * \note aco_info_destroy must be called if this succeeds * \param info The address of an aco_info struct to initialize |