summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-06-22 16:06:06 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-06-22 16:06:06 -0500
commit8b85b05092cb43ef7e0321fad6a8ea38a0ac0126 (patch)
tree9b0cd44d076e91827746c8afdfa1e3d1924f650d /include
parentdf6f69ceb616d5b95f208f21b9a31f48bcee2e7e (diff)
parentb6bd97eea2ddeba2b0ea2380da29fba98b8a3208 (diff)
Merge "Fix Alembic upgrades."
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/config_options.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/asterisk/config_options.h b/include/asterisk/config_options.h
index 30c042176..f2a457eb5 100644
--- a/include/asterisk/config_options.h
+++ b/include/asterisk/config_options.h
@@ -445,6 +445,29 @@ enum aco_option_type {
* {endcode}
*/
OPT_UINT_T,
+
+ /*! \brief Type for default option handler for bools (ast_true/ast_false)
+ * \note aco_option_register flags:
+ * non-zero : process via ast_true
+ * 0 : process via ast_false
+ * aco_option_register varargs:
+ * FLDSET macro with the field of type int. It is important to note that the field
+ * cannot be a bitfield. If bitfields are required, they must be set via a custom handler.
+ *
+ * This is exactly the same as OPT_BOOL_T. The only difference is that when
+ * translated to a string, OPT_BOOL_T becomes "true" or "false"; OPT_YESNO_T becomes
+ * "yes" or "no".
+ *
+ * Example:
+ * {code}
+ * struct test_item {
+ * int enabled;
+ * };
+ * aco_option_register(&cfg_info, "enabled", ACO_EXACT, my_types, "no", OPT_YESNO_T, 1, FLDSET(struct test_item, enabled));
+ * {endcode}
+ */
+ OPT_YESNO_T,
+
};
/*! \brief A callback function for handling a particular option