core: Remove 'Data Retrieval API'

This API was not actively maintained, was not added to new modules
(such as res_pjsip), and there exist better alternatives to acquire the
same information, such as the ARI.

Change-Id: I4b2185a83aeb74798b4ad43ff8f89f971096aa83
This commit is contained in:
Sean Bright
2017-07-05 11:29:01 -04:00
parent b62a3f0a67
commit 325eeced6a
19 changed files with 10 additions and 6114 deletions

View File

@@ -8306,56 +8306,6 @@ static void presence_state_cb(void *unused, struct stasis_subscription *sub, str
ast_free(hint_app);
}
/*!
* \internal
* \brief Implements the hints data provider.
*/
static int hints_data_provider_get(const struct ast_data_search *search,
struct ast_data *data_root)
{
struct ast_data *data_hint;
struct ast_hint *hint;
int watchers;
struct ao2_iterator i;
if (ao2_container_count(hints) == 0) {
return 0;
}
i = ao2_iterator_init(hints, 0);
for (; (hint = ao2_iterator_next(&i)); ao2_ref(hint, -1)) {
watchers = ao2_container_count(hint->callbacks);
data_hint = ast_data_add_node(data_root, "hint");
if (!data_hint) {
continue;
}
ast_data_add_str(data_hint, "extension", ast_get_extension_name(hint->exten));
ast_data_add_str(data_hint, "context", ast_get_context_name(ast_get_extension_context(hint->exten)));
ast_data_add_str(data_hint, "application", ast_get_extension_app(hint->exten));
ast_data_add_str(data_hint, "state", ast_extension_state2str(hint->laststate));
ast_data_add_str(data_hint, "presence_state", ast_presence_state2str(hint->last_presence_state));
ast_data_add_str(data_hint, "presence_subtype", S_OR(hint->last_presence_subtype, ""));
ast_data_add_str(data_hint, "presence_subtype", S_OR(hint->last_presence_message, ""));
ast_data_add_int(data_hint, "watchers", watchers);
if (!ast_data_search_match(search, data_hint)) {
ast_data_remove_node(data_root, data_hint);
}
}
ao2_iterator_destroy(&i);
return 0;
}
static const struct ast_data_handler hints_data_provider = {
.version = AST_DATA_HANDLER_VERSION,
.get = hints_data_provider_get
};
static const struct ast_data_entry pbx_data_providers[] = {
AST_DATA_ENTRY("asterisk/core/hints", &hints_data_provider),
};
static int action_extensionstatelist(struct mansession *s, const struct message *m)
{
const char *action_id = astman_get_header(m, "ActionID");
@@ -8431,7 +8381,6 @@ static void unload_pbx(void)
ast_cli_unregister_multiple(pbx_cli, ARRAY_LEN(pbx_cli));
ast_custom_function_unregister(&exception_function);
ast_custom_function_unregister(&testtime_function);
ast_data_unregister(NULL);
}
int load_pbx(void)
@@ -8445,7 +8394,6 @@ int load_pbx(void)
ast_verb(2, "Registering builtin functions:\n");
ast_cli_register_multiple(pbx_cli, ARRAY_LEN(pbx_cli));
ast_data_register_multiple_core(pbx_data_providers, ARRAY_LEN(pbx_data_providers));
__ast_custom_function_register(&exception_function, NULL);
__ast_custom_function_register(&testtime_function, NULL);