mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-29 22:54:18 +00:00
move some modules to use the new module interface macros.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5344 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
b67f9c5b2a
commit
784c7f8c3d
10 files changed
+53
-43
No files matched your search
@@ -31,9 +31,8 @@
|
||||
*/
|
||||
#include <switch.h>
|
||||
|
||||
|
||||
static const char modname[] = "mod_ivrtest";
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_ivrtest_load);
|
||||
SWITCH_MODULE_DEFINITION(mod_ivrtest, mod_ivrtest_load, NULL, NULL);
|
||||
|
||||
/*
|
||||
dtmf handler function you can hook up to be executed when a digit is dialed during playback
|
||||
@@ -499,7 +498,7 @@ static const switch_application_interface_t asrtest_application_interface = {
|
||||
/*.next */ &ivrtest_application_interface
|
||||
};
|
||||
|
||||
static const switch_loadable_module_interface_t mod_ivrtest_module_interface = {
|
||||
static const switch_loadable_module_interface_t ivrtest_module_interface = {
|
||||
/*.module_name = */ modname,
|
||||
/*.endpoint_interface = */ NULL,
|
||||
/*.timer_interface = */ NULL,
|
||||
@@ -508,11 +507,11 @@ static const switch_loadable_module_interface_t mod_ivrtest_module_interface = {
|
||||
/*.application_interface */ &asrtest_application_interface
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_ivrtest_load)
|
||||
{
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*module_interface = &mod_ivrtest_module_interface;
|
||||
*module_interface = &ivrtest_module_interface;
|
||||
|
||||
/* test global state handlers */
|
||||
switch_core_add_state_handler(&state_handlers);
|
||||
@@ -521,12 +520,6 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* 'switch_module_runtime' will start up in a thread by itself just by having it exist
|
||||
if it returns anything but SWITCH_STATUS_TERM it will be called again automaticly
|
||||
*/
|
||||
|
||||
|
||||
//switch_status_t switch_module_runtime(void)
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
|
||||
@@ -32,7 +32,11 @@
|
||||
*/
|
||||
#include <switch.h>
|
||||
|
||||
static const char modname[] = "mod_skel";
|
||||
//SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_skel_shutdown);
|
||||
//SWITCH_MODULE_RUNTIME_FUNCTION(mod_skel_runtime);
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_skel_load);
|
||||
SWITCH_MODULE_DEFINITION(mod_skel, mod_skel_load, NULL, NULL);
|
||||
|
||||
static switch_loadable_module_interface_t skel_module_interface = {
|
||||
/*.module_name */ modname,
|
||||
@@ -47,7 +51,7 @@ static switch_loadable_module_interface_t skel_module_interface = {
|
||||
/*.directory_interface */ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_skel_load)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*module_interface = &skel_module_interface;
|
||||
@@ -60,7 +64,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
|
||||
|
||||
/*
|
||||
Called when the system shuts down
|
||||
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
|
||||
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_skel_shutdown);
|
||||
{
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -69,7 +73,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
|
||||
/*
|
||||
If it exists, this is called in it's own thread when the module-load completes
|
||||
If it returns anything but SWITCH_STATUS_TERM it will be called again automaticly
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
|
||||
SWITCH_MODULE_RUNTIME_FUNCTION(mod_skel_runtime);
|
||||
{
|
||||
while(looping)
|
||||
{
|
||||
|
||||
@@ -35,12 +35,12 @@
|
||||
using namespace soundtouch;
|
||||
using namespace std;
|
||||
|
||||
|
||||
#include <switch.h>
|
||||
#define STSTART 1024 * 2
|
||||
#define STBLOCK 1024
|
||||
|
||||
static const char modname[] = "mod_soundtouch";
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_soundtouch_load);
|
||||
SWITCH_MODULE_DEFINITION(mod_soundtouch, mod_soundtouch_load, NULL, NULL);
|
||||
|
||||
struct soundtouch_helper {
|
||||
SoundTouch *st;
|
||||
@@ -331,7 +331,7 @@ static switch_loadable_module_interface_t soundtouch_module_interface = {
|
||||
};
|
||||
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_soundtouch_load)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*module_interface = &soundtouch_module_interface;
|
||||
|
||||
Reference in new issue
Block a user