Sun Oct 16 2011 08:41:49

Asterisk developer's documentation


ais.h File Reference

Usage of the SAForum AIS (Application Interface Specification) More...

#include <saAis.h>
#include <saClm.h>
#include <saEvt.h>
Include dependency graph for ais.h:
This graph shows which files directly or indirectly include this file:

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

Detailed Description

Usage of the SAForum AIS (Application Interface Specification)

Author:
Russell Bryant <russell@digium.com>

Definition in file ais.h.


Function Documentation

const char* ais_err2str ( SaAisErrorT  error)
int ast_ais_clm_load_module ( void  )

Definition at line 136 of file clm.c.

References clm_init_res, clm_handle, clm_callbacks, ais_version, ast_log(), LOG_ERROR, ais_err2str(), ast_cli_register_multiple(), and ARRAY_LEN.

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 clm_init_res, ast_cli_unregister_multiple(), ARRAY_LEN, clm_handle, ast_log(), LOG_ERROR, and ais_err2str().

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 542 of file evt.c.

References evt_init_res, evt_handle, evt_callbacks, ais_version, ast_log(), LOG_ERROR, ais_err2str(), load_config(), ast_cli_register_multiple(), and ARRAY_LEN.

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 558 of file evt.c.

References evt_init_res, destroy_event_channels(), evt_handle, ast_log(), LOG_ERROR, and ais_err2str().

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;
}

Variable Documentation

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().