tweak loadable module code to allow registration for langauges that can in turn fully implement modules of thier own (e.g. mono)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1244 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-04-25 00:33:00 +00:00
parent cfdc15bc67
commit a3d0b78ea0
3 changed files with 202 additions and 130 deletions
+21
View File
@@ -109,6 +109,27 @@ SWITCH_DECLARE(switch_codec_interface *) switch_loadable_module_get_codec_interf
*/
SWITCH_DECLARE(switch_dialplan_interface *) switch_loadable_module_get_dialplan_interface(char *name);
/*!
\brief build a dynamic module object and register it (for use in double embeded modules)
\param filename the name of the modules source file
\param switch_module_load the function to call when the module is loaded
\param switch_module_runtime a function requested to be started in it's own thread once loaded
\param switch_module_shutdown the function to call when the system is shutdown
\return the resulting status
\note only use this function if you are making a module that in turn gateways module loading to another technology
*/
SWITCH_DECLARE(switch_status) 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);
/*!
\brief Retrieve the dialplan interface by it's registered name
\param name the name of the dialplan
\return the desired dialplan interface
*/
SWITCH_DECLARE(switch_status) switch_loadable_module_load_dynamic(switch_loadable_module *new_module);
/*!
\brief Retrieve the timer interface by it's registered name
\param name the name of the timer
+8
View File
@@ -649,6 +649,14 @@ typedef switch_status (*switch_send_dtmf_hook)(switch_core_session *, char *);
typedef switch_status (*switch_api_function)(char *in, char *out, switch_size_t outlen);
typedef switch_status (*switch_dtmf_callback_function)(switch_core_session *session, char *dtmf, void *buf, unsigned int buflen);
typedef int (*switch_core_db_callback_func)(void *pArg, int argc, char **argv, char **columnNames);
typedef switch_status (*switch_module_load_t) (switch_loadable_module_interface **, char *);
typedef switch_status (*switch_module_reload_t) (void);
typedef switch_status (*switch_module_pause_t) (void);
typedef switch_status (*switch_module_resume_t) (void);
typedef switch_status (*switch_module_status_t) (void);
typedef switch_status (*switch_module_runtime_t) (void);
typedef switch_status (*switch_module_shutdown_t) (void);
/* things we don't deserve to know about */