Usage of the SAForum AIS (Application Interface Specification) More...
#include <saAis.h>#include <saClm.h>#include <saEvt.h>

Go to the source code of this file.
Functions | |
| const char * | ais_err2str (SaAisErrorT error) |
| int | ast_ais_clm_load_module (void) |
| int | ast_ais_clm_unload_module (void) |
| int | ast_ais_evt_load_module (void) |
| int | ast_ais_evt_unload_module (void) |
Variables | |
| SaVersionT | ais_version |
| SaClmHandleT | clm_handle |
| SaEvtHandleT | evt_handle |
Usage of the SAForum AIS (Application Interface Specification)
Definition in file ais.h.
| const char* ais_err2str | ( | SaAisErrorT | error | ) |
Definition at line 103 of file res_ais.c.
References ais_errors, ARRAY_LEN, and ais_error::desc.
Referenced by add_subscribe_event(), ast_ais_clm_load_module(), ast_ais_clm_unload_module(), ast_ais_evt_load_module(), ast_ais_evt_unload_module(), ast_event_cb(), build_event_channel(), event_channel_destroy(), evt_event_deliver_cb(), and subscribe_event_destroy().
{
int x;
for (x = 0; x < ARRAY_LEN(ais_errors); x++) {
if (ais_errors[x].error == error)
return ais_errors[x].desc;
}
return "Unknown";
}
| int ast_ais_clm_load_module | ( | void | ) |
Definition at line 136 of file clm.c.
References ais_err2str(), ais_version, ARRAY_LEN, ast_cli_register_multiple(), ast_log(), clm_callbacks, clm_handle, clm_init_res, and LOG_ERROR.
Referenced by load_module().
{
clm_init_res = saClmInitialize(&clm_handle, &clm_callbacks, &ais_version);
if (clm_init_res != SA_AIS_OK) {
ast_log(LOG_ERROR, "Could not initialize cluster membership service: %s\n",
ais_err2str(clm_init_res));
return -1;
}
ast_cli_register_multiple(ais_cli, ARRAY_LEN(ais_cli));
return 0;
}
| int ast_ais_clm_unload_module | ( | void | ) |
Definition at line 150 of file clm.c.
References ais_err2str(), ARRAY_LEN, ast_cli_unregister_multiple(), ast_log(), clm_handle, clm_init_res, and LOG_ERROR.
Referenced by load_module(), and unload_module().
{
SaAisErrorT ais_res;
if (clm_init_res != SA_AIS_OK) {
return 0;
}
ast_cli_unregister_multiple(ais_cli, ARRAY_LEN(ais_cli));
ais_res = saClmFinalize(clm_handle);
if (ais_res != SA_AIS_OK) {
ast_log(LOG_ERROR, "Problem stopping cluster membership service: %s\n",
ais_err2str(ais_res));
return -1;
}
return 0;
}
| int ast_ais_evt_load_module | ( | void | ) |
Definition at line 549 of file evt.c.
References ais_err2str(), ais_version, ARRAY_LEN, ast_cli_register_multiple(), ast_log(), evt_callbacks, evt_handle, evt_init_res, load_config(), and LOG_ERROR.
Referenced by load_module().
{
evt_init_res = saEvtInitialize(&evt_handle, &evt_callbacks, &ais_version);
if (evt_init_res != SA_AIS_OK) {
ast_log(LOG_ERROR, "Could not initialize eventing service: %s\n",
ais_err2str(evt_init_res));
return -1;
}
load_config();
ast_cli_register_multiple(ais_cli, ARRAY_LEN(ais_cli));
return 0;
}
| int ast_ais_evt_unload_module | ( | void | ) |
Definition at line 565 of file evt.c.
References ais_err2str(), ast_log(), destroy_event_channels(), evt_handle, evt_init_res, and LOG_ERROR.
Referenced by load_module(), and unload_module().
{
SaAisErrorT ais_res;
if (evt_init_res != SA_AIS_OK) {
return 0;
}
destroy_event_channels();
ais_res = saEvtFinalize(evt_handle);
if (ais_res != SA_AIS_OK) {
ast_log(LOG_ERROR, "Problem stopping eventing service: %s\n",
ais_err2str(ais_res));
return -1;
}
return 0;
}
| SaVersionT ais_version |
Definition at line 68 of file res_ais.c.
Referenced by ast_ais_clm_load_module(), and ast_ais_evt_load_module().
| SaClmHandleT clm_handle |
Definition at line 48 of file clm.c.
Referenced by ais_clm_show_members(), ast_ais_clm_load_module(), ast_ais_clm_unload_module(), ast_event_cb(), and dispatch_thread_handler().
| SaEvtHandleT evt_handle |
Definition at line 57 of file evt.c.
Referenced by ast_ais_evt_load_module(), ast_ais_evt_unload_module(), build_event_channel(), and dispatch_thread_handler().