summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2016-06-22 15:22:44 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-06-22 15:22:44 -0500
commit43612a84c828737a53cbc33dec135f881df95125 (patch)
treef6b67dad46b943bda92c002dd324da8eebe33055 /include
parent08a4699367cfad68c8ccefe28001ee1b8bef67da (diff)
parent1b79e2deff58dbf3f98791da1715aa4a696b028c (diff)
Merge "Fix Alembic upgrades." into 13
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/config_options.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/asterisk/config_options.h b/include/asterisk/config_options.h
index 30c042176..30d0c9142 100644
--- a/include/asterisk/config_options.h
+++ b/include/asterisk/config_options.h
@@ -445,6 +445,28 @@ 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