diff options
author | Matthew Jordan <mjordan@digium.com> | 2013-08-23 15:21:40 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2013-08-23 15:21:40 +0000 |
commit | e31bd332b83f0245ce8bd6626279e1b9c683ec18 (patch) | |
tree | f6ce4f0257399a167527b6dd02fda9339d323214 /res/res_pjsip | |
parent | b2a13e83dcb4958cccd5d314a1bb8bf25379cb51 (diff) |
Update config framework/sorcery with types/options without documentation
There are times when a configuration option should not have documentation.
1. Some options are registered with a particular object merely as a warning to
users. These options aren't even really 'deprecated' - which has its own
separate API call - they are actually provided by a different configuration
file. The options are merely registered so that the user gets a warning that
a different configuration file provides the item.
2. Some object types - most notably some used by modules that use sorcery - are
completely internal and should never be shown to the user.
3. Sorcery itself has several 'hidden' fields that should never be shown to a
user.
This patch updates the configuration framework and sorcery with additional API
calls that allow a module to register types as internal and options as not
requiring documentation. This bypasses the XML documentation checking.
This patch also re-enables the strict XML documentation checking in trunk, as
well as updates some documentation that was missing.
Review: https://reviewboard.asterisk.org/r/2785/
(closes issue ASTERISK-22359)
Reported by: Matt Jordan
(closes issue ASTERISK-22112)
Reported by: Rusty Newton
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip')
-rw-r--r-- | res/res_pjsip/pjsip_configuration.c | 3 | ||||
-rw-r--r-- | res/res_pjsip/pjsip_options.c | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c index 527df5da3..b6926391e 100644 --- a/res/res_pjsip/pjsip_configuration.c +++ b/res/res_pjsip/pjsip_configuration.c @@ -628,7 +628,7 @@ int ast_res_pjsip_initialize_configuration(void) return -1; } - ast_sorcery_object_register(sip_sorcery, "nat_hook", sip_nat_hook_alloc, NULL, NULL); + ast_sorcery_internal_object_register(sip_sorcery, "nat_hook", sip_nat_hook_alloc, NULL, NULL); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "type", "", OPT_NOOP_T, 0, 0); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "context", "default", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, context)); @@ -696,7 +696,6 @@ int ast_res_pjsip_initialize_configuration(void) ast_sorcery_object_field_register(sip_sorcery, "endpoint", "cos_video", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, media.cos_video)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "allowsubscribe", "yes", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, subscription.allow)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "subminexpiry", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, subscription.minexpiry)); - ast_sorcery_object_field_register(sip_sorcery, "endpoint", "subminexpirey", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, subscription.minexpiry)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "fromuser", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, fromuser)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "fromdomain", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, fromdomain)); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "mwifromuser", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, subscription.mwi.fromuser)); diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c index ce0eeb2b7..e5f062db0 100644 --- a/res/res_pjsip/pjsip_options.c +++ b/res/res_pjsip/pjsip_options.c @@ -734,15 +734,15 @@ int ast_sip_initialize_sorcery_qualify(struct ast_sorcery *sorcery) /* initialize sorcery ast_sip_contact_status resource */ ast_sorcery_apply_default(sorcery, CONTACT_STATUS, "memory", NULL); - if (ast_sorcery_object_register(sorcery, CONTACT_STATUS, + if (ast_sorcery_internal_object_register(sorcery, CONTACT_STATUS, contact_status_alloc, NULL, NULL)) { ast_log(LOG_ERROR, "Unable to register ast_sip_contact_status in sorcery\n"); return -1; } - ast_sorcery_object_field_register(sorcery, CONTACT_STATUS, "rtt", "0", OPT_UINT_T, + ast_sorcery_object_field_register_nodoc(sorcery, CONTACT_STATUS, "rtt", "0", OPT_UINT_T, 1, FLDSET(struct ast_sip_contact_status, status)); - ast_sorcery_object_field_register(sorcery, CONTACT_STATUS, "rtt", "0", OPT_UINT_T, + ast_sorcery_object_field_register_nodoc(sorcery, CONTACT_STATUS, "rtt", "0", OPT_UINT_T, 1, FLDSET(struct ast_sip_contact_status, rtt)); return 0; |