switch_loadable_module.h File Reference

Loadable Module Routines. More...

#include <switch_log.h>
#include <switch.h>
#include <switch_module_interfaces.h>

Include dependency graph for switch_loadable_module.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  switch_loadable_module_interface
 The abstraction of a loadable module. More...

Defines

#define SWITCH_ADD_API(api_int, int_name, descript, funcptr, syntax_string)
#define SWITCH_ADD_CHAT(chat_int, int_name, funcptr)
#define SWITCH_ADD_APP(app_int, int_name, short_descript, long_descript, funcptr, syntax_string, app_flags)
#define SWITCH_ADD_CHAT_APP(app_int, int_name, short_descript, long_descript, funcptr, syntax_string, app_flags)
#define SWITCH_ADD_DIALPLAN(dp_int, int_name, funcptr)
#define SWITCH_ADD_LIMIT(limit_int, int_name, incrptr, releaseptr, usageptr, resetptr, statusptr, interval_resetptr)
#define SWITCH_ADD_CODEC(codec_int, int_name)
#define SWITCH_DECLARE_STATIC_MODULE(init, load, run, shut)

Functions

switch_status_t switch_loadable_module_init (switch_bool_t autoload)
 Initilize the module backend and load all the modules.
void switch_loadable_module_shutdown (void)
 Shutdown the module backend and call the shutdown routine in all loaded modules.
switch_endpoint_interface_tswitch_loadable_module_get_endpoint_interface (const char *name)
 Retrieve the endpoint interface by it's registered name.
switch_codec_interface_tswitch_loadable_module_get_codec_interface (const char *name)
 Retrieve the codec interface by it's registered name.
char * switch_parse_codec_buf (char *buf, uint32_t *interval, uint32_t *rate, uint32_t *bit)
switch_dialplan_interface_tswitch_loadable_module_get_dialplan_interface (const char *name)
 Retrieve the dialplan interface by it's registered name.
switch_status_t switch_loadable_module_enumerate_available (const char *dir_path, switch_modulename_callback_func_t callback, void *user_data)
 Enumerates a list of all modules discovered in a directory.
switch_status_t switch_loadable_module_enumerate_loaded (switch_modulename_callback_func_t callback, void *user_data)
 Enumerates a list of all currently loaded modules.
switch_status_t switch_loadable_module_build_dynamic (char *filename, switch_module_load_t switch_module_load, switch_module_runtime_t switch_module_runtime, switch_module_shutdown_t switch_module_shutdown, switch_bool_t runtime)
 build a dynamic module object and register it (for use in double embeded modules)
switch_timer_interface_tswitch_loadable_module_get_timer_interface (const char *name)
 Retrieve the timer interface by it's registered name.
switch_application_interface_tswitch_loadable_module_get_application_interface (const char *name)
 Retrieve the application interface by it's registered name.
switch_chat_application_interface_tswitch_loadable_module_get_chat_application_interface (const char *name)
 Retrieve the chat application interface by it's registered name.
switch_status_t switch_core_execute_chat_app (switch_event_t *message, const char *app, const char *data)
switch_api_interface_tswitch_loadable_module_get_api_interface (const char *name)
 Retrieve the API interface by it's registered name.
switch_file_interface_tswitch_loadable_module_get_file_interface (const char *name)
 Retrieve the file format interface by it's registered name.
switch_speech_interface_tswitch_loadable_module_get_speech_interface (const char *name)
 Retrieve the speech interface by it's registered name.
switch_asr_interface_tswitch_loadable_module_get_asr_interface (const char *name)
 Retrieve the asr interface by it's registered name.
switch_directory_interface_tswitch_loadable_module_get_directory_interface (const char *name)
 Retrieve the directory interface by it's registered name.
switch_chat_interface_tswitch_loadable_module_get_chat_interface (const char *name)
 Retrieve the chat interface by it's registered name.
switch_say_interface_tswitch_loadable_module_get_say_interface (const char *name)
 Retrieve the say interface by it's registered name.
switch_management_interface_tswitch_loadable_module_get_management_interface (const char *relative_oid)
 Retrieve the management interface by it's registered name.
