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

@@ -61,7 +61,6 @@
#include "asterisk/app.h"
#include "asterisk/strings.h"
#include "asterisk/threadstorage.h"
#include "asterisk/data.h"
struct odbc_class
{
@@ -119,15 +118,6 @@ struct odbc_txn_frame {
char name[0]; /*!< Name of this transaction ID */
};
#define DATA_EXPORT_ODBC_CLASS(MEMBER) \
MEMBER(odbc_class, name, AST_DATA_STRING) \
MEMBER(odbc_class, dsn, AST_DATA_STRING) \
MEMBER(odbc_class, username, AST_DATA_STRING) \
MEMBER(odbc_class, password, AST_DATA_PASSWORD) \
MEMBER(odbc_class, forcecommit, AST_DATA_BOOLEAN)
AST_DATA_STRUCTURE(odbc_class, DATA_EXPORT_ODBC_CLASS);
const char *ast_odbc_isolation2text(int iso)
{
if (iso == SQL_TXN_READ_COMMITTED) {
@@ -971,65 +961,6 @@ static odbc_status odbc_obj_connect(struct odbc_obj *obj)
return ODBC_SUCCESS;
}
/*!
* \internal
* \brief Implements the channels provider.
*/
static int data_odbc_provider_handler(const struct ast_data_search *search,
struct ast_data *root)
{
struct ao2_iterator aoi;
struct odbc_class *class;
struct ast_data *data_odbc_class, *data_odbc_connections;
struct ast_data *enum_node;
aoi = ao2_iterator_init(class_container, 0);
while ((class = ao2_iterator_next(&aoi))) {
data_odbc_class = ast_data_add_node(root, "class");
if (!data_odbc_class) {
ao2_ref(class, -1);
continue;
}
ast_data_add_structure(odbc_class, data_odbc_class, class);
data_odbc_connections = ast_data_add_node(data_odbc_class, "connections");
if (!data_odbc_connections) {
ao2_ref(class, -1);
continue;
}
/* isolation */
enum_node = ast_data_add_node(data_odbc_class, "isolation");
if (!enum_node) {
ao2_ref(class, -1);
continue;
}
ast_data_add_int(enum_node, "value", class->isolation);
ast_data_add_str(enum_node, "text", ast_odbc_isolation2text(class->isolation));
ao2_ref(class, -1);
if (!ast_data_search_match(search, data_odbc_class)) {
ast_data_remove_node(root, data_odbc_class);
}
}
ao2_iterator_destroy(&aoi);
return 0;
}
/*!
* \internal
* \brief /asterisk/res/odbc/listprovider.
*/
static const struct ast_data_handler odbc_provider = {
.version = AST_DATA_HANDLER_VERSION,
.get = data_odbc_provider_handler
};
static const struct ast_data_entry odbc_providers[] = {
AST_DATA_ENTRY("/asterisk/res/odbc", &odbc_provider),
};
static int reload(void)
{
struct odbc_cache_tables *table;
@@ -1087,7 +1018,6 @@ static int load_module(void)
if (load_odbc_config() == -1)
return AST_MODULE_LOAD_DECLINE;
ast_cli_register_multiple(cli_odbc, ARRAY_LEN(cli_odbc));
ast_data_register_multiple(odbc_providers, ARRAY_LEN(odbc_providers));
ast_log(LOG_NOTICE, "res_odbc loaded.\n");
return 0;
}