This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Defines | |
#define | ASTERISK_GPL_KEY "This paragraph is Copyright (C) 2000, Linux Support Services, Inc. \In order for your module to load, it must return this key via a function \called \"key\". Any code which includes this paragraph must be licensed under \the GNU General Public License version 2 or later (at your option). Linux \Support Services, Inc. reserves the right to allow other parties to license \this paragraph under other terms as well." |
#define | AST_MODULE_CONFIG "modules.conf" /*! Module configuration file */ |
#define | AST_FORCE_SOFT 0 |
#define | AST_FORCE_FIRM 1 |
#define | AST_FORCE_HARD 2 |
#define | STANDARD_LOCAL_USER |
#define | LOCAL_USER_DECL |
#define | LOCAL_USER_ADD(u) |
#define | LOCAL_USER_REMOVE(u) |
#define | STANDARD_HANGUP_LOCALUSERS |
#define | STANDARD_USECOUNT(res) |
Functions | |
int | load_module (void) |
Initialize the module. | |
int | unload_module (void) |
Cleanup all module structures, sockets, etc. | |
int | usecount (void) |
Provides a usecount. | |
char * | description (void) |
Description. | |
char * | key (void) |
Returns the ASTERISK_GPL_KEY. | |
int | reload (void) |
Reload stuff. | |
int | ast_load_resource (char *resource_name) |
Loads a module. | |
int | ast_unload_resource (char *resource_name, int force) |
Unloads a module. | |
void | ast_update_use_count (void) |
Notify when usecount has been changed. | |
int | ast_update_module_list (int(*modentry)(char *module, char *description, int usecnt)) |
Ask for a list of modules, descriptions, and use counts. | |
int | ast_loader_register (int(*updater)(void)) |
Ask this procedure to be run with modules have been updated. | |
int | ast_loader_unregister (int(*updater)(void)) |
No longer run me when modules are updated. | |
void | ast_module_reload (void) |
Reload all modules. | |
int | ast_register_atexit (void(*func)(void)) |
void | ast_unregister_atexit (void(*func)(void)) |
|
Definition at line 80 of file module.h. Referenced by ast_unload_resource(). |
|
|
|
|
|
Definition at line 77 of file module.h. Referenced by ast_load_resource(), and load_modules(). |
|
reload configs |
|
|
|
Value:
|
|
|
|
|
|
Value: |
|
Value:
|
|
Loads a module.
Definition at line 178 of file loader.c. References ast_config_AST_MODULE_DIR, ast_destroy(), ast_load(), ast_log(), AST_MODULE_CONFIG, ast_mutex_lock, ast_mutex_unlock, ast_true(), ast_unload_resource(), ast_update_use_count(), ast_variable_retrieve(), ast_verbose(), COLOR_BLACK, COLOR_BROWN, dlclose(), dlerror(), dlopen(), dlsym(), free, fully_booted, key(), LOG_WARNING, malloc, module::next, option_console, option_verbose, RTLD_GLOBAL, RTLD_LAZY, RTLD_NOW, term_color(), and VERBOSE_PREFIX_1. Referenced by load_modules().
|
|
Ask this procedure to be run with modules have been updated.
Definition at line 471 of file loader.c. References ast_log(), ast_mutex_lock, ast_mutex_unlock, LOG_WARNING, and malloc.
|
|
No longer run me when modules are updated.
Definition at line 487 of file loader.c. References ast_log(), ast_mutex_lock, ast_mutex_unlock, and LOG_WARNING.
|
|
Reload all modules. This reloads all modules set to load in asterisk. It does NOT run the unload routine and then loads them again, it runs the given reload routine. Definition at line 149 of file loader.c. References ast_enum_reload(), ast_lastreloadtime, ast_mutex_lock, ast_mutex_trylock, ast_mutex_unlock, ast_rtp_reload(), ast_verbose(), option_verbose, reload_manager(), and VERBOSE_PREFIX_3.
|
|
Definition at line 121 of file asterisk.c. References ast_mutex_lock, ast_mutex_unlock, ast_unregister_atexit(), and malloc.
|
|
Unloads a module.
Definition at line 106 of file loader.c. References AST_FORCE_FIRM, ast_log(), ast_mutex_lock, ast_mutex_unlock, ast_update_use_count(), dlclose(), free, LOG_WARNING, and module::next. Referenced by ast_load_resource().
|
|
Definition at line 139 of file asterisk.c. References ast_mutex_lock, and ast_mutex_unlock. Referenced by ast_register_atexit().
|
|
Ask for a list of modules, descriptions, and use counts.
Definition at line 455 of file loader.c. References ast_mutex_trylock, ast_mutex_unlock, and module::next.
|
|
Notify when usecount has been changed. This function goes through and calulates use counts. It also notifies anybody trying to keep track of them. Definition at line 439 of file loader.c. References ast_log(), ast_mutex_lock, ast_mutex_unlock, and LOG_WARNING. Referenced by ast_load_resource(), and ast_unload_resource().
|
|
Description. Returns a short description of your module. Referenced by ast_channel_register(), ast_channel_register_ex(), ast_manager_register2(), ast_register_application(), and load_pbx(). |
|
Returns the ASTERISK_GPL_KEY. This returns the ASTERISK_GPL_KEY, signifiying that you agree to the terms of the GPL stated in the ASTERISK_GPL_KEY. Your module will not load if it does not return the EXACT message, i.e. char *key(void){return ASTERISK_GPL_KEY;} Referenced by ast_db_del(), ast_db_deltree(), ast_db_get(), ast_db_gettree(), ast_db_put(), ast_load_resource(), ast_privacy_check(), and ast_privacy_set(). |
|
Initialize the module. This function is called at module load time. Put all code in here that needs to set up your module's hardware, software, registrations, etc. |
|
Reload stuff. This function is where any reload routines take place. Re-read config files, change signalling, whatever is appropriate on a reload. Return 0 on success, and other than 0 on problem. |
|
Cleanup all module structures, sockets, etc. This is called at exit. Any registrations and memory allocations need to be unregistered and free'd here. Nothing else will do these for you (until exit). Return 0 on success, or other than 0 if there is a problem. |
|
Provides a usecount. This function will be called by various parts of asterisk. Basically, all it has to do is to return a usecount when called. You will need to maintain your usecount within the module somewhere. |