switch_limit_interface_tswitch_loadable_module_get_limit_interface (const char *name)
 Retrieve the limit interface by it's registered name.
int switch_loadable_module_get_codecs (const switch_codec_implementation_t **array, int arraylen)
 Retrieve the list of loaded codecs into an array.
int switch_loadable_module_get_codecs_sorted (const switch_codec_implementation_t **array, int arraylen, char **prefs, int preflen)
 Retrieve the list of loaded codecs into an array based on another array showing the sorted order.
switch_status_t switch_api_execute (const char *cmd, const char *arg, switch_core_session_t *session, switch_stream_handle_t *stream)
 Execute a registered API command.
switch_status_t switch_loadable_module_load_module (char *dir, char *fname, switch_bool_t runtime, const char **err)
 Load a module.
switch_status_t switch_loadable_module_exists (const char *mod)
 Check if a module is loaded.
switch_status_t switch_loadable_module_unload_module (char *dir, char *fname, switch_bool_t force, const char **err)
 Unoad a module.
 SWITCH_MOD_DECLARE (switch_status_t) switch_module_load(switch_loadable_module_interface_t **module_interface
 Load a module.
uint32_t switch_core_codec_next_id (void)
static int switch_check_interval (uint32_t rate, uint32_t ptime)
static void switch_core_codec_add_implementation (switch_memory_pool_t *pool, switch_codec_interface_t *codec_interface, const switch_codec_type_t codec_type, switch_payload_t ianacode, const char *iananame, char *fmtp, uint32_t samples_per_second, uint32_t actual_samples_per_second, int bits_per_second, int microseconds_per_packet, uint32_t samples_per_packet, uint32_t decoded_bytes_per_packet, uint32_t encoded_bytes_per_packet, uint8_t number_of_channels, int codec_frames_per_packet, switch_core_codec_init_func_t init, switch_core_codec_encode_func_t encode, switch_core_codec_decode_func_t decode, switch_core_codec_destroy_func_t destroy)
static switch_bool_t switch_core_codec_ready (switch_codec_t *codec)

Variables

char * filename


Detailed Description

Loadable Module Routines.

This module is the gateway between external modules and the core of the application. it contains all the access points to the various pluggable interfaces including the codecs and API modules.

Definition in file switch_loadable_module.h.


Define Documentation

#define SWITCH_DECLARE_STATIC_MODULE ( init,
load,
run,
shut   ) 

Value:

void init(void) { \
                switch_loadable_module_build_dynamic(__FILE__, load, run, shut, SWITCH_FALSE); \
        }

Definition at line 501 of file switch_loadable_module.h.


Function Documentation

static switch_bool_t switch_core_codec_ready ( switch_codec_t codec  )  [inline, static]

Definition at line 506 of file switch_loadable_module.h.

References switch_codec::codec_interface, switch_codec::flags, switch_codec::implementation, switch_codec::mutex, SWITCH_CODEC_FLAG_READY, SWITCH_FALSE, and SWITCH_TRUE.

Referenced by early_thread_run(), switch_core_codec_decode(), switch_core_codec_destroy(), switch_core_codec_encode(), switch_core_media_bug_prune(), switch_core_media_bug_remove(), switch_core_media_bug_remove_all_function(), switch_core_media_bug_remove_callback(), switch_core_session_outgoing_channel(), switch_core_session_read_frame(), switch_core_session_set_read_codec(), switch_core_session_set_real_read_codec(), switch_core_session_set_video_read_codec(), switch_core_session_set_video_write_codec(), switch_core_session_set_write_codec(), switch_core_session_write_frame(), switch_ivr_deactivate_unicast(), switch_ivr_play_file(), and switch_ivr_wait_for_answer().

00507 {
00508         return (codec && (codec->flags & SWITCH_CODEC_FLAG_READY) && codec->mutex && codec->codec_interface && codec->implementation) ? SWITCH_TRUE : SWITCH_FALSE;
00509 }


Generated on Sun May 20 04:00:12 2012 for FreeSWITCH API Documentation by  doxygen 1.4.7