Freeswitch-svn
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
June 2007
- 10 participants
- 249 discussions
20 Jun '07
Author: mikej
Date: Wed Jun 20 04:41:55 2007
New Revision: 5406
Modified:
freeswitch/trunk/Freeswitch.sln
freeswitch/trunk/src/include/switch_loadable_module.h
freeswitch/trunk/src/mod/codecs/mod_amr/mod_amr.c
freeswitch/trunk/src/mod/codecs/mod_g711/mod_g711.c
freeswitch/trunk/src/mod/codecs/mod_g722/mod_g722.c
freeswitch/trunk/src/mod/codecs/mod_g723_1/mod_g723_1.c
freeswitch/trunk/src/mod/codecs/mod_g726/mod_g726.c
freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c
freeswitch/trunk/src/mod/codecs/mod_gsm/mod_gsm.c
freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.c
freeswitch/trunk/src/mod/codecs/mod_ilbc/mod_ilbc.c
freeswitch/trunk/src/mod/codecs/mod_l16/mod_l16.c
freeswitch/trunk/src/mod/codecs/mod_speex/mod_speex.c
Log:
add more modules to new mod loader macros/api.
Modified: freeswitch/trunk/Freeswitch.sln
==============================================================================
--- freeswitch/trunk/Freeswitch.sln (original)
+++ freeswitch/trunk/Freeswitch.sln Wed Jun 20 04:41:55 2007
@@ -3,20 +3,20 @@
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchConsole", "w32\Console\FreeSwitchConsole.vcproj", "{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchCoreLib", "w32\Library\FreeSwitchCore.vcproj", "{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}"
ProjectSection(ProjectDependencies) = postProject
- {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
- {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
- {EEF031CB-FED8-451E-A471-91EC8D4F6750} = {EEF031CB-FED8-451E-A471-91EC8D4F6750}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
- {89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C}
- {8D04B550-D240-4A44-8A18-35DA3F7038D9} = {8D04B550-D240-4A44-8A18-35DA3F7038D9}
{50AD0E28-B8D7-4FCC-8FC3-599F6AC69761} = {50AD0E28-B8D7-4FCC-8FC3-599F6AC69761}
+ {8D04B550-D240-4A44-8A18-35DA3F7038D9} = {8D04B550-D240-4A44-8A18-35DA3F7038D9}
+ {89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {EEF031CB-FED8-451E-A471-91EC8D4F6750} = {EEF031CB-FED8-451E-A471-91EC8D4F6750}
+ {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g729", "src\mod\codecs\mod_g729\mod_g729.vcproj", "{1D95CD95-0DE2-48C3-AC23-D5C7D1C9C0F0}"
@@ -26,28 +26,28 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_gsm", "src\mod\codecs\mod_gsm\mod_gsm.vcproj", "{4926323F-4EA8-4B7D-A3D3-65488725988F}"
ProjectSection(ProjectDependencies) = postProject
- {8FD2E297-4096-47E5-9258-C48FF1841523} = {8FD2E297-4096-47E5-9258-C48FF1841523}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {8FD2E297-4096-47E5-9258-C48FF1841523} = {8FD2E297-4096-47E5-9258-C48FF1841523}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_xmpp_event", "src\mod\event_handlers\mod_xmpp_event\mod_xmpp_event.vcproj", "{F10BE67C-A8FF-4CB2-AF29-D46D2590DC59}"
ProjectSection(ProjectDependencies) = postProject
- {E727E8F6-935D-46FE-8B0E-37834748A0E3} = {E727E8F6-935D-46FE-8B0E-37834748A0E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {E727E8F6-935D-46FE-8B0E-37834748A0E3} = {E727E8F6-935D-46FE-8B0E-37834748A0E3}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_sndfile", "src\mod\formats\mod_sndfile\mod_sndfile.vcproj", "{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6}"
ProjectSection(ProjectDependencies) = postProject
- {3D0370CA-BED2-4657-A475-32375CBCB6E4} = {3D0370CA-BED2-4657-A475-32375CBCB6E4}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {3D0370CA-BED2-4657-A475-32375CBCB6E4} = {3D0370CA-BED2-4657-A475-32375CBCB6E4}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_event_test", "src\mod\event_handlers\mod_event_test\mod_event_test.vcproj", "{3A2A7795-C216-4FFF-B8EF-4D17A84BACCC}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g711", "src\mod\codecs\mod_g711\mod_g711.vcproj", "{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}"
@@ -57,16 +57,16 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_iax", "src\mod\endpoints\mod_iax\mod_iax.vcproj", "{3A5B9131-F20C-4A85-9447-6C1610941CEE}"
ProjectSection(ProjectDependencies) = postProject
- {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E} = {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E} = {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_PortAudio", "src\mod\endpoints\mod_portaudio\mod_PortAudio.vcproj", "{5FD31A25-5D83-4794-8BEE-904DAD84CE71}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {0A18A071-125E-442F-AFF7-A3F68ABECF99} = {0A18A071-125E-442F-AFF7-A3F68ABECF99}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {0A18A071-125E-442F-AFF7-A3F68ABECF99} = {0A18A071-125E-442F-AFF7-A3F68ABECF99}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_l16", "src\mod\codecs\mod_l16\mod_l16.vcproj", "{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}"
@@ -76,20 +76,20 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_softtimer", "src\mod\timers\mod_softtimer\mod_softtimer.vcproj", "{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_speex", "src\mod\codecs\mod_speex\mod_speex.vcproj", "{5580D60E-0F77-4716-9CD4-B8E5986FA375}"
ProjectSection(ProjectDependencies) = postProject
- {1C469CDD-A3AF-4A94-A592-B2CF12F2D918} = {1C469CDD-A3AF-4A94-A592-B2CF12F2D918}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {1C469CDD-A3AF-4A94-A592-B2CF12F2D918} = {1C469CDD-A3AF-4A94-A592-B2CF12F2D918}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_woomera", "src\mod\endpoints\mod_woomera\mod_woomera.vcproj", "{FE3540C5-3303-46E0-A69E-D92F775687F1}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Codecs", "Codecs", "{F881ADA2-2F1A-4046-9FEB-191D9422D781}"
@@ -112,8 +112,8 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_dialplan_xml", "src\mod\dialplans\mod_dialplan_xml\mod_dialplan_xml.vcproj", "{07113B25-D3AF-4E04-BA77-4CD1171F022C}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "FreeSwitchSetup", "w32\Setup\Setup.vdproj", "{B17FFBE6-A942-4056-8346-B624FB5D995B}"
@@ -127,22 +127,22 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_dialplan_directory", "src\mod\dialplans\mod_dialplan_directory\mod_dialplan_directory.vcproj", "{A27CCA23-1541-4337-81A4-F0A6413078A0}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_zeroconf", "src\mod\event_handlers\mod_zeroconf\mod_zeroconf.vcproj", "{C7705DC4-2088-493E-AF8D-65BC6D65C125}"
ProjectSection(ProjectDependencies) = postProject
- {0D826AF5-0506-4C50-BB8B-7DB019AC21AE} = {0D826AF5-0506-4C50-BB8B-7DB019AC21AE}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {49C34584-B6DA-448F-83CF-27584DC9FC90} = {49C34584-B6DA-448F-83CF-27584DC9FC90}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {49C34584-B6DA-448F-83CF-27584DC9FC90} = {49C34584-B6DA-448F-83CF-27584DC9FC90}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {0D826AF5-0506-4C50-BB8B-7DB019AC21AE} = {0D826AF5-0506-4C50-BB8B-7DB019AC21AE}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_event_multicast", "src\mod\event_handlers\mod_event_multicast\mod_event_multicast.vcproj", "{784113EF-44D9-4949-835D-7065D3C7AD08}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libteletone", "libs\libteletone\libteletone.vcproj", "{89385C74-5860-4174-9CAF-A39E7C48909C}"
@@ -151,10 +151,10 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey", "src\mod\languages\mod_spidermonkey\mod_spidermonkey.vcproj", "{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}"
ProjectSection(ProjectDependencies) = postProject
- {204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
- {87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
+ {204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ASR-TTS", "ASR-TTS", "{4CF6A6AC-07DE-4B9E-ABE1-7F98B64E0BB0}"
@@ -176,22 +176,22 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_ilbc", "src\mod\codecs\mod_ilbc\mod_ilbc.vcproj", "{D3EC0AFF-76FC-4210-A825-9A17410660A3}"
ProjectSection(ProjectDependencies) = postProject
- {989BB874-7AF1-44CB-8E5C-CC8113D267E8} = {989BB874-7AF1-44CB-8E5C-CC8113D267E8}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {989BB874-7AF1-44CB-8E5C-CC8113D267E8} = {989BB874-7AF1-44CB-8E5C-CC8113D267E8}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_dingaling", "src\mod\endpoints\mod_dingaling\mod_dingaling.vcproj", "{FFAA4C52-3A53-4F99-90C1-D59D1F0427F3}"
ProjectSection(ProjectDependencies) = postProject
- {E727E8F6-935D-46FE-8B0E-37834748A0E3} = {E727E8F6-935D-46FE-8B0E-37834748A0E3}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{1906D736-08BD-4EE1-924F-B536249B9A54} = {1906D736-08BD-4EE1-924F-B536249B9A54}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {E727E8F6-935D-46FE-8B0E-37834748A0E3} = {E727E8F6-935D-46FE-8B0E-37834748A0E3}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_commands", "src\mod\applications\mod_commands\mod_commands.vcproj", "{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Loggers", "Loggers", "{A7AB4405-FDB7-4853-9FBB-1516B1C3D80A}"
@@ -205,42 +205,42 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_xml_rpc", "src\mod\xml_int\mod_xml_rpc\mod_xml_rpc.vcproj", "{CBEC7225-0C21-4DA8-978E-1F158F8AD950}"
ProjectSection(ProjectDependencies) = postProject
- {155844C3-EC5F-407F-97A4-A2DDADED9B2F} = {155844C3-EC5F-407F-97A4-A2DDADED9B2F}
- {87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {A3FE0076-B366-429D-A238-D7304DA7D3C1} = {A3FE0076-B366-429D-A238-D7304DA7D3C1}
- {356EC96D-4C9F-47B5-9083-FC328B87BA94} = {356EC96D-4C9F-47B5-9083-FC328B87BA94}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {356EC96D-4C9F-47B5-9083-FC328B87BA94} = {356EC96D-4C9F-47B5-9083-FC328B87BA94}
+ {A3FE0076-B366-429D-A238-D7304DA7D3C1} = {A3FE0076-B366-429D-A238-D7304DA7D3C1}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
+ {155844C3-EC5F-407F-97A4-A2DDADED9B2F} = {155844C3-EC5F-407F-97A4-A2DDADED9B2F}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_rss", "src\mod\applications\mod_rss\mod_rss.vcproj", "{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_conference", "src\mod\applications\mod_conference\mod_conference.vcproj", "{C24FB505-05D7-4319-8485-7540B44C8603}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_dptools", "src\mod\applications\mod_dptools\mod_dptools.vcproj", "{B5881A85-FE70-4F64-8607-2CAAE52669C6}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_event_socket", "src\mod\event_handlers\mod_event_socket\mod_event_socket.vcproj", "{05515420-16DE-4E63-BE73-85BE85BA5142}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_cdr", "src\mod\event_handlers\mod_cdr\mod_cdr.vcproj", "{3D1EED36-A510-4EDB-B4D9-4E0F4A5EC2A8}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Libraries", "_Libraries", "{EB910B0D-F27D-4B62-B67B-DE834C99AC5B}"
@@ -253,8 +253,8 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdingaling", "libs\libdingaling\libdingaling.vcproj", "{1906D736-08BD-4EE1-924F-B536249B9A54}"
ProjectSection(ProjectDependencies) = postProject
- {E727E8F6-935D-46FE-8B0E-37834748A0E3} = {E727E8F6-935D-46FE-8B0E-37834748A0E3}
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {E727E8F6-935D-46FE-8B0E-37834748A0E3} = {E727E8F6-935D-46FE-8B0E-37834748A0E3}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsrtp", "libs\srtp\libsrtp.vcproj", "{EEF031CB-FED8-451E-A471-91EC8D4F6750}"
@@ -279,8 +279,8 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libaprutil", "libs\win32\apr-util\libaprutil.vcproj", "{F057DA7F-79E5-4B00-845C-EF446EF055E3}"
ProjectSection(ProjectDependencies) = postProject
- {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Downloads", "_Downloads", "{C120A020-773F-4EA3-923F-B67AF28B750D}"
@@ -298,8 +298,8 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mDNSResponder static library", "libs\win32\howl\libmDNSResponder.vcproj", "{49C34584-B6DA-448F-83CF-27584DC9FC90}"
ProjectSection(ProjectDependencies) = postProject
- {0D826AF5-0506-4C50-BB8B-7DB019AC21AE} = {0D826AF5-0506-4C50-BB8B-7DB019AC21AE}
{5927104D-C14C-4AC8-925C-4AB681762E75} = {5927104D-C14C-4AC8-925C-4AB681762E75}
+ {0D826AF5-0506-4C50-BB8B-7DB019AC21AE} = {0D826AF5-0506-4C50-BB8B-7DB019AC21AE}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsndfile", "libs\win32\libsndfile\libsndfile.vcproj", "{3D0370CA-BED2-4657-A475-32375CBCB6E4}"
@@ -319,34 +319,34 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_sofia", "src\mod\endpoints\mod_sofia\mod_sofia.vcproj", "{0DF3ABD0-DDC0-4265-B778-07C66780979B}"
ProjectSection(ProjectDependencies) = postProject
- {70A49BC2-7500-41D0-B75D-EDCC5BE987A0} = {70A49BC2-7500-41D0-B75D-EDCC5BE987A0}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4} = {DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {70A49BC2-7500-41D0-B75D-EDCC5BE987A0} = {70A49BC2-7500-41D0-B75D-EDCC5BE987A0}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libg726", "libs\codec\g726\libg726.vcproj", "{5A6A281A-AA50-470A-8305-202BDA1CD1BF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g726", "src\mod\codecs\mod_g726\mod_g726.vcproj", "{486369EB-F150-4B56-BCC8-77B9E18FF5F5}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{5A6A281A-AA50-470A-8305-202BDA1CD1BF} = {5A6A281A-AA50-470A-8305-202BDA1CD1BF}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libg7xx", "libs\codec\g7xx\libg7xx.vcproj", "{D71E7338-8D9C-4FE4-A15F-D5CC60202C7C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g722", "src\mod\codecs\mod_g722\mod_g722.vcproj", "{D42518CC-7475-454D-B392-0E132C07D761}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{D71E7338-8D9C-4FE4-A15F-D5CC60202C7C} = {D71E7338-8D9C-4FE4-A15F-D5CC60202C7C}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsofia_sip_ua_static", "libs\win32\sofia\libsofia_sip_ua_static.vcproj", "{70A49BC2-7500-41D0-B75D-EDCC5BE987A0}"
ProjectSection(ProjectDependencies) = postProject
- {8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A} = {8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4} = {DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}
+ {8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A} = {8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download PTHREAD", "libs\win32\Download PTHREAD.vcproj", "{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}"
@@ -358,84 +358,84 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g723_1", "src\mod\codecs\mod_g723_1\mod_g723_1.vcproj", "{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_native_file", "src\mod\formats\mod_native_file\mod_native_file.vcproj", "{9254C4B0-6F60-42B6-BB3A-36D63FC001C7}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FreeSwitch.NET", "src\dotnet\FreeSwitch.NET.csproj", "{251CAABC-16C3-4593-A491-603B908094E0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_core_db", "src\mod\languages\mod_spidermonkey_core_db\mod_spidermonkey_core_db.vcproj", "{ACFFF684-4D19-4D48-AF12-88EA1D778BDF}"
ProjectSection(ProjectDependencies) = postProject
- {204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_teletone", "src\mod\languages\mod_spidermonkey_teletone\mod_spidermonkey_teletone.vcproj", "{8F992C49-6C51-412F-B2A3-34EAB708EB65}"
ProjectSection(ProjectDependencies) = postProject
- {204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C}
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libudns", "libs\win32\udns\libudns.vcproj", "{4043FC6A-9A30-4577-8AD5-9B233C9575D8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_enum", "src\mod\applications\mod_enum\mod_enum.vcproj", "{71A967D5-0E99-4CEF-A587-98836EE6F2EF}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {4043FC6A-9A30-4577-8AD5-9B233C9575D8} = {4043FC6A-9A30-4577-8AD5-9B233C9575D8}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {4043FC6A-9A30-4577-8AD5-9B233C9575D8} = {4043FC6A-9A30-4577-8AD5-9B233C9575D8}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_etpan", "src\mod\languages\mod_spidermonkey_etpan\mod_spidermonkey_etpan.vcproj", "{D6C82F86-2B05-4A7F-8CC6-D2592E66FBB9}"
ProjectSection(ProjectDependencies) = postProject
- {204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE} = {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}
+ {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE} = {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_odbc", "src\mod\languages\mod_spidermonkey_odbc\mod_spidermonkey_odbc.vcproj", "{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}"
ProjectSection(ProjectDependencies) = postProject
- {204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libetpan", "libs\win32\etpan\libetpan.vcproj", "{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_xml_curl", "src\mod\xml_int\mod_xml_curl\mod_xml_curl.vcproj", "{AB91A099-7690-4ECF-8994-E458F4EA1ED4}"
ProjectSection(ProjectDependencies) = postProject
- {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "say", "say", "{6CD61A1D-797C-470A-BE08-8C31B68BB336}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_say_en", "src\mod\say\mod_say_en\mod_say_en.vcproj", "{988CACF7-3FCB-4992-BE69-77872AE67DC8}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portaudio", "libs\portaudio\build\msvc\portaudio.vcproj", "{0A18A071-125E-442F-AFF7-A3F68ABECF99}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_xml_cdr", "src\mod\xml_int\mod_xml_cdr\mod_xml_cdr.vcproj", "{08DAD348-9E0A-4A2E-97F1-F1E7E24A7836}"
ProjectSection(ProjectDependencies) = postProject
- {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_amr", "src\mod\codecs\mod_amr\mod_amr.vcproj", "{8DEB383C-4091-4F42-A56F-C9E46D552D79}"
@@ -573,6 +573,9 @@
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_h26x", "src\mod\codecs\mod_h26x\mod_h26x.vcproj", "{2C3C2423-234B-4772-8899-D3B137E5CA35}"
+ ProjectSection(ProjectDependencies) = postProject
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_esf", "src\mod\applications\mod_esf\mod_esf.vcproj", "{3850D93A-5F24-4922-BC1C-74D08C37C256}"
ProjectSection(ProjectDependencies) = postProject
@@ -1107,18 +1110,18 @@
{3D1EED36-A510-4EDB-B4D9-4E0F4A5EC2A8} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6} = {A5A27244-AD24-46E5-B01B-840CD296C91D}
{9254C4B0-6F60-42B6-BB3A-36D63FC001C7} = {A5A27244-AD24-46E5-B01B-840CD296C91D}
- {30A5B29C-983E-4580-9FD0-D647CCDCC7EB} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
- {B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
- {C24FB505-05D7-4319-8485-7540B44C8603} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
- {B5881A85-FE70-4F64-8607-2CAAE52669C6} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
- {71A967D5-0E99-4CEF-A587-98836EE6F2EF} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
- {3850D93A-5F24-4922-BC1C-74D08C37C256} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{5FD31A25-5D83-4794-8BEE-904DAD84CE71} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
{FE3540C5-3303-46E0-A69E-D92F775687F1} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
{3A5B9131-F20C-4A85-9447-6C1610941CEE} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
{FFAA4C52-3A53-4F99-90C1-D59D1F0427F3} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
{0DF3ABD0-DDC0-4265-B778-07C66780979B} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5} = {2D57D093-3F8D-4729-AD9A-68E945C200A5}
+ {30A5B29C-983E-4580-9FD0-D647CCDCC7EB} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
+ {B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
+ {C24FB505-05D7-4319-8485-7540B44C8603} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
+ {B5881A85-FE70-4F64-8607-2CAAE52669C6} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
+ {71A967D5-0E99-4CEF-A587-98836EE6F2EF} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
+ {3850D93A-5F24-4922-BC1C-74D08C37C256} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{07113B25-D3AF-4E04-BA77-4CD1171F022C} = {C5F182F9-754A-4EC5-B50F-76ED02BE13F4}
{A27CCA23-1541-4337-81A4-F0A6413078A0} = {C5F182F9-754A-4EC5-B50F-76ED02BE13F4}
{1A1FF289-4FD6-4285-A422-D31DD67A4723} = {CBD81696-EFB4-4D2F-8451-1B8DAA86155A}
Modified: freeswitch/trunk/src/include/switch_loadable_module.h
==============================================================================
--- freeswitch/trunk/src/include/switch_loadable_module.h (original)
+++ freeswitch/trunk/src/include/switch_loadable_module.h Wed Jun 20 04:41:55 2007
@@ -303,6 +303,14 @@
break; \
}
+#define SWITCH_ADD_CODEC(codec_int, int_name, implementation) \
+ for (;;) { \
+ codec_int = (switch_codec_interface_t *)switch_loadable_module_create_interface(*module_interface, SWITCH_CODEC_INTERFACE); \
+ codec_int->implementations = implementation; \
+ codec_int->interface_name = int_name; \
+ break; \
+ }
+
///\}
SWITCH_END_EXTERN_C
Modified: freeswitch/trunk/src/mod/codecs/mod_amr/mod_amr.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_amr/mod_amr.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_amr/mod_amr.c Wed Jun 20 04:41:55 2007
@@ -310,22 +310,9 @@
/*.destroy */ switch_amr_destroy,
};
-static switch_codec_interface_t amr_codec_interface = {
- /*.interface_name */ "GSM-AMR",
- /*.implementations */ &amr_implementation,
-};
-
-static switch_loadable_module_interface_t amr_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ &amr_codec_interface,
- /*.application_interface */ NULL
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_amr_load)
{
+ switch_codec_interface_t *codec_interface;
#ifndef AMR_PASSTHROUGH
char *cf = "amr.conf";
switch_xml_t cfg, xml, settings, param;
@@ -347,7 +334,8 @@
#endif
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &amr_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_CODEC(codec_interface, "GSM-AMR", &amr_implementation);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/codecs/mod_g711/mod_g711.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_g711/mod_g711.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_g711/mod_g711.c Wed Jun 20 04:41:55 2007
@@ -392,33 +392,13 @@
/*.next */ &g711a_8k_20ms_implementation
};
-
-
-static switch_codec_interface_t g711a_codec_interface = {
- /*.interface_name */ "g711 alaw",
- /*.implementations */ &g711a_8k_10ms_implementation
-};
-
-static switch_codec_interface_t g711u_codec_interface = {
- /*.interface_name */ "g711 ulaw",
- /*.implementations */ &g711u_8k_10ms_implementation,
- /*.next */ &g711a_codec_interface
-};
-
-static switch_loadable_module_interface_t g711_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ &g711u_codec_interface,
- /*.application_interface */ NULL
-};
-
-
SWITCH_MODULE_LOAD_FUNCTION(mod_g711_load)
{
+ switch_codec_interface_t *codec_interface;
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &g711_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_CODEC(codec_interface, "g711 ulaw", &g711u_8k_10ms_implementation);
+ SWITCH_ADD_CODEC(codec_interface, "g711 alaw", &g711a_8k_10ms_implementation);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/codecs/mod_g722/mod_g722.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_g722/mod_g722.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_g722/mod_g722.c Wed Jun 20 04:41:55 2007
@@ -159,24 +159,12 @@
/*.next */ &g722_8k_implementation
};
-static switch_codec_interface_t g722_codec_interface = {
- /*.interface_name */ "g722",
- /*.implementations */ &g722_16k_implementation
-};
-
-static switch_loadable_module_interface_t g722_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ &g722_codec_interface,
- /*.application_interface */ NULL
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_g722_load)
{
+ switch_codec_interface_t *codec_interface;
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &g722_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_CODEC(codec_interface, "g722", &g722_16k_implementation);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/codecs/mod_g723_1/mod_g723_1.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_g723_1/mod_g723_1.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_g723_1/mod_g723_1.c Wed Jun 20 04:41:55 2007
@@ -189,24 +189,12 @@
/*.destroy */ switch_g723_destroy,
};
-static switch_codec_interface_t g723_1_codec_interface = {
- /*.interface_name */ "g723.1 6.3k",
- /*.implementations */ &g723_1_implementation,
-};
-
-static switch_loadable_module_interface_t g723_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ &g723_1_codec_interface,
- /*.application_interface */ NULL
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_g723_1_load)
{
+ switch_codec_interface_t *codec_interface;
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &g723_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_CODEC(codec_interface, "g723.1 6.3k", &g723_1_implementation);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/codecs/mod_g726/mod_g726.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_g726/mod_g726.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_g726/mod_g726.c Wed Jun 20 04:41:55 2007
@@ -368,68 +368,19 @@
/*.destroy */ switch_g726_destroy,
};
-static switch_codec_interface_t g726_16k_codec_interface = {
- /*.interface_name */ "G.726 16k",
- /*.implementations */ &g726_16k_implementation,
-};
-
-static switch_codec_interface_t g726_24k_codec_interface = {
- /*.interface_name */ "G.726 24k",
- /*.implementations */ &g726_24k_implementation,
- /*.next */ &g726_16k_codec_interface
-};
-
-static switch_codec_interface_t g726_32k_codec_interface = {
- /*.interface_name */ "G.726 32k",
- /*.implementations */ &g726_32k_implementation,
- /*.next */ &g726_24k_codec_interface
-};
-
-static switch_codec_interface_t g726_40k_codec_interface = {
- /*.interface_name */ "G.726 40k",
- /*.implementations */ &g726_40k_implementation,
- /*.next */ &g726_32k_codec_interface
-};
-
-static switch_codec_interface_t aal2_g726_16k_codec_interface = {
- /*.interface_name */ "G.726 16k (aal2)",
- /*.implementations */ &aal2_g726_16k_implementation,
- /*.next */ &g726_40k_codec_interface
-};
-
-static switch_codec_interface_t aal2_g726_24k_codec_interface = {
- /*.interface_name */ "G.726 24k (aal2)",
- /*.implementations */ &aal2_g726_24k_implementation,
- /*.next */ &aal2_g726_16k_codec_interface
-};
-
-static switch_codec_interface_t aal2_g726_32k_codec_interface = {
- /*.interface_name */ "G.726 32k (aal2)",
- /*.implementations */ &aal2_g726_32k_implementation,
- /*.next */ &aal2_g726_24k_codec_interface
-};
-
-static switch_codec_interface_t aal2_g726_40k_codec_interface = {
- /*.interface_name */ "G.726 40k (aal2)",
- /*.implementations */ &aal2_g726_40k_implementation,
- /*.next */ &aal2_g726_32k_codec_interface
-};
-
-
-
-static switch_loadable_module_interface_t g726_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ &aal2_g726_40k_codec_interface,
- /*.application_interface */ NULL
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_g726_load)
{
+ switch_codec_interface_t *codec_interface;
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &g726_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_CODEC(codec_interface, "G.726 40k (aal2)", &aal2_g726_40k_implementation);
+ SWITCH_ADD_CODEC(codec_interface, "G.726 32k (aal2)", &aal2_g726_32k_implementation);
+ SWITCH_ADD_CODEC(codec_interface, "G.726 24k (aal2)", &aal2_g726_24k_implementation);
+ SWITCH_ADD_CODEC(codec_interface, "G.726 16k (aal2)", &aal2_g726_16k_implementation);
+ SWITCH_ADD_CODEC(codec_interface, "G.726 40k", &g726_40k_implementation);
+ SWITCH_ADD_CODEC(codec_interface, "G.726 32k", &g726_32k_implementation);
+ SWITCH_ADD_CODEC(codec_interface, "G.726 24k", &g726_24k_implementation);
+ SWITCH_ADD_CODEC(codec_interface, "G.726 16k", &g726_16k_implementation);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c Wed Jun 20 04:41:55 2007
@@ -295,25 +295,12 @@
&g729_10ms_8k_implementation
};
-static switch_codec_interface_t g729_codec_interface = {
- /*.interface_name */ "g729",
- /*.implementations */ &g729_8k_implementation,
- /*.next */ NULL
-};
-
-static switch_loadable_module_interface_t g729_module_interface = {
- /*.module_name */ "g729",
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ &g729_codec_interface,
- /*.application_interface */ NULL
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_g729_load)
{
+ switch_codec_interface_t *codec_interface;
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &g729_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_CODEC(codec_interface, "g729", &g729_8k_implementation);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/codecs/mod_gsm/mod_gsm.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_gsm/mod_gsm.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_gsm/mod_gsm.c Wed Jun 20 04:41:55 2007
@@ -153,24 +153,13 @@
/*.decode */ switch_gsm_decode,
/*.destroy */ switch_gsm_destroy,
};
-static switch_codec_interface_t gsm_codec_interface = {
- /*.interface_name */ "gsm",
- /*.implementations */ &gsm_8k_implementation,
-};
-static switch_loadable_module_interface_t gsm_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ &gsm_codec_interface,
- /*.application_interface */ NULL
-};
SWITCH_MODULE_LOAD_FUNCTION(mod_gsm_load)
{
-
+ switch_codec_interface_t *codec_interface;
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &gsm_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_CODEC(codec_interface, "gsm", &gsm_8k_implementation);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.c Wed Jun 20 04:41:55 2007
@@ -117,25 +117,13 @@
/*.next = */&h264_90000_implementation
};
-static switch_codec_interface_t h26x_codec_interface = {
- /*.interface_name */ "h26x video (passthru)",
- /*.implementations */ &h263_90000_implementation
-};
-
-static switch_loadable_module_interface_t h26x_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ &h26x_codec_interface,
- /*.application_interface */ NULL,
- /*.api_interface */ NULL,
-};
SWITCH_MODULE_LOAD_FUNCTION(mod_h26x_load)
{
+ switch_codec_interface_t *codec_interface;
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &h26x_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_CODEC(codec_interface, "h26x video (passthru)", &h263_90000_implementation);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/codecs/mod_ilbc/mod_ilbc.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_ilbc/mod_ilbc.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_ilbc/mod_ilbc.c Wed Jun 20 04:41:55 2007
@@ -287,40 +287,14 @@
/*.destroy */ switch_ilbc_destroy
};
-
-static switch_codec_interface_t ilbc_20ms_codec_interface = {
- /*.interface_name */ "ilbc",
- /*.implementations */ &ilbc_8k_20ms_nonext_implementation
-};
-
-static switch_codec_interface_t ilbc_102_codec_interface = {
- /*.interface_name */ "ilbc",
- /*.implementations */ &ilbc_102_8k_20ms_implementation,
- /*.next */ &ilbc_20ms_codec_interface
-};
-
-static switch_codec_interface_t ilbc_codec_interface = {
- /*.interface_name */ "ilbc",
- /*.implementations */ &ilbc_8k_20ms_implementation,
- /*.next */ &ilbc_102_codec_interface
-};
-
-
-static switch_loadable_module_interface_t ilbc_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ &ilbc_codec_interface,
- /*.application_interface */ NULL
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_ilbc_load)
{
-
+ switch_codec_interface_t *codec_interface;
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &ilbc_module_interface;
-
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_CODEC(codec_interface, "ilbc", &ilbc_8k_20ms_implementation);
+ SWITCH_ADD_CODEC(codec_interface, "ilbc", &ilbc_102_8k_20ms_implementation);
+ SWITCH_ADD_CODEC(codec_interface, "ilbc", &ilbc_8k_20ms_nonext_implementation);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/codecs/mod_l16/mod_l16.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_l16/mod_l16.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_l16/mod_l16.c Wed Jun 20 04:41:55 2007
@@ -406,28 +406,12 @@
/*.next */ &raw_8k_20ms_implementation
};
-
-static switch_codec_interface_t raw_codec_interface = {
- /*.interface_name */ "raw signed linear (16 bit)",
- /*.implementations */ &raw_8k_10ms_implementation
-};
-
-static switch_loadable_module_interface_t raw_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ &raw_codec_interface,
- /*.application_interface */ NULL,
- /*.api_interface */ NULL,
- ///*.file_interface*/ &raw_file_interface
-};
-
-
SWITCH_MODULE_LOAD_FUNCTION(mod_l16_load)
{
+ switch_codec_interface_t *codec_interface;
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &raw_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_CODEC(codec_interface, "raw signed linear (16 bit)", &raw_8k_10ms_implementation);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/codecs/mod_speex/mod_speex.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_speex/mod_speex.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_speex/mod_speex.c Wed Jun 20 04:41:55 2007
@@ -390,24 +390,12 @@
/*.next */ &speex_8k_30ms_implementation
};
-static switch_codec_interface_t speex_codec_interface = {
- /*.interface_name */ "speex",
- /*.implementations */ &speex_8k_20ms_implementation
-};
-
-static switch_loadable_module_interface_t speex_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ &speex_codec_interface,
- /*.application_interface */ NULL
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_speex_load)
{
+ switch_codec_interface_t *codec_interface;
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &speex_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_CODEC(codec_interface, "speex", &speex_8k_20ms_implementation);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
1
0
[commit] r5405 - in freeswitch/trunk/src/mod: languages/mod_perl languages/mod_spidermonkey say/mod_say_en timers/mod_softtimer xml_int/mod_xml_cdr xml_int/mod_xml_curl xml_int/mod_xml_rpc
by Freeswitch SVN 20 Jun '07
by Freeswitch SVN 20 Jun '07
20 Jun '07
Author: mikej
Date: Wed Jun 20 04:18:18 2007
New Revision: 5405
Modified:
freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c
freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c
freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c
freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c
freeswitch/trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c
freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
Log:
add more modules to new mod loader macros/api.
Modified: freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c Wed Jun 20 04:18:18 2007
@@ -79,29 +79,6 @@
destroy_perl(&my_perl);
}
-static switch_application_interface_t perl_application_interface = {
- /*.interface_name */ "perl",
- /*.application_function */ perl_function,
- NULL, NULL, NULL,
- /* flags */ SAF_NONE,
- /* should we support no media mode here? If so, we need to detect the mode, and either disable the media functions or indicate media if/when we need */
- /*.next */ NULL
-};
-
-static switch_loadable_module_interface_t perl_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ &perl_application_interface,
- /*.api_interface */ NULL,
- /*.file_interface */ NULL,
- /*.speech_interface */ NULL,
- /*.directory_interface */ NULL
-};
-
-
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_perl_shutdown)
{
if (globals.my_perl) {
@@ -115,7 +92,7 @@
SWITCH_MODULE_LOAD_FUNCTION(mod_perl_load)
{
-
+ switch_application_interface_t *app_interface;
PerlInterpreter *my_perl;
char code[1024];
@@ -135,7 +112,8 @@
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &perl_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_APP(app_interface, "perl", NULL, NULL, perl_function, NULL, SAF_NONE);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c Wed Jun 20 04:18:18 2007
@@ -2914,7 +2914,6 @@
return SWITCH_STATUS_SUCCESS;
}
-
SWITCH_STANDARD_API(launch_async)
{
@@ -2928,48 +2927,6 @@
return SWITCH_STATUS_SUCCESS;
}
-
-static switch_application_interface_t ivrtest_application_interface = {
- /*.interface_name */ "javascript",
- /*.application_function */ js_dp_function,
- /* long_desc */ "Run a javascript ivr on a channel",
- /* short_desc */ "Launch JS ivr.",
- /* syntax */ "<script> [additional_vars [...]]",
- /* flags */ SAF_NONE,
- /* should we support no media mode here? If so, we need to detect the mode, and either disable the media functions or indicate media if/when we need */
- /*.next */ NULL
-};
-
-
-static switch_api_interface_t jsapi_interface = {
- /*.interface_name */ "jsapi",
- /*.desc */ "execute an api call",
- /*.function */ jsapi_function,
- /*.syntax */ "jsapi <script> [additional_vars [...]]",
- /*.next */ NULL
-};
-
-static switch_api_interface_t js_run_interface = {
- /*.interface_name */ "jsrun",
- /*.desc */ "run a script",
- /*.function */ launch_async,
- /*.syntax */ "jsrun <script> [additional_vars [...]]",
- /*.next */ &jsapi_interface
-};
-
-static switch_loadable_module_interface_t spidermonkey_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ &ivrtest_application_interface,
- /*.api_interface */ &js_run_interface,
- /*.file_interface */ NULL,
- /*.speech_interface */ NULL,
- /*.directory_interface */ NULL
-};
-
static void message_query_handler(switch_event_t *event)
{
char *account = switch_event_get_header(event, "message-account");
@@ -2994,6 +2951,8 @@
SWITCH_MODULE_LOAD_FUNCTION(mod_spidermonkey_load)
{
+ switch_api_interface_t *api_interface;
+ switch_application_interface_t *app_interface;
switch_status_t status;
if ((status = init_js()) != SWITCH_STATUS_SUCCESS) {
@@ -3007,7 +2966,10 @@
}
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &spidermonkey_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_API(api_interface, "jsrun", "run a script", launch_async, "jsrun <script> [additional_vars [...]]");
+ SWITCH_ADD_API(api_interface, "jsapi", "execute an api call", jsapi_function, "jsapi <script> [additional_vars [...]]");
+ SWITCH_ADD_APP(app_interface, "javascript", "Launch JS ivr", "Run a javascript ivr on a channel", js_dp_function, "<script> [additional_vars [...]]", SAF_NONE);
curl_global_init(CURL_GLOBAL_ALL);
Modified: freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c
==============================================================================
--- freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c (original)
+++ freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c Wed Jun 20 04:18:18 2007
@@ -510,37 +510,18 @@
return SWITCH_STATUS_FALSE;
}
-static switch_say_interface_t es_say_interface = {
- /*.name */ "es",
- /*.say_function */ en_say,
-};
-
-static switch_say_interface_t en_say_interface = {
- /*.name */ "en",
- /*.say_function */ en_say,
- /*.next */ &es_say_interface
-};
-
-static switch_loadable_module_interface_t say_en_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL,
- /*.api_interface */ NULL,
- /*.file_interface */ NULL,
- /*.speech_interface */ NULL,
- /*.directory_interface */ NULL,
- /*.chat_interface */ NULL,
- /*.say_inteface */ &en_say_interface,
- /*.asr_interface */ NULL
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_say_en_load)
{
+ switch_say_interface_t *say_interface;
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &say_en_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ say_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_SAY_INTERFACE);
+ say_interface->interface_name = "en";
+ say_interface->say_function = en_say;
+ say_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_SAY_INTERFACE);
+ say_interface->interface_name = "es";
+ say_interface->say_function = en_say;
+
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c
==============================================================================
--- freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c (original)
+++ freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c Wed Jun 20 04:18:18 2007
@@ -186,31 +186,20 @@
return SWITCH_STATUS_SUCCESS;
}
-static switch_timer_interface_t timer_interface = {
- /*.interface_name */ "soft",
- /*.timer_init */ timer_init,
- /*.timer_next */ timer_next,
- /*.timer_step */ timer_step,
- /*.timer_check */ timer_check,
- /*.timer_destroy */ timer_destroy
-};
-
-static switch_loadable_module_interface_t softtimer_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ &timer_interface
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_softtimer_load)
{
-
- if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
- return SWITCH_STATUS_MEMERR;
- }
+ switch_timer_interface_t *timer_interface;
+ module_pool = pool;
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &softtimer_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ timer_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_TIMER_INTERFACE);
+ timer_interface->interface_name = "soft";
+ timer_interface->timer_init = timer_init;
+ timer_interface->timer_next = timer_next;
+ timer_interface->timer_step = timer_step;
+ timer_interface->timer_check = timer_check;
+ timer_interface->timer_destroy = timer_destroy;
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c (original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c Wed Jun 20 04:18:18 2007
@@ -91,22 +91,12 @@
/*.on_transmit */ NULL
};
-
-static switch_loadable_module_interface_t xml_cdr_module_interface = {
- /*.module_name = */ modname,
- /*.endpoint_interface = */ NULL,
- /*.timer_interface = */ NULL,
- /*.dialplan_interface = */ NULL,
- /*.codec_interface = */ NULL,
- /*.application_interface */ NULL
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_xml_cdr_load)
{
/* test global state handlers */
switch_core_add_state_handler(&state_handlers);
- *module_interface = &xml_cdr_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c (original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c Wed Jun 20 04:18:18 2007
@@ -143,20 +143,6 @@
return xml;
}
-
-static switch_loadable_module_interface_t xml_curl_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL,
- /*.api_interface */ NULL,
- /*.file_interface */ NULL,
- /*.speech_interface */ NULL,
- /*.directory_interface */ NULL
-};
-
static switch_status_t do_config(void)
{
char *cf = "xml_curl.conf";
@@ -234,7 +220,7 @@
SWITCH_MODULE_LOAD_FUNCTION(mod_xml_curl_load)
{
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &xml_curl_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
if (do_config() == SWITCH_STATUS_SUCCESS) {
curl_global_init(CURL_GLOBAL_ALL);
Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c (original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c Wed Jun 20 04:18:18 2007
@@ -47,19 +47,6 @@
SWITCH_MODULE_RUNTIME_FUNCTION(mod_xml_rpc_runtime);
SWITCH_MODULE_DEFINITION(mod_xml_rpc, mod_xml_rpc_load, mod_xml_rpc_shutdown, mod_xml_rpc_runtime);
-static switch_loadable_module_interface_t xml_rpc_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL,
- /*.api_interface */ NULL,
- /*.file_interface */ NULL,
- /*.speech_interface */ NULL,
- /*.directory_interface */ NULL
-};
-
static struct {
uint16_t port;
uint8_t running;
@@ -69,10 +56,10 @@
} globals;
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_realm, globals.realm)
- SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_user, globals.user)
- SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_pass, globals.pass)
+SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_user, globals.user)
+SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_pass, globals.pass)
- static switch_status_t do_config(void)
+ static switch_status_t do_config(void)
{
char *cf = "xml_rpc.conf";
switch_xml_t cfg, xml, settings, param;
@@ -118,7 +105,7 @@
SWITCH_MODULE_LOAD_FUNCTION(mod_xml_rpc_load)
{
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &xml_rpc_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
memset(&globals, 0, sizeof(globals));
1
0
20 Jun '07
Author: mikej
Date: Wed Jun 20 03:53:33 2007
New Revision: 5404
Modified:
freeswitch/trunk/src/include/switch_loadable_module.h
freeswitch/trunk/src/mod/event_handlers/mod_cdr/mod_cdr.cpp
freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c
freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
freeswitch/trunk/src/mod/event_handlers/mod_event_test/mod_event_test.c
freeswitch/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c
freeswitch/trunk/src/mod/event_handlers/mod_zeroconf/mod_zeroconf.c
freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c
freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c
freeswitch/trunk/src/mod/loggers/mod_console/mod_console.c
Log:
add more modules to new mod loader macros/api.
Modified: freeswitch/trunk/src/include/switch_loadable_module.h
==============================================================================
--- freeswitch/trunk/src/include/switch_loadable_module.h (original)
+++ freeswitch/trunk/src/include/switch_loadable_module.h Wed Jun 20 03:53:33 2007
@@ -267,7 +267,7 @@
#define SWITCH_ADD_API(api_int, int_name, descript, funcptr, syntax_string) \
for (;;) { \
- api_int = switch_loadable_module_create_interface(*module_interface, SWITCH_API_INTERFACE); \
+ api_int = (switch_api_interface_t *)switch_loadable_module_create_interface(*module_interface, SWITCH_API_INTERFACE); \
api_int->interface_name = int_name; \
api_int->desc = descript; \
api_int->function = funcptr; \
@@ -277,7 +277,7 @@
#define SWITCH_ADD_CHAT(chat_int, int_name, funcptr) \
for (;;) { \
- chat_int = switch_loadable_module_create_interface(*module_interface, SWITCH_CHAT_INTERFACE); \
+ chat_int = (switch_chat_interface_t *)switch_loadable_module_create_interface(*module_interface, SWITCH_CHAT_INTERFACE); \
chat_int->chat_send = funcptr; \
chat_int->interface_name = int_name; \
break; \
@@ -285,7 +285,7 @@
#define SWITCH_ADD_APP(app_int, int_name, short_descript, long_descript, funcptr, syntax_string, app_flags) \
for (;;) { \
- app_int = switch_loadable_module_create_interface(*module_interface, SWITCH_APPLICATION_INTERFACE); \
+ app_int = (switch_application_interface_t *)switch_loadable_module_create_interface(*module_interface, SWITCH_APPLICATION_INTERFACE); \
app_int->interface_name = int_name; \
app_int->application_function = funcptr; \
app_int->short_desc = short_descript; \
@@ -297,7 +297,7 @@
#define SWITCH_ADD_DIALPLAN(dp_int, int_name, funcptr) \
for (;;) { \
- dp_int = switch_loadable_module_create_interface(*module_interface, SWITCH_DIALPLAN_INTERFACE); \
+ dp_int = (switch_dialplan_interface_t *)switch_loadable_module_create_interface(*module_interface, SWITCH_DIALPLAN_INTERFACE); \
dp_int->hunt_function = funcptr; \
dp_int->interface_name = int_name; \
break; \
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/mod_cdr.cpp
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/mod_cdr.cpp (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/mod_cdr.cpp Wed Jun 20 03:53:33 2007
@@ -68,56 +68,6 @@
/*.on_transmit */ NULL
};
-static switch_api_interface_t modcdr_show_available_api = {
- /*.interface_name */ "modcdr_show_available",
- /*.desc */ "Displays the currently compiled-in mod_cdr backend loggers.",
- /*.function */ modcdr_show_available,
- /*.syntax */ "modcdr_queue_show_available",
- /*.next */ 0
-};
-
-static switch_api_interface_t modcdr_show_active_api = {
- /*.interface_name */ "modcdr_show_active",
- /*.desc */ "Displays the currently active mod_cdr backend loggers.",
- /*.function */ modcdr_show_active,
- /*.syntax */ "modcdr_queue_show_active",
- /*.next */ &modcdr_show_available_api
-};
-
-static switch_api_interface_t modcdr_queue_resume_api = {
- /*.interface_name */ "modcdr_queue_resume",
- /*.desc */ "Manually resumes the popping of objects from the queue.",
- /*.function */ modcdr_queue_resume,
- /*.syntax */ "modcdr_queue_resume",
- /*.next */ &modcdr_show_active_api
-};
-
-static switch_api_interface_t modcdr_queue_pause_api = {
- /*.interface_name */ "modcdr_queue_pause",
- /*.desc */ "Manually pauses the popping of objects from the queue. (DANGER: Can suck your memory away rather quickly.)",
- /*.function */ modcdr_queue_pause,
- /*.syntax */ "modcdr_queue_pause",
- /*.next */ &modcdr_queue_resume_api
-};
-
-static switch_api_interface_t modcdr_reload_interface_api = {
- /*.interface_name */ "modcdr_reload",
- /*.desc */ "Reload mod_cdr's configuration",
- /*.function */ modcdr_reload,
- /*.syntax */ "modcdr_reload",
- /*.next */ &modcdr_queue_pause_api
-};
-
-static switch_loadable_module_interface_t cdr_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL,
- /* api_interface */ &modcdr_reload_interface_api
-};
-
static switch_status_t my_on_hangup(switch_core_session_t *session)
{
switch_thread_rwlock_rdlock(cdr_rwlock);
@@ -126,18 +76,25 @@
return SWITCH_STATUS_SUCCESS;
}
+#define AVAIL_DESCR "Displays the currently compiled-in mod_cdr backend loggers."
+#define ACTIVE_DESCR "Displays the currently active mod_cdr backend loggers."
+#define RESUME_DESCR "Manually resumes the popping of objects from the queue."
+#define PAUSE_DESCR "Manually pauses the popping of objects from the queue. (DANGER: Can suck your memory away rather quickly.)"
SWITCH_MODULE_LOAD_FUNCTION(mod_cdr_load)
{
+ switch_api_interface_t *api_interface;
+
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &cdr_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_API(api_interface, "modcdr_reload", "Reload mod_cdr's configuration", modcdr_reload, "");
+ SWITCH_ADD_API(api_interface, "modcdr_queue_pause", PAUSE_DESCR, modcdr_queue_pause, "");
+ SWITCH_ADD_API(api_interface, "modcdr_queue_resume", RESUME_DESCR, modcdr_queue_resume, "");
+ SWITCH_ADD_API(api_interface, "modcdr_show_active", ACTIVE_DESCR, modcdr_show_active, "");
+ SWITCH_ADD_API(api_interface, "modcdr_show_available", AVAIL_DESCR, modcdr_show_available, "");
switch_core_add_state_handler(&state_handlers);
- if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS)
- {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "OH OH - Can't swim, no pool\n");
- return SWITCH_STATUS_TERM;
- }
+ module_pool = pool;
switch_thread_rwlock_create(&cdr_rwlock,module_pool);
newcdrcontainer = new CDRContainer(module_pool); // Instantiates the new object, automatically loads config
Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c Wed Jun 20 03:53:33 2007
@@ -176,25 +176,12 @@
}
-static switch_loadable_module_interface_t event_test_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL
-};
-
-
SWITCH_MODULE_LOAD_FUNCTION(mod_event_multicast_load)
{
memset(&globals, 0, sizeof(globals));
- if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
- return SWITCH_STATUS_TERM;
- }
+ module_pool = pool;
switch_core_hash_init(&globals.event_hash, module_pool);
@@ -231,10 +218,8 @@
return SWITCH_STATUS_TERM;
}
-
-
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &event_test_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
if (switch_event_bind((char *) modname, SWITCH_EVENT_ALL, SWITCH_EVENT_SUBCLASS_ANY, event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c Wed Jun 20 03:53:33 2007
@@ -161,7 +161,7 @@
switch_mutex_unlock(listen_list.mutex);
}
-static void socket_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(socket_function)
{
char *host, *port_name;
switch_socket_t *new_sock;
@@ -251,28 +251,6 @@
}
-static switch_application_interface_t socket_application_interface = {
- /*.interface_name */ "socket",
- /*.application_function */ socket_function,
- /* long_desc */ "Connect to a socket",
- /* short_desc */ "Connect to a socket",
- /* syntax */ "<ip>[:<port>]",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ NULL
-};
-
-
-
-static switch_loadable_module_interface_t event_socket_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ &socket_application_interface
-};
-
-
static void close_socket(switch_socket_t ** sock)
{
switch_mutex_lock(listen_list.sock_mutex);
@@ -303,11 +281,13 @@
return SWITCH_STATUS_SUCCESS;
}
-
SWITCH_MODULE_LOAD_FUNCTION(mod_event_socket_load)
{
+ switch_application_interface_t *app_interface;
+
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &event_socket_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_APP(app_interface, "socket", "Connect to a socket", "Connect to a socket", socket_function, "<ip>[:<port>]", SAF_SUPPORT_NOMEDIA);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_test/mod_event_test.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_test/mod_event_test.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_test/mod_event_test.c Wed Jun 20 03:53:33 2007
@@ -71,20 +71,8 @@
}
}
-
-
-static switch_loadable_module_interface_t event_test_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL
-};
-
#define MY_EVENT_COOL "test::cool"
-
#ifdef TORTURE_ME
#define TTHREADS 500
static int THREADS = 0;
@@ -128,14 +116,14 @@
SWITCH_MODULE_LOAD_FUNCTION(mod_event_test_load)
{
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &event_test_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
if (switch_event_reserve_subclass(MY_EVENT_COOL) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass!");
return SWITCH_STATUS_GENERR;
}
- if (switch_event_bind((char *) modname, SWITCH_EVENT_ALL, SWITCH_EVENT_SUBCLASS_ANY, event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
+ if (switch_event_bind(modname, SWITCH_EVENT_ALL, SWITCH_EVENT_SUBCLASS_ANY, event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
return SWITCH_STATUS_GENERR;
}
Modified: freeswitch/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c Wed Jun 20 03:53:33 2007
@@ -391,19 +391,10 @@
}
-static switch_loadable_module_interface_t xmpp_event_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_xmpp_event_load)
{
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &xmpp_event_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
if (load_config() != SWITCH_STATUS_SUCCESS) {
return SWITCH_STATUS_FALSE;
Modified: freeswitch/trunk/src/mod/event_handlers/mod_zeroconf/mod_zeroconf.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_zeroconf/mod_zeroconf.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_zeroconf/mod_zeroconf.c Wed Jun 20 03:53:33 2007
@@ -237,16 +237,6 @@
}
-
-static switch_loadable_module_interface_t zeroconf_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL
-};
-
#define MY_EVENT_PUBLISH "zeroconf::broadcast"
#define MY_EVENT_UNPUBLISH "zeroconf::unbroadcast"
@@ -266,10 +256,7 @@
memset(&globals, 0, sizeof(globals));
- if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
- return SWITCH_STATUS_TERM;
- }
+ module_pool = pool;
switch_mutex_init(&globals.zc_lock, SWITCH_MUTEX_NESTED, module_pool);
@@ -293,7 +280,7 @@
}
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &zeroconf_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c (original)
+++ freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c Wed Jun 20 03:53:33 2007
@@ -138,34 +138,10 @@
static char *supported_formats[SWITCH_MAX_CODECS] = { 0 };
-static switch_file_interface_t native_file_file_interface = {
- /*.interface_name */ modname,
- /*.file_open */ native_file_file_open,
- /*.file_close */ native_file_file_close,
- /*.file_read */ native_file_file_read,
- /*.file_write */ native_file_file_write,
- /*.file_seek */ native_file_file_seek,
- /*.file_set_string */ native_file_file_set_string,
- /*.file_get_string */ native_file_file_get_string,
- /*.extens */ NULL,
- /*.next */ NULL,
-};
-
-static switch_loadable_module_interface_t native_file_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL,
- /*.api_interface */ NULL,
- /*.file_interface */ &native_file_file_interface
-};
-
-
SWITCH_MODULE_LOAD_FUNCTION(mod_native_file_load)
{
+ switch_file_interface_t *file_interface;
const switch_codec_implementation_t *codecs[SWITCH_MAX_CODECS];
uint32_t num_codecs = switch_loadable_module_get_codecs(NULL, codecs, sizeof(codecs) / sizeof(codecs[0]));
@@ -175,9 +151,17 @@
supported_formats[x] = codecs[x]->iananame;
}
- /* connect my internal structure to the blank pointer passed to me */
- native_file_file_interface.extens = supported_formats;
- *module_interface = &native_file_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ file_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_FILE_INTERFACE);
+ file_interface->interface_name = modname;
+ file_interface->extens = supported_formats;
+ file_interface->file_open = native_file_file_open;
+ file_interface->file_close = native_file_file_close;
+ file_interface->file_read = native_file_file_read;
+ file_interface->file_write = native_file_file_write;
+ file_interface->file_seek = native_file_file_seek;
+ file_interface->file_set_string = native_file_file_set_string;
+ file_interface->file_get_string = native_file_file_get_string;
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c (original)
+++ freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c Wed Jun 20 03:53:33 2007
@@ -253,30 +253,6 @@
static char **supported_formats;
-static switch_file_interface_t sndfile_file_interface = {
- /*.interface_name */ modname,
- /*.file_open */ sndfile_file_open,
- /*.file_close */ sndfile_file_close,
- /*.file_read */ sndfile_file_read,
- /*.file_write */ sndfile_file_write,
- /*.file_seek */ sndfile_file_seek,
- /*.file_set_string */ sndfile_file_set_string,
- /*.file_get_string */ sndfile_file_get_string,
- /*.extens */ NULL,
- /*.next */ NULL,
-};
-
-static switch_loadable_module_interface_t sndfile_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL,
- /*.api_interface */ NULL,
- /*.file_interface */ &sndfile_file_interface
-};
-
static switch_status_t setup_formats(void)
{
SF_FORMAT_INFO info;
@@ -364,6 +340,7 @@
SWITCH_MODULE_LOAD_FUNCTION(mod_sndfile_load)
{
+ switch_file_interface_t *file_interface;
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
@@ -377,8 +354,17 @@
}
/* connect my internal structure to the blank pointer passed to me */
- sndfile_file_interface.extens = supported_formats;
- *module_interface = &sndfile_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ file_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_FILE_INTERFACE);
+ file_interface->interface_name = modname;
+ file_interface->extens = supported_formats;
+ file_interface->file_open = sndfile_file_open;
+ file_interface->file_close = sndfile_file_close;
+ file_interface->file_read = sndfile_file_read;
+ file_interface->file_write = sndfile_file_write;
+ file_interface->file_seek = sndfile_file_seek;
+ file_interface->file_set_string = sndfile_file_set_string;
+ file_interface->file_get_string = sndfile_file_get_string;
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/loggers/mod_console/mod_console.c
==============================================================================
--- freeswitch/trunk/src/mod/loggers/mod_console/mod_console.c (original)
+++ freeswitch/trunk/src/mod/loggers/mod_console/mod_console.c Wed Jun 20 03:53:33 2007
@@ -56,19 +56,6 @@
};
#endif
-static switch_loadable_module_interface_t console_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL,
- /*.api_interface */ NULL,
- /*.file_interface */ NULL,
- /*.speech_interface */ NULL,
- /*.directory_interface */ NULL
-};
-
static switch_memory_pool_t *module_pool = NULL;
static switch_hash_t *log_hash = NULL;
static switch_hash_t *name_hash = NULL;
@@ -192,14 +179,10 @@
SWITCH_MODULE_LOAD_FUNCTION(mod_console_load)
{
- if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
- return SWITCH_STATUS_TERM;
- }
-
+ module_pool = pool;
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &console_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
/* setup my logger function */
switch_log_bind_logger(switch_console_logger, SWITCH_LOG_DEBUG);
1
0
[commit] r5403 - in freeswitch/trunk/src: . include mod/asr_tts/mod_cepstral mod/directories/mod_ldap mod/endpoints/mod_dingaling mod/endpoints/mod_portaudio mod/endpoints/mod_sofia mod/endpoints/mod_woomera
by Freeswitch SVN 20 Jun '07
by Freeswitch SVN 20 Jun '07
20 Jun '07
Author: mikej
Date: Wed Jun 20 03:15:53 2007
New Revision: 5403
Modified:
freeswitch/trunk/src/include/switch_event.h
freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c
freeswitch/trunk/src/mod/directories/mod_ldap/mod_ldap.c
freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c
freeswitch/trunk/src/switch_event.c
Log:
add more modules to new mod loader macros/api.
Modified: freeswitch/trunk/src/include/switch_event.h
==============================================================================
--- freeswitch/trunk/src/include/switch_event.h (original)
+++ freeswitch/trunk/src/include/switch_event.h Wed Jun 20 03:15:53 2007
@@ -208,7 +208,7 @@
\param user_data optional user specific data to pass whenever the callback is invoked
\return SWITCH_STATUS_SUCCESS if the event was binded
*/
-SWITCH_DECLARE(switch_status_t) switch_event_bind(char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback,
+SWITCH_DECLARE(switch_status_t) switch_event_bind(const char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback,
void *user_data);
/*!
Modified: freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c
==============================================================================
--- freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c (original)
+++ freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c Wed Jun 20 03:15:53 2007
@@ -402,33 +402,9 @@
}
-static switch_speech_interface_t cepstral_speech_interface = {
- /*.interface_name */ "cepstral",
- /*.speech_open */ cepstral_speech_open,
- /*.speech_close */ cepstral_speech_close,
- /*.speech_feed_tts */ cepstral_speech_feed_tts,
- /*.speech_read_tts */ cepstral_speech_read_tts,
- /*.speech_flush_tts */ cepstral_speech_flush_tts,
- /*.speech_text_param_tts */ cepstral_text_param_tts,
- /*.speech_numeric_param_tts */ cepstral_numeric_param_tts,
- /*.speech_numeric_param_tts */ cepstral_float_param_tts
-};
-
-static switch_loadable_module_interface_t cepstral_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL,
- /*.api_interface */ NULL,
- /*.file_interface */ NULL,
- /*.speech_interface */ &cepstral_speech_interface,
- /*.directory_interface */ NULL
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_cepstral_load)
{
+ switch_speech_interface_t *speech_interface;
/* Open the Swift TTS Engine */
if (SWIFT_FAILED(engine = swift_engine_open(NULL))) {
@@ -437,7 +413,17 @@
}
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &cepstral_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ speech_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_SPEECH_INTERFACE);
+ speech_interface->interface_name = "cepstral";
+ speech_interface->speech_open = cepstral_speech_open;
+ speech_interface->speech_close = cepstral_speech_close;
+ speech_interface->speech_feed_tts = cepstral_speech_feed_tts;
+ speech_interface->speech_read_tts = cepstral_speech_read_tts;
+ speech_interface->speech_flush_tts = cepstral_speech_flush_tts;
+ speech_interface->speech_text_param_tts = cepstral_text_param_tts;
+ speech_interface->speech_numeric_param_tts = cepstral_numeric_param_tts;
+ speech_interface->speech_float_param_tts = cepstral_float_param_tts;
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/directories/mod_ldap/mod_ldap.c
==============================================================================
--- freeswitch/trunk/src/mod/directories/mod_ldap/mod_ldap.c (original)
+++ freeswitch/trunk/src/mod/directories/mod_ldap/mod_ldap.c Wed Jun 20 03:15:53 2007
@@ -198,33 +198,19 @@
}
-static switch_directory_interface_t ldap_directory_interface = {
- /*.interface_name */ "ldap",
- /*.directory_open */ mod_ldap_open,
- /*.directory_close */ mod_ldap_close,
- /*.directory_query */ mod_ldap_query,
- /*.directory_next */ mod_ldap_next,
- /*.directory_next_pair */ mod_ldap_next_pair
-};
-
-
-static switch_loadable_module_interface_t ldap_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL,
- /*.api_interface */ NULL,
- /*.file_interface */ NULL,
- /*.speech_interface */ NULL,
- /*.directory_interface */ &ldap_directory_interface
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_ldap_load)
{
+ switch_directory_interface_t *dir_interface;
+
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &ldap_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ dir_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_DIRECTORY_INTERFACE);
+ dir_interface->interface_name = "ldap";
+ dir_interface->directory_open = mod_ldap_open;
+ dir_interface->directory_close = mod_ldap_close;
+ dir_interface->directory_query = mod_ldap_query;
+ dir_interface->directory_next = mod_ldap_next;
+ dir_interface->directory_next_pair = mod_ldap_next_pair;
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c Wed Jun 20 03:15:53 2007
@@ -48,6 +48,7 @@
SWITCH_MODULE_DEFINITION(mod_dingaling, mod_dingaling_load, mod_dingaling_shutdown, NULL);
static switch_memory_pool_t *module_pool = NULL;
+static switch_endpoint_interface_t *channel_endpoint_interface;
static char sub_sql[] =
"CREATE TABLE jabber_subscriptions (\n"
@@ -1590,65 +1591,6 @@
/*.receive_event */ channel_receive_event
};
-static switch_endpoint_interface_t channel_endpoint_interface = {
- /*.interface_name */ "dingaling",
- /*.io_routines */ &channel_io_routines,
- /*.event_handlers */ &channel_event_handlers,
- /*.private */ NULL,
- /*.next */ NULL
-};
-
-
-static switch_api_interface_t debug_api_interface = {
- /*.interface_name */ "dl_debug",
- /*.desc */ "DingaLing Debug",
- /*.function */ dl_debug,
- /*.syntax */ "dl_debug [true|false]",
- /*.next */ NULL
-};
-
-static switch_api_interface_t pres_api_interface = {
- /*.interface_name */ "dl_pres",
- /*.desc */ "DingaLing Presence",
- /*.function */ dl_pres,
- /*.syntax */ "dl_pres <profile_name>",
- /*.next */ &debug_api_interface
-};
-
-static switch_api_interface_t logout_api_interface = {
- /*.interface_name */ "dl_logout",
- /*.desc */ "DingaLing Logout",
- /*.function */ dl_logout,
- /*.syntax */ "dl_logout <profile_name>",
- /*.next */ &pres_api_interface
-};
-
-static switch_api_interface_t login_api_interface = {
- /*.interface_name */ "dl_login",
- /*.desc */ "DingaLing Login",
- /*.function */ dl_login,
- /*.syntax */ "dl_login <profile_name>",
- /*.next */ &logout_api_interface
-};
-
-static switch_chat_interface_t channel_chat_interface = {
- /*.name */ MDL_CHAT_PROTO,
- /*.chat_send */ chat_send,
-};
-
-static switch_loadable_module_interface_t channel_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ &channel_endpoint_interface,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL,
- /*.api_interface */ &login_api_interface,
- /*.file_interface */ NULL,
- /*.speech_interface */ NULL,
- /*.directory_interface */ NULL,
- /*.chat_interface */ &channel_chat_interface
-};
/* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
@@ -1658,7 +1600,7 @@
switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t **pool)
{
- if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
+ if ((*new_session = switch_core_session_request(channel_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt;
switch_channel_t *channel;
switch_caller_profile_t *caller_profile = NULL;
@@ -1828,11 +1770,10 @@
SWITCH_MODULE_LOAD_FUNCTION(mod_dingaling_load)
{
+ switch_chat_interface_t *chat_interface;
+ switch_api_interface_t *api_interface;
- if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "OH OH no pool\n");
- return SWITCH_STATUS_TERM;
- }
+ module_pool = pool;
load_config();
@@ -1873,7 +1814,22 @@
}
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &channel_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ channel_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE);
+ channel_endpoint_interface->interface_name = modname;
+ channel_endpoint_interface->io_routines = &channel_io_routines;
+ channel_endpoint_interface->state_handler = &channel_event_handlers;
+
+#define PRES_SYNTAX "dl_pres <profile_name>"
+#define LOGOUT_SYNTAX "dl_logout <profile_name>"
+#define LOGIN_SYNTAX "dl_login <profile_name>"
+#define DEBUG_SYNTAX "dl_debug [true|false]"
+
+ SWITCH_ADD_API(api_interface, "dl_debug", "DingaLing Debug", dl_debug, DEBUG_SYNTAX);
+ SWITCH_ADD_API(api_interface, "dl_pres", "DingaLing Presence", dl_pres, PRES_SYNTAX);
+ SWITCH_ADD_API(api_interface, "dl_logout", "DingaLing Logout", dl_logout, LOGOUT_SYNTAX);
+ SWITCH_ADD_API(api_interface, "dl_login", "DingaLing Login", dl_login, LOGIN_SYNTAX);
+ SWITCH_ADD_CHAT(chat_interface, MDL_CHAT_PROTO, chat_send);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
@@ -2059,7 +2015,7 @@
}
if (!cmd) {
- stream->write_function(stream, "USAGE: %s\n", pres_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", PRES_SYNTAX);
return SWITCH_STATUS_SUCCESS;
}
@@ -2086,7 +2042,7 @@
}
if (!cmd) {
- stream->write_function(stream, "USAGE: %s\n", logout_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", LOGOUT_SYNTAX);
return SWITCH_STATUS_SUCCESS;
}
@@ -2113,7 +2069,7 @@
}
if (switch_strlen_zero(cmd)) {
- stream->write_function(stream, "USAGE: %s\n", login_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", LOGIN_SYNTAX);
return SWITCH_STATUS_SUCCESS;
}
@@ -2122,7 +2078,7 @@
argc = switch_separate_string(myarg, ';', argv, (sizeof(argv) / sizeof(argv[0])));
if (switch_strlen_zero(cmd) || argc != 1) {
- stream->write_function(stream, "USAGE: %s\n", login_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", LOGIN_SYNTAX);
return SWITCH_STATUS_SUCCESS;
}
@@ -2603,7 +2559,7 @@
status = LDL_STATUS_FALSE;
goto done;
}
- if ((session = switch_core_session_request(&channel_endpoint_interface, NULL)) != 0) {
+ if ((session = switch_core_session_request(channel_endpoint_interface, NULL)) != 0) {
switch_core_session_add_stream(session, NULL);
Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c Wed Jun 20 03:15:53 2007
@@ -44,7 +44,7 @@
SWITCH_MODULE_DEFINITION(mod_portaudio, mod_portaudio_load, mod_portaudio_shutdown, NULL);
static switch_memory_pool_t *module_pool = NULL;
-//static int running = 1;
+static switch_endpoint_interface_t *channel_endpoint_interface;
#define SAMPLE_TYPE paInt16
//#define SAMPLE_TYPE paFloat32
@@ -734,54 +734,6 @@
return SWITCH_STATUS_SUCCESS;
}
-static switch_api_interface_t send_dtmf_interface = {
- /*.interface_name */ "padtmf",
- /*.desc */ "DEPRICATED (see 'pa')",
- /*.function */ padep,
- /*.syntax */ "DEPRICATED (see 'pa')",
- /*.next */ NULL
-};
-
-static switch_api_interface_t answer_call_interface = {
- /*.interface_name */ "paoffhook",
- /*.desc */ "DEPRICATED (see 'pa')",
- /*.function */ padep,
- /*.syntax */ "DEPRICATED (see 'pa')",
- /*.next */ &send_dtmf_interface
-};
-
-static switch_api_interface_t channel_info_interface = {
- /*.interface_name */ "painfo",
- /*.desc */ "DEPRICATED (see 'pa')",
- /*.function */ padep,
- /*.syntax */ "DEPRICATED (see 'pa')",
- /*.next */ &answer_call_interface
-};
-
-static switch_api_interface_t channel_hup_interface = {
- /*.interface_name */ "pahup",
- /*.desc */ "DEPRICATED (see 'pa')",
- /*.function */ padep,
- /*.syntax */ "DEPRICATED (see 'pa')",
- /*.next */ &channel_info_interface
-};
-
-static switch_api_interface_t channel_call_interface = {
- /*.interface_name */ "pacall",
- /*.desc */ "DEPRICATED (see 'pa')",
- /*.function */ padep,
- /*.syntax */ "DEPRICATED (see 'pa')",
- /*.next */ &channel_hup_interface
-};
-
-static switch_api_interface_t channel_api_interface = {
- /*.interface_name */ "pa",
- /*.desc */ "PortAudio",
- /*.function */ pa_cmd,
- /*.syntax */ "<command> [<args>]",
- /*.next */ &channel_call_interface
-};
-
static switch_state_handler_table_t channel_event_handlers = {
/*.on_init */ channel_on_init,
/*.on_ring */ channel_on_ring,
@@ -802,24 +754,6 @@
/*.receive_message */ channel_receive_message
};
-static switch_endpoint_interface_t channel_endpoint_interface = {
- /*.interface_name */ "portaudio",
- /*.io_routines */ &channel_io_routines,
- /*.event_handlers */ &channel_event_handlers,
- /*.private */ NULL,
- /*.next */ NULL
-};
-
-static switch_loadable_module_interface_t channel_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ &channel_endpoint_interface,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL,
- /*.api_interface */ &channel_api_interface
-};
-
/* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
@@ -828,7 +762,7 @@
switch_core_session_t **new_session, switch_memory_pool_t **pool)
{
- if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
+ if ((*new_session = switch_core_session_request(channel_endpoint_interface, pool)) != 0) {
private_t *tech_pvt;
switch_channel_t *channel;
switch_caller_profile_t *caller_profile;
@@ -876,13 +810,10 @@
SWITCH_MODULE_LOAD_FUNCTION(mod_portaudio_load)
{
-
switch_status_t status;
+ switch_api_interface_t *api_interface;
- if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
- return SWITCH_STATUS_TERM;
- }
+ module_pool = pool;
Pa_Initialize();
@@ -921,7 +852,13 @@
switch_set_flag((&globals.cng_frame), SFF_CNG);
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &channel_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ channel_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE);
+ channel_endpoint_interface->interface_name = modname;
+ channel_endpoint_interface->io_routines = &channel_io_routines;
+ channel_endpoint_interface->state_handler = &channel_event_handlers;
+
+ SWITCH_ADD_API(api_interface, "pa", "PortAudio", pa_cmd, "<command> [<args>]");
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
@@ -1639,7 +1576,7 @@
}
dest = argv[0];
- if ((session = switch_core_session_request(&channel_endpoint_interface, NULL)) != 0) {
+ if ((session = switch_core_session_request(channel_endpoint_interface, NULL)) != 0) {
private_t *tech_pvt;
switch_channel_t *channel;
char *dialplan = globals.dialplan;
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Wed Jun 20 03:15:53 2007
@@ -43,7 +43,7 @@
SWITCH_MODULE_DEFINITION(mod_sofia, mod_sofia_load, mod_sofia_shutdown, NULL);
struct mod_sofia_globals mod_sofia_globals;
-switch_endpoint_interface_t sofia_endpoint_interface;
+switch_endpoint_interface_t *sofia_endpoint_interface;
static switch_frame_t silence_frame = { 0 };
static char silence_data[13] = "";
@@ -1288,56 +1288,11 @@
/*.on_transmit */ sofia_on_transmit
};
-switch_endpoint_interface_t sofia_endpoint_interface = {
- /*.interface_name */ "sofia",
- /*.io_routines */ &sofia_io_routines,
- /*.event_handlers */ &sofia_event_handlers,
- /*.private */ NULL,
- /*.next */ NULL
-};
-
-static switch_chat_interface_t sofia_chat_interface = {
- /*.name */ SOFIA_CHAT_PROTO,
- /*.sofia_presence_chat_send */ sofia_presence_chat_send,
-
-};
-
static switch_status_t sofia_manage(char *relative_oid, switch_management_action_t action, char *data, switch_size_t datalen)
{
return SWITCH_STATUS_SUCCESS;
}
-static switch_management_interface_t sofia_management_interface = {
- /*.relative_oid */ "1",
- /*.management_function */ sofia_manage
-};
-
-static switch_api_interface_t sofia_api_interface = {
- /*.interface_name */ "sofia",
- /*.desc */ "Sofia Controls",
- /*.function */ sofia_function,
- /*.syntax */ "<cmd> <args>",
- /*.next */ NULL
-};
-
-static switch_loadable_module_interface_t sofia_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ &sofia_endpoint_interface,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL,
- /*.api_interface */ &sofia_api_interface,
- /*.file_interface */ NULL,
- /*.speech_interface */ NULL,
- /*.directory_interface */ NULL,
- /*.chat_interface */ &sofia_chat_interface,
- /*.say_interface */ NULL,
- /*.asr_interface */ NULL,
- /*.management_interface */ &sofia_management_interface
-};
-
-
static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session,
switch_caller_profile_t *outbound_profile, switch_core_session_t **new_session,
@@ -1354,7 +1309,7 @@
*new_session = NULL;
- if (!(nsession = switch_core_session_request(&sofia_endpoint_interface, pool))) {
+ if (!(nsession = switch_core_session_request(sofia_endpoint_interface, pool))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Error Creating Session\n");
goto done;
}
@@ -1503,6 +1458,9 @@
SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load)
{
+ switch_chat_interface_t *chat_interface;
+ switch_api_interface_t *api_interface;
+ switch_management_interface_t *management_interface;
silence_frame.data = silence_data;
silence_frame.datalen = sizeof(silence_data);
@@ -1510,10 +1468,7 @@
silence_frame.flags = SFF_CNG;
- if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
- return SWITCH_STATUS_TERM;
- }
+ module_pool = pool;
memset(&mod_sofia_globals, 0, sizeof(mod_sofia_globals));
switch_mutex_init(&mod_sofia_globals.mutex, SWITCH_MUTEX_NESTED, module_pool);
@@ -1536,43 +1491,54 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Waiting for profiles to start\n");
switch_yield(1500000);
- if (switch_event_bind((char *) modname, SWITCH_EVENT_CUSTOM, MULTICAST_EVENT, event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
+ if (switch_event_bind(modname, SWITCH_EVENT_CUSTOM, MULTICAST_EVENT, event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
return SWITCH_STATUS_TERM;
}
- if (switch_event_bind((char *) modname, SWITCH_EVENT_PRESENCE_IN, SWITCH_EVENT_SUBCLASS_ANY, sofia_presence_event_handler, NULL)
+ if (switch_event_bind(modname, SWITCH_EVENT_PRESENCE_IN, SWITCH_EVENT_SUBCLASS_ANY, sofia_presence_event_handler, NULL)
!= SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
return SWITCH_STATUS_GENERR;
}
- if (switch_event_bind((char *) modname, SWITCH_EVENT_PRESENCE_OUT, SWITCH_EVENT_SUBCLASS_ANY, sofia_presence_event_handler, NULL)
+ if (switch_event_bind(modname, SWITCH_EVENT_PRESENCE_OUT, SWITCH_EVENT_SUBCLASS_ANY, sofia_presence_event_handler, NULL)
!= SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
return SWITCH_STATUS_GENERR;
}
- if (switch_event_bind((char *) modname, SWITCH_EVENT_PRESENCE_PROBE, SWITCH_EVENT_SUBCLASS_ANY, sofia_presence_event_handler, NULL)
+ if (switch_event_bind(modname, SWITCH_EVENT_PRESENCE_PROBE, SWITCH_EVENT_SUBCLASS_ANY, sofia_presence_event_handler, NULL)
!= SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
return SWITCH_STATUS_GENERR;
}
- if (switch_event_bind((char *) modname, SWITCH_EVENT_ROSTER, SWITCH_EVENT_SUBCLASS_ANY, sofia_presence_event_handler, NULL)
+ if (switch_event_bind(modname, SWITCH_EVENT_ROSTER, SWITCH_EVENT_SUBCLASS_ANY, sofia_presence_event_handler, NULL)
!= SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
return SWITCH_STATUS_GENERR;
}
- if (switch_event_bind((char *) modname, SWITCH_EVENT_MESSAGE_WAITING, SWITCH_EVENT_SUBCLASS_ANY, sofia_presence_mwi_event_handler, NULL)
+ if (switch_event_bind(modname, SWITCH_EVENT_MESSAGE_WAITING, SWITCH_EVENT_SUBCLASS_ANY, sofia_presence_mwi_event_handler, NULL)
!= SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
return SWITCH_STATUS_GENERR;
}
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &sofia_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ sofia_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE);
+ sofia_endpoint_interface->interface_name = modname;
+ sofia_endpoint_interface->io_routines = &sofia_io_routines;
+ sofia_endpoint_interface->state_handler = &sofia_event_handlers;
+
+ management_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_MANAGEMENT_INTERFACE);
+ management_interface->relative_oid = "1";
+ management_interface->management_function = sofia_manage;
+
+ SWITCH_ADD_API(api_interface, "sofia", "Sofia Controls", sofia_function, "<cmd> <args>");
+ SWITCH_ADD_CHAT(chat_interface, SOFIA_CHAT_PROTO, sofia_presence_chat_send);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h Wed Jun 20 03:15:53 2007
@@ -465,7 +465,7 @@
void sofia_glue_do_xfer_invite(switch_core_session_t *session);
uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_handle_t *nh, sip_t const *sip,
sofia_regtype_t regtype, char *key, uint32_t keylen, switch_event_t **v_event);
-extern switch_endpoint_interface_t sofia_endpoint_interface;
+extern switch_endpoint_interface_t *sofia_endpoint_interface;
void sofia_presence_set_chat_hash(private_object_t *tech_pvt, sip_t const *sip);
switch_status_t sofia_on_hangup(switch_core_session_t *session);
char *sofia_glue_get_url_from_contact(char *buf, uint8_t to_dup);
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Wed Jun 20 03:15:53 2007
@@ -1771,7 +1771,7 @@
is_auth++;
}
- if (!(session = switch_core_session_request(&sofia_endpoint_interface, NULL))) {
+ if (!(session = switch_core_session_request(sofia_endpoint_interface, NULL))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Session Alloc Failed!\n");
nua_respond(nh, SIP_503_SERVICE_UNAVAILABLE, TAG_END());
return;
Modified: freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c Wed Jun 20 03:15:53 2007
@@ -54,6 +54,7 @@
SWITCH_MODULE_DEFINITION(mod_woomera, mod_woomera_load, mod_woomera_shutdown, mod_woomera_runtime);
static switch_memory_pool_t *module_pool = NULL;
+static switch_endpoint_interface_t *woomera_endpoint_interface;
#define STRLEN 15
#define FRAME_LEN 480
@@ -459,24 +460,6 @@
/*.waitfor_write */ woomera_waitfor_write
};
-static switch_endpoint_interface_t woomera_endpoint_interface = {
- /*.interface_name */ "woomera",
- /*.io_routines */ &woomera_io_routines,
- /*.event_handlers */ &woomera_event_handlers,
- /*.private */ NULL,
- /*.next */ NULL
-};
-
-static switch_loadable_module_interface_t woomera_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ &woomera_endpoint_interface,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL
-};
-
-
/* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
@@ -484,7 +467,7 @@
switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t **pool)
{
- if ((*new_session = switch_core_session_request(&woomera_endpoint_interface, pool)) != 0) {
+ if ((*new_session = switch_core_session_request(woomera_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt;
switch_channel_t *channel;
@@ -1226,7 +1209,7 @@
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "New Inbound Channel %s!\n", name);
- if ((session = switch_core_session_request(&woomera_endpoint_interface, NULL)) != 0) {
+ if ((session = switch_core_session_request(woomera_endpoint_interface, NULL)) != 0) {
struct private_object *tech_pvt;
switch_channel_t *channel;
@@ -1294,9 +1277,9 @@
return SWITCH_STATUS_SUCCESS;
}
+
SWITCH_MODULE_LOAD_FUNCTION(mod_woomera_load)
{
-
struct woomera_profile *profile = &default_profile;
char *cf = "woomera.conf";
switch_xml_t cfg, xml, settings, param, xmlp;
@@ -1360,27 +1343,19 @@
switch_xml_free(xml);
-
- if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
- //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "OH OH no pool\n");
-
- if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
- //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "OH OH no pool\n");
- return SWITCH_STATUS_MEMERR;
- }
- return SWITCH_STATUS_MEMERR;
- }
-
-
+ module_pool = pool;
if (switch_mutex_init(&default_profile.iolock, SWITCH_MUTEX_NESTED, module_pool) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "OH OH no lock\n");
return SWITCH_STATUS_TERM;
}
-
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &woomera_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ woomera_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE);
+ woomera_endpoint_interface->interface_name = modname;
+ woomera_endpoint_interface->io_routines = &woomera_io_routines;
+ woomera_endpoint_interface->state_handler = &woomera_event_handlers;
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/switch_event.c
==============================================================================
--- freeswitch/trunk/src/switch_event.c (original)
+++ freeswitch/trunk/src/switch_event.c Wed Jun 20 03:15:53 2007
@@ -870,7 +870,7 @@
return SWITCH_STATUS_SUCCESS;
}
-SWITCH_DECLARE(switch_status_t) switch_event_bind(char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback,
+SWITCH_DECLARE(switch_status_t) switch_event_bind(const char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback,
void *user_data)
{
switch_event_node_t *event_node;
1
0
[commit] r5402 - in freeswitch/trunk/src: include mod/applications/mod_enum mod/dialplans/mod_dialplan_directory mod/dialplans/mod_dialplan_xml
by Freeswitch SVN 20 Jun '07
by Freeswitch SVN 20 Jun '07
20 Jun '07
Author: mikej
Date: Wed Jun 20 02:14:57 2007
New Revision: 5402
Modified:
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c
freeswitch/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c
freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
Log:
add dialplan interfaces to new module loader, add dialplan function helper macro.
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Wed Jun 20 02:14:57 2007
@@ -1040,6 +1040,8 @@
typedef void (*switch_event_callback_t) (switch_event_t *);
typedef switch_caller_extension_t *(*switch_dialplan_hunt_function_t) (switch_core_session_t *, void *, switch_caller_profile_t *);
+#define SWITCH_STANDARD_DIALPLAN(name) static switch_caller_extension_t * name (switch_core_session_t *session, void *arg, switch_caller_profile_t *caller_profile)
+
typedef struct switch_scheduler_task switch_scheduler_task_t;
Modified: freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c Wed Jun 20 02:14:57 2007
@@ -514,7 +514,7 @@
}
-static switch_caller_extension_t *enum_dialplan_hunt(switch_core_session_t *session, void *arg, switch_caller_profile_t *caller_profile)
+SWITCH_STANDARD_DIALPLAN(enum_dialplan_hunt)
{
switch_caller_extension_t *extension = NULL;
enum_record_t *results, *rp;
Modified: freeswitch/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c
==============================================================================
--- freeswitch/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c (original)
+++ freeswitch/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c Wed Jun 20 02:14:57 2007
@@ -83,7 +83,7 @@
switch_xml_free(xml);
}
-static switch_caller_extension_t *directory_dialplan_hunt(switch_core_session_t *session, void *arg, switch_caller_profile_t *caller_profile)
+SWITCH_STANDARD_DIALPLAN(directory_dialplan_hunt)
{
switch_caller_extension_t *extension = NULL;
switch_channel_t *channel;
@@ -151,27 +151,14 @@
}
-static switch_dialplan_interface_t directory_dialplan_interface = {
- /*.interface_name = */ "directory",
- /*.hunt_function = */ directory_dialplan_hunt
- /*.next = NULL */
-};
-
-static switch_loadable_module_interface_t directory_dialplan_module_interface = {
- /*.module_name = */ modname,
- /*.endpoint_interface = */ NULL,
- /*.timer_interface = */ NULL,
- /*.dialplan_interface = */ &directory_dialplan_interface,
- /*.codec_interface = */ NULL,
- /*.application_interface = */ NULL
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_dialplan_directory_load)
{
+ switch_dialplan_interface_t *dp_interface;
load_config();
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &directory_dialplan_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_DIALPLAN(dp_interface, "directory", directory_dialplan_hunt);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
==============================================================================
--- freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c (original)
+++ freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c Wed Jun 20 02:14:57 2007
@@ -292,7 +292,7 @@
return status;
}
-static switch_caller_extension_t *dialplan_hunt(switch_core_session_t *session, void *arg, switch_caller_profile_t *caller_profile)
+SWITCH_STANDARD_DIALPLAN(dialplan_hunt)
{
switch_caller_extension_t *extension = NULL;
switch_channel_t *channel;
@@ -377,27 +377,13 @@
return extension;
}
-
-static switch_dialplan_interface_t dialplan_interface = {
- /*.interface_name = */ "XML",
- /*.hunt_function = */ dialplan_hunt
- /*.next = NULL */
-};
-
-static switch_loadable_module_interface_t dialplan_module_interface = {
- /*.module_name = */ modname,
- /*.endpoint_interface = */ NULL,
- /*.timer_interface = */ NULL,
- /*.dialplan_interface = */ &dialplan_interface,
- /*.codec_interface = */ NULL,
- /*.application_interface = */ NULL
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_dialplan_xml_load)
{
+ switch_dialplan_interface_t *dp_interface;
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &dialplan_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_DIALPLAN(dp_interface, "XML", dialplan_hunt);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
1
0
[commit] r5401 - in freeswitch/trunk/src: include mod/applications/mod_enum mod/applications/mod_esf mod/applications/mod_rss
by Freeswitch SVN 20 Jun '07
by Freeswitch SVN 20 Jun '07
20 Jun '07
Author: mikej
Date: Wed Jun 20 02:05:31 2007
New Revision: 5401
Modified:
freeswitch/trunk/src/include/switch_loadable_module.h
freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c
freeswitch/trunk/src/mod/applications/mod_esf/mod_esf.c
freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c
Log:
add remaining apps to new mod loader macros.
Modified: freeswitch/trunk/src/include/switch_loadable_module.h
==============================================================================
--- freeswitch/trunk/src/include/switch_loadable_module.h (original)
+++ freeswitch/trunk/src/include/switch_loadable_module.h Wed Jun 20 02:05:31 2007
@@ -295,6 +295,14 @@
break; \
}
+#define SWITCH_ADD_DIALPLAN(dp_int, int_name, funcptr) \
+ for (;;) { \
+ dp_int = switch_loadable_module_create_interface(*module_interface, SWITCH_DIALPLAN_INTERFACE); \
+ dp_int->hunt_function = funcptr; \
+ dp_int->interface_name = int_name; \
+ break; \
+ }
+
///\}
SWITCH_END_EXTERN_C
Modified: freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c Wed Jun 20 02:05:31 2007
@@ -111,13 +111,6 @@
switch_xml_t cfg, xml = NULL, param, settings, route, routes;
switch_status_t status = SWITCH_STATUS_SUCCESS;
- memset(&globals, 0, sizeof(globals));
- if (switch_core_new_memory_pool(&globals.pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
- status = SWITCH_STATUS_TERM;
- goto done;
- }
-
switch_core_hash_init(&globals.routes, globals.pool);
if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
@@ -564,7 +557,7 @@
}
-static void enum_app_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(enum_app_function)
{
int argc = 0;
char *argv[4] = { 0 };
@@ -685,54 +678,26 @@
}
-static switch_dialplan_interface_t enum_dialplan_interface = {
- /*.interface_name = */ "enum",
- /*.hunt_function = */ enum_dialplan_hunt
- /*.next = NULL */
-};
-
-static switch_application_interface_t enum_application_interface = {
- /*.interface_name */ "enum",
- /*.application_function */ enum_app_function,
- /* long_desc */ "Perform an ENUM lookup",
- /* short_desc */ "Perform an ENUM lookup",
- /* syntax */ "<number> [<root>]",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ NULL
-};
-
-static switch_api_interface_t enum_api_interface = {
- /*.interface_name */ "enum",
- /*.desc */ "ENUM",
- /*.function */ enum_function,
- /*.syntax */ "",
- /*.next */ NULL
-};
-
-static switch_loadable_module_interface_t enum_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ &enum_dialplan_interface,
- /*.codec_interface */ NULL,
- /*.application_interface */ &enum_application_interface,
- /*.api_interface */ &enum_api_interface,
- /*.file_interface */ NULL,
- /*.speech_interface */ NULL,
- /*.directory_interface */ NULL
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_enum_load)
{
+ switch_api_interface_t *api_interface;
+ switch_application_interface_t *app_interface;
+ switch_dialplan_interface_t *dp_interface;
if (dns_init(0) < 0) {
return SWITCH_STATUS_FALSE;
}
+ memset(&globals, 0, sizeof(globals));
+ globals.pool = pool;
+
load_config();
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &enum_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_API(api_interface, "enum", "ENUM", enum_function, "");
+ SWITCH_ADD_APP(app_interface, "enum", "Perform an ENUM lookup", "Perform an ENUM lookup", enum_app_function, "<number> [<root>]", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_DIALPLAN(dp_interface, "enum", enum_dialplan_hunt);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/trunk/src/mod/applications/mod_esf/mod_esf.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_esf/mod_esf.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_esf/mod_esf.c Wed Jun 20 02:05:31 2007
@@ -54,7 +54,7 @@
SEND_TYPE_NOMEDIA = 3
} ls_how_t;
-static void bcast_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(bcast_function)
{
switch_channel_t *channel;
switch_socket_t *socket;
@@ -228,36 +228,18 @@
}
-static switch_application_interface_t bcast_application_interface = {
- /*.interface_name */ "esf_ls_page_group",
- /*.application_function */ bcast_function,
- NULL, NULL, NULL,
- /* flags */ SAF_NONE,
- /*.next */ NULL
-};
-
-static switch_loadable_module_interface_t mod_ivrtest_module_interface = {
- /*.module_name = */ modname,
- /*.endpoint_interface = */ NULL,
- /*.timer_interface = */ NULL,
- /*.dialplan_interface = */ NULL,
- /*.codec_interface = */ NULL,
- /*.application_interface */ &bcast_application_interface
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_esf_load)
{
+ switch_application_interface_t *app_interface;
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &mod_ivrtest_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_APP(app_interface, "esf_ls_page_group", NULL, NULL, bcast_function, NULL, SAF_NONE);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
-
-//switch_status_t switch_module_runtime(void)
-
/* For Emacs:
* Local Variables:
* mode:c
Modified: freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c Wed Jun 20 02:05:31 2007
@@ -152,7 +152,7 @@
return SWITCH_STATUS_SUCCESS;
}
-static void rss_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(rss_function)
{
switch_channel_t *channel;
switch_status_t status;
@@ -613,33 +613,14 @@
switch_core_session_reset(session);
}
-static switch_application_interface_t rss_application_interface = {
- /*.interface_name */ "rss",
- /*.application_function */ rss_function,
- NULL, NULL, NULL,
- /* flags */ SAF_NONE,
- /*.next */ NULL
-};
-
-
-static switch_loadable_module_interface_t rss_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ &rss_application_interface,
- /*.api_interface */ NULL,
- /*.file_interface */ NULL,
- /*.speech_interface */ NULL,
- /*.directory_interface */ NULL
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_rss_load)
{
+ switch_application_interface_t *app_interface;
+
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &rss_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_APP(app_interface, "rss", NULL, NULL, rss_function, NULL, SAF_NONE);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
1
0
[commit] r5400 - in freeswitch/trunk/src: include mod/applications/mod_conference mod/applications/mod_dptools
by Freeswitch SVN 20 Jun '07
by Freeswitch SVN 20 Jun '07
20 Jun '07
Author: mikej
Date: Wed Jun 20 01:39:50 2007
New Revision: 5400
Modified:
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
Log:
add SWITCH_STANDARD_APP helper macro
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Wed Jun 20 01:39:50 2007
@@ -1034,7 +1034,10 @@
typedef struct switch_core_port_allocator switch_core_port_allocator_t;
typedef struct switch_media_bug switch_media_bug_t;
typedef switch_bool_t (*switch_media_bug_callback_t) (switch_media_bug_t *, void *, switch_abc_type_t);
+
typedef void (*switch_application_function_t) (switch_core_session_t *, char *);
+#define SWITCH_STANDARD_APP(name) static void name (switch_core_session_t *session, char *data)
+
typedef void (*switch_event_callback_t) (switch_event_t *);
typedef switch_caller_extension_t *(*switch_dialplan_hunt_function_t) (switch_core_session_t *, void *, switch_caller_profile_t *);
Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c Wed Jun 20 01:39:50 2007
@@ -307,7 +307,7 @@
static switch_status_t conference_outcall_bg(conference_obj_t * conference,
char *conference_name,
switch_core_session_t *session, char *bridgeto, uint32_t timeout, char *flags, char *cid_name, char *cid_num);
-static void conference_function(switch_core_session_t *session, char *data);
+SWITCH_STANDARD_APP(conference_function);
static void launch_conference_thread(conference_obj_t * conference);
static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t * thread, void *obj);
static switch_status_t conference_local_play_file(conference_obj_t * conference,
@@ -3855,7 +3855,7 @@
}
-static void conference_auto_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(conference_auto_function)
{
switch_channel_t *channel = NULL;
call_list_t *call_list, *np;
@@ -3890,7 +3890,7 @@
}
/* Application interface function that is called from the dialplan to join the channel to a conference */
-static void conference_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(conference_function)
{
switch_codec_t *read_codec = NULL;
uint32_t flags = 0;
Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c Wed Jun 20 01:39:50 2007
@@ -38,7 +38,7 @@
SWITCH_MODULE_DEFINITION(mod_dptools, mod_dptools_load, NULL, NULL);
#define DETECT_SPEECH_SYNTAX "<mod_name> <gram_name> <gram_path> [<addr>] OR grammar <gram_name> [<path>] OR pause OR resume"
-static void detect_speech_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(detect_speech_function)
{
char *argv[4];
int argc;
@@ -66,7 +66,7 @@
}
#define EXE_SYNTAX "<extension> <dialplan> <context>"
-static void exe_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(exe_function)
{
char *argv[4];
int argc;
@@ -86,7 +86,7 @@
}
}
-static void ring_ready_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(ring_ready_function)
{
switch_channel_t *channel;
channel = switch_core_session_get_channel(session);
@@ -94,7 +94,7 @@
switch_channel_ring_ready(channel);
}
-static void queue_dtmf_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(queue_dtmf_function)
{
switch_channel_t *channel;
if (!switch_strlen_zero(data)) {
@@ -104,7 +104,7 @@
}
}
-static void transfer_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(transfer_function)
{
int argc;
char *argv[4] = { 0 };
@@ -119,7 +119,7 @@
}
}
-static void sched_transfer_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(sched_transfer_function)
{
int argc;
char *argv[4] = { 0 };
@@ -142,7 +142,7 @@
}
}
-static void sched_hangup_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(sched_hangup_function)
{
int argc;
char *argv[5] = { 0 };
@@ -176,7 +176,7 @@
}
-static void sched_broadcast_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(sched_broadcast_function)
{
int argc;
char *argv[6] = { 0 };
@@ -212,7 +212,7 @@
}
}
-static void sleep_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(sleep_function)
{
if (switch_strlen_zero(data)) {
@@ -223,12 +223,12 @@
}
}
-static void eval_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(eval_function)
{
return;
}
-static void phrase_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(phrase_function)
{
switch_channel_t *channel;
char *mydata = NULL;
@@ -254,7 +254,7 @@
}
-static void hangup_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(hangup_function)
{
switch_channel_t *channel;
switch_call_cause_t cause = SWITCH_CAUSE_NORMAL_CLEARING;
@@ -269,7 +269,7 @@
switch_channel_hangup(channel, cause);
}
-static void answer_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(answer_function)
{
switch_channel_t *channel;
channel = switch_core_session_get_channel(session);
@@ -278,7 +278,7 @@
switch_channel_answer(channel);
}
-static void pre_answer_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(pre_answer_function)
{
switch_channel_t *channel;
channel = switch_core_session_get_channel(session);
@@ -287,7 +287,7 @@
switch_channel_pre_answer(channel);
}
-static void redirect_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(redirect_function)
{
switch_core_session_message_t msg = { 0 };
@@ -299,7 +299,7 @@
}
-static void reject_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(reject_function)
{
switch_core_session_message_t msg = { 0 };
@@ -312,7 +312,7 @@
}
-static void set_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(set_function)
{
switch_channel_t *channel;
char *var, *val = NULL;
@@ -338,7 +338,7 @@
}
}
-static void export_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(export_function)
{
switch_channel_t *channel;
char *exports, *new_exports = NULL, *new_exports_d = NULL, *var, *val = NULL, *var_name = NULL;
@@ -386,7 +386,7 @@
}
}
-static void unset_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(unset_function)
{
switch_channel_t *channel;
@@ -401,7 +401,7 @@
}
}
-static void log_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(log_function)
{
switch_channel_t *channel;
char *level, *log_str;
@@ -425,7 +425,7 @@
}
-static void info_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(info_function)
{
switch_channel_t *channel;
switch_event_t *event;
@@ -443,7 +443,7 @@
}
-static void privacy_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(privacy_function)
{
switch_channel_t *channel;
switch_caller_profile_t *caller_profile;
@@ -479,7 +479,7 @@
}
}
-static void strftime_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(strftime_function)
{
char *argv[2];
int argc;
@@ -606,7 +606,7 @@
}
#endif
-static void ivr_application_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(ivr_application_function)
{
switch_channel_t *channel = switch_core_session_get_channel(session);
char *params;
@@ -650,29 +650,29 @@
}
-static void dtmf_session_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(dtmf_session_function)
{
switch_ivr_inband_dtmf_session(session);
}
-static void stop_dtmf_session_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(stop_dtmf_session_function)
{
switch_ivr_stop_inband_dtmf_session(session);
}
-static void fax_detect_session_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(fax_detect_session_function)
{
switch_ivr_tone_detect_session(session, "fax", "1100.0", "r", 0, NULL, NULL);
}
-static void system_session_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(system_session_function)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Executing command: %s\n",data);
system(data);
}
-static void tone_detect_session_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(tone_detect_session_function)
{
char *argv[6] = { 0 };
int argc;
@@ -704,13 +704,13 @@
switch_ivr_tone_detect_session(session, argv[0], argv[1], argv[2], to, argv[4], argv[5]);
}
-static void stop_fax_detect_session_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(stop_fax_detect_session_function)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Disabling tone detection\n");
switch_ivr_stop_tone_detect_session(session);
}
-static void echo_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(echo_function)
{
switch_channel_t *channel;
@@ -722,7 +722,7 @@
switch_channel_set_state(channel, CS_LOOPBACK);
}
-static void park_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(park_function)
{
switch_ivr_park(session, NULL);
@@ -758,7 +758,7 @@
}
-static void speak_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(speak_function)
{
switch_channel_t *channel;
char buf[10];
@@ -807,7 +807,7 @@
}
-static void playback_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(playback_function)
{
switch_channel_t *channel;
char *file_name = NULL;
@@ -825,7 +825,7 @@
}
-static void gentones_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(gentones_function)
{
switch_channel_t *channel;
char *tone_script = NULL;
@@ -854,7 +854,7 @@
}
-static void displace_session_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(displace_session_function)
{
switch_channel_t *channel;
char *path = NULL;
@@ -882,7 +882,7 @@
}
-static void stop_displace_session_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(stop_displace_session_function)
{
switch_channel_t *channel;
channel = switch_core_session_get_channel(session);
@@ -892,7 +892,7 @@
}
-static void record_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(record_function)
{
switch_channel_t *channel;
switch_status_t status;
@@ -924,7 +924,7 @@
}
-static void record_session_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(record_session_function)
{
switch_channel_t *channel;
char *p, *path = NULL;
@@ -948,7 +948,7 @@
}
-static void stop_record_session_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(stop_record_session_function)
{
switch_channel_t *channel;
channel = switch_core_session_get_channel(session);
@@ -961,7 +961,7 @@
/* Bridge Functions */
/********************************************************************************/
-static void audio_bridge_function(switch_core_session_t *session, char *data)
+SWITCH_STANDARD_APP(audio_bridge_function)
{
switch_channel_t *caller_channel;
switch_core_session_t *peer_session = NULL;
1
0
20 Jun '07
Author: mikej
Date: Wed Jun 20 01:15:07 2007
New Revision: 5399
Modified:
freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
Log:
move mod_dptools to use new module loader interfaces.
Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c Wed Jun 20 01:15:07 2007
@@ -37,9 +37,7 @@
SWITCH_MODULE_LOAD_FUNCTION(mod_dptools_load);
SWITCH_MODULE_DEFINITION(mod_dptools, mod_dptools_load, NULL, NULL);
-static switch_application_interface_t detect_speech_application_interface;
-static switch_application_interface_t exe_application_interface;
-
+#define DETECT_SPEECH_SYNTAX "<mod_name> <gram_name> <gram_path> [<addr>] OR grammar <gram_name> [<path>] OR pause OR resume"
static void detect_speech_function(switch_core_session_t *session, char *data)
{
char *argv[4];
@@ -62,11 +60,12 @@
switch_ivr_detect_speech(session, argv[0], argv[1], argv[2], argv[3], NULL);
}
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", detect_speech_application_interface.syntax);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", DETECT_SPEECH_SYNTAX);
}
}
+#define EXE_SYNTAX "<extension> <dialplan> <context>"
static void exe_function(switch_core_session_t *session, char *data)
{
char *argv[4];
@@ -83,7 +82,7 @@
context = argv[2];
switch_core_session_execute_exten(session, extension, dialplan, context);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", exe_application_interface.syntax);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", EXE_SYNTAX);
}
}
@@ -651,7 +650,7 @@
}
-static void dtm_session_function(switch_core_session_t *session, char *data)
+static void dtmf_session_function(switch_core_session_t *session, char *data)
{
switch_ivr_inband_dtmf_session(session);
}
@@ -1046,470 +1045,73 @@
}
}
-static switch_api_interface_t strepoch_api_interface = {
- /*.interface_name */ "strepoch",
- /*.desc */ "Convert a date string into epoch time",
- /*.function */ strepoch_api_function,
- /*.syntax */ "<string>",
- /*.next */ NULL
-};
-
-static switch_api_interface_t chat_api_interface = {
- /*.interface_name */ "chat",
- /*.desc */ "chat",
- /*.function */ chat_api_function,
- /*.syntax */ "<proto>|<from>|<to>|<message>",
- /*.next */ &strepoch_api_interface
-};
-
-static switch_api_interface_t dptools_api_interface = {
- /*.interface_name */ "strftime",
- /*.desc */ "strftime",
- /*.function */ strftime_api_function,
- /*.syntax */ "<format_string>",
- /*.next */ &chat_api_interface
-};
-
-static switch_api_interface_t presence_api_interface = {
- /*.interface_name */ "presence",
- /*.desc */ "presence",
- /*.function */ presence_api_function,
- /*.syntax */ "<user> <rpid> <message>",
- /*.next */ &dptools_api_interface
-};
-
-static switch_application_interface_t system_application_interface = {
- /*.interface_name */ "system",
- /*.application_function */ system_session_function,
- /* long_desc */ "Execute a system command",
- /* short_desc */ "Execute a system command",
- /* syntax */ "<command>",
- /* flags */ SAF_NONE,
- /*.next */ NULL
-};
-
-static switch_application_interface_t bridge_application_interface = {
- /*.interface_name */ "bridge",
- /*.application_function */ audio_bridge_function,
- /* long_desc */ "Bridge the audio between two sessions",
- /* short_desc */ "Bridge Audio",
- /* syntax */ "<channel_url>",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /* next */ &system_application_interface
-};
-
-static switch_application_interface_t speak_application_interface = {
- /*.interface_name */ "speak",
- /*.application_function */ speak_function,
- /* long_desc */ "Speak text to a channel via the tts interface",
- /* short_desc */ "Speak text",
- /* syntax */ "<engine>|<voice>|<text>",
- /* flags */ SAF_NONE,
- &bridge_application_interface
-};
-
-static switch_application_interface_t displace_application_interface = {
- /*.interface_name */ "displace_session",
- /*.application_function */ displace_session_function,
- /* long_desc */ "Displace audio from a file to the channels input",
- /* short_desc */ "Displace File",
- /* syntax */ "<path> [+time_limit_ms] [mux]",
- /* flags */ SAF_NONE,
- &speak_application_interface
-};
-
-static switch_application_interface_t stop_displace_application_interface = {
- /*.interface_name */ "stop_displace_session",
- /*.application_function */ stop_displace_session_function,
- /* long_desc */ "Stop Displacing to a file",
- /* short_desc */ "Stop Displace File",
- /* syntax */ "<path>",
- /* flags */ SAF_NONE,
- &displace_application_interface
-};
-
-static switch_application_interface_t record_application_interface = {
- /*.interface_name */ "record",
- /*.application_function */ record_function,
- /* long_desc */ "Record a file from the channels input",
- /* short_desc */ "Record File",
- /* syntax */ "<path> [+time_limit_ms]",
- /* flags */ SAF_NONE,
- &stop_displace_application_interface
-};
-
-
-static switch_application_interface_t record_session_application_interface = {
- /*.interface_name */ "record_session",
- /*.application_function */ record_session_function,
- /* long_desc */ "Starts a background recording of the entire session",
- /* short_desc */ "Record Session",
- /* syntax */ "<path>",
- /* flags */ SAF_NONE,
- &record_application_interface
-};
-
-
-static switch_application_interface_t stop_record_session_application_interface = {
- /*.interface_name */ "stop_record_session",
- /*.application_function */ stop_record_session_function,
- /* long_desc */ "Stops a background recording of the entire session",
- /* short_desc */ "Stop Record Session",
- /* syntax */ "<path>",
- /* flags */ SAF_NONE,
- &record_session_application_interface
-};
-
-static switch_application_interface_t playback_application_interface = {
- /*.interface_name */ "playback",
- /*.application_function */ playback_function,
- /* long_desc */ "Playback a file to the channel",
- /* short_desc */ "Playback File",
- /* syntax */ "<path>",
- /* flags */ SAF_NONE,
- /*.next */ &stop_record_session_application_interface
-};
-
-static switch_application_interface_t gentones_application_interface = {
- /*.interface_name */ "gentones",
- /*.application_function */ gentones_function,
- /* long_desc */ "Generate tones to the channel",
- /* short_desc */ "Generate Tones",
- /* syntax */ "<tgml_script>[|<loops>]",
- /* flags */ SAF_NONE,
- /*.next */ &playback_application_interface
-};
-
-static switch_application_interface_t park_application_interface = {
- /*.interface_name */ "park",
- /*.application_function */ park_function,
- /* long_desc */ NULL,
- /* short_desc */ NULL,
- /* syntax */ NULL,
- /* flags */ SAF_NONE,
- /*.next */ &gentones_application_interface
-};
-
-static switch_application_interface_t echo_application_interface = {
- /*.interface_name */ "echo",
- /*.application_function */ echo_function,
- /* long_desc */ "Perform an echo test against the calling channel",
- /* short_desc */ "Echo",
- /* syntax */ "",
- /* flags */ SAF_NONE,
- /*.next */ &park_application_interface
-};
-
-
-static switch_application_interface_t tone_detect_application_interface = {
- /*.interface_name */ "tone_detect",
- /*.application_function */ tone_detect_session_function,
- /* long_desc */ "Detect tones",
- /* short_desc */ "Detect tones",
- /* syntax */ "",
- /* flags */ SAF_NONE,
- /*.next */ &echo_application_interface
-};
-
-static switch_application_interface_t fax_detect_application_interface = {
- /*.interface_name */ "fax_detect",
- /*.application_function */ fax_detect_session_function,
- /* long_desc */ "Detect fax send tone",
- /* short_desc */ "Detect faxes",
- /* syntax */ "",
- /* flags */ SAF_NONE,
- /*.next */ &tone_detect_application_interface
-};
-
-static switch_application_interface_t stop_tone_detect_application_interface = {
- /*.interface_name */ "stop_tone_detect",
- /*.application_function */ stop_fax_detect_session_function,
- /* long_desc */ "Stop detecting tones",
- /* short_desc */ "stop detecting tones",
- /* syntax */ "",
- /* flags */ SAF_NONE,
- /* next */ &fax_detect_application_interface
-};
-
-static switch_application_interface_t dtmf_application_interface = {
- /*.interface_name */ "start_dtmf",
- /*.application_function */ dtm_session_function,
- /* long_desc */ "Detect inband dtmf on the session",
- /* short_desc */ "Detect dtmf",
- /* syntax */ "",
- /* flags */ SAF_NONE,
- /* next */ &stop_tone_detect_application_interface
-};
-
-static switch_application_interface_t stop_dtmf_application_interface = {
- /*.interface_name */ "stop_dtmf",
- /*.application_function */ stop_dtmf_session_function,
- /* long_desc */ "Stop detecting inband dtmf.",
- /* short_desc */ "stop inband dtmf.",
- /* syntax */ "",
- /* flags */ SAF_NONE,
- &dtmf_application_interface
-};
-
-static switch_application_interface_t exe_application_interface = {
- /*.interface_name */ "execute_extension",
- /*.application_function */ exe_function,
- /*.long_desc */ "Execute an extension",
- /*.short_desc */ "Execute an extension",
- /*.syntax */ "<extension> <dialplan> <context>",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &stop_dtmf_application_interface
-};
-
-static switch_application_interface_t sched_transfer_application_interface = {
- /*.interface_name */ "sched_transfer",
- /*.application_function */ sched_transfer_function,
- /*.long_desc */ "Schedule a transfer in the future",
- /*.short_desc */ "Schedule a transfer in the future",
- /*.syntax */ "[+]<time> <extension> <dialplan> <context>",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &exe_application_interface
-};
-
-static switch_application_interface_t sched_broadcast_application_interface = {
- /*.interface_name */ "sched_broadcast",
- /*.application_function */ sched_broadcast_function,
- /*.long_desc */ "Schedule a broadcast in the future",
- /*.short_desc */ "Schedule a broadcast in the future",
- /*.syntax */ "[+]<time> <path> [aleg|bleg|both]",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &sched_transfer_application_interface
-};
-
-static switch_application_interface_t sched_hangup_application_interface = {
- /*.interface_name */ "sched_hangup",
- /*.application_function */ sched_hangup_function,
- /*.long_desc */ "Schedule a hangup in the future",
- /*.short_desc */ "Schedule a hangup in the future",
- /*.syntax */ "[+]<time> [<cause>]",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &sched_broadcast_application_interface
-};
-
-
-static switch_application_interface_t queuedtmf_application_interface = {
- /*.interface_name */ "queue_dtmf",
- /*.application_function */ queue_dtmf_function,
- /* long_desc */ "Queue dtmf to be sent from a session",
- /* short_desc */ "Queue dtmf to be sent",
- /* syntax */ "<dtmf_data>",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &sched_hangup_application_interface
-};
-
-static switch_application_interface_t reject_application_interface = {
- /*.interface_name */ "reject",
- /*.application_function */ reject_function,
- /* long_desc */ "Send a reject message to a session.",
- /* short_desc */ "Send session reject",
- /* syntax */ "<reject_data>",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &queuedtmf_application_interface
-};
-
-static switch_application_interface_t redirect_application_interface = {
- /*.interface_name */ "redirect",
- /*.application_function */ redirect_function,
- /* long_desc */ "Send a redirect message to a session.",
- /* short_desc */ "Send session redirect",
- /* syntax */ "<redirect_data>",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &reject_application_interface
-};
-
-static switch_application_interface_t ivr_application_interface = {
- /*.interface_name */ "ivr",
- /*.application_function */ ivr_application_function,
- /* long_desc */ "Run an ivr menu.",
- /* short_desc */ "Run an ivr menu",
- /* syntax */ "<menu_name>",
- /* flags */ SAF_NONE,
- /*.next */ &redirect_application_interface
-};
-
-static switch_application_interface_t detect_speech_application_interface = {
- /*.interface_name */ "detect_speech",
- /*.application_function */ detect_speech_function,
- /* long_desc */ "Detect speech on a channel.",
- /* short_desc */ "Detect speech",
- /* syntax */ "<mod_name> <gram_name> <gram_path> [<addr>] OR grammar <gram_name> [<path>] OR pause OR resume",
- /* flags */ SAF_NONE,
- /*.next */ &ivr_application_interface
-};
-
-static switch_application_interface_t ring_ready_application_interface = {
- /*.interface_name */ "ring_ready",
- /*.application_function */ ring_ready_function,
- /* long_desc */ "Indicate Ring_Ready on a channel.",
- /* short_desc */ "Indicate Ring_Ready",
- /* syntax */ "",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &detect_speech_application_interface
-};
-
-static switch_application_interface_t unset_application_interface = {
- /*.interface_name */ "unset",
- /*.application_function */ unset_function,
- /* long_desc */ "Unset a channel varaible for the channel calling the application.",
- /* short_desc */ "Unset a channel varaible",
- /* syntax */ "<varname>",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &ring_ready_application_interface
-};
-
-static switch_application_interface_t set_application_interface = {
- /*.interface_name */ "set",
- /*.application_function */ set_function,
- /* long_desc */ "Set a channel varaible for the channel calling the application.",
- /* short_desc */ "Set a channel varaible",
- /* syntax */ "<varname>=<value>",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &unset_application_interface
-};
-
-static switch_application_interface_t export_application_interface = {
- /*.interface_name */ "export",
- /*.application_function */ export_function,
- /* long_desc */ "Set and export a channel varaible for the channel calling the application.",
- /* short_desc */ "Export a channel varaible across a bridge",
- /* syntax */ "<varname>=<value>",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &set_application_interface
-};
-
-static switch_application_interface_t info_application_interface = {
- /*.interface_name */ "info",
- /*.application_function */ info_function,
- /* long_desc */ "Display Call Info",
- /* short_desc */ "Display Call Info",
- /* syntax */ "",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &export_application_interface
-};
-
-static switch_application_interface_t log_application_interface = {
- /*.interface_name */ "log",
- /*.application_function */ log_function,
- /* long_desc */ "Logs a channel varaible for the channel calling the application.",
- /* short_desc */ "Logs a channel varaible",
- /* syntax */ "<varname>",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &info_application_interface
-};
-
-
-static switch_application_interface_t hangup_application_interface = {
- /*.interface_name */ "hangup",
- /*.application_function */ hangup_function,
- /* long_desc */ "Hangup the call for a channel.",
- /* short_desc */ "Hangup the call",
- /* syntax */ "[<cause>]",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &log_application_interface
-};
-
-static switch_application_interface_t answer_application_interface = {
- /*.interface_name */ "answer",
- /*.application_function */ answer_function,
- /* long_desc */ "Answer the call for a channel.",
- /* short_desc */ "Answer the call",
- /* syntax */ "",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &hangup_application_interface
-};
-
-static switch_application_interface_t pre_answer_application_interface = {
- /*.interface_name */ "pre_answer",
- /*.application_function */ pre_answer_function,
- /* long_desc */ "Pre-Answer the call for a channel.",
- /* short_desc */ "Pre-Answer the call",
- /* syntax */ "",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &answer_application_interface
-};
-
-static switch_application_interface_t eval_application_interface = {
- /*.interface_name */ "eval",
- /*.application_function */ eval_function,
- /* long_desc */ "Do Nothing",
- /* short_desc */ "Do Nothing",
- /* syntax */ "",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &pre_answer_application_interface
-};
-
-static switch_application_interface_t phrase_application_interface = {
- /*.interface_name */ "phrase",
- /*.application_function */ phrase_function,
- /* long_desc */ "Say a Phrase",
- /* short_desc */ "Say a Phrase",
- /* syntax */ "<macro_name>,<data>",
- /* flags */ SAF_NONE,
- /*.next */ &eval_application_interface
-};
-
-static switch_application_interface_t strftime_application_interface = {
- /*.interface_name */ "strftime",
- /*.application_function */ strftime_function,
- /* long_desc */ NULL,
- /* short_desc */ NULL,
- /* syntax */ NULL,
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &phrase_application_interface
-};
-
-static switch_application_interface_t sleep_application_interface = {
- /*.interface_name */ "sleep",
- /*.application_function */ sleep_function,
- /* long_desc */
- "Pause the channel for a given number of milliseconds, consuming the audio for that period of time.",
- /* short_desc */ "Pause a channel",
- /* syntax */ "<pausemilliseconds>",
- /* flags */ SAF_NONE,
- /* next */ &strftime_application_interface
-};
-
-static switch_application_interface_t transfer_application_interface = {
- /*.interface_name */ "transfer",
- /*.application_function */ transfer_function,
- /* long_desc */ "Immediatly transfer the calling channel to a new extension",
- /* short_desc */ "Transfer a channel",
- /* syntax */ "<exten> [<dialplan> <context>]",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /* next */ &sleep_application_interface
-};
-
-static switch_application_interface_t privacy_application_interface = {
- /*.interface_name */ "privacy",
- /*.application_function */ privacy_function,
- /* long_desc */ "Set caller privacy on calls.",
- /* short_desc */ "Set privacy on calls",
- /* syntax */ "off|on|name|full|number",
- /* flags */ SAF_SUPPORT_NOMEDIA,
- /*.next */ &transfer_application_interface
-};
-
-static switch_loadable_module_interface_t dptools_module_interface = {
- /*.module_name = */ modname,
- /*.endpoint_interface = */ NULL,
- /*.timer_interface = */ NULL,
- /*.dialplan_interface = */ NULL,
- /*.codec_interface = */ NULL,
- /*.application_interface */ &privacy_application_interface,
- /*.api_interface */ &presence_api_interface
-};
+#define SPEAK_DESC "Speak text to a channel via the tts interface"
+#define DISPLACE_DESC "Displace audio from a file to the channels input"
+#define SESS_REC_DESC "Starts a background recording of the entire session"
+#define STOP_SESS_REC_DESC "Stops a background recording of the entire session"
+#define SCHED_TRANSF_DESCR "Schedule a transfer in the future"
+#define SCHED_BROADCAST_DESCR "Schedule a broadcast in the future"
+#define SCHED_HANGUP_DESCR "Schedule a hangup in the future"
+#define UNSET_LONG_DESC "Unset a channel varaible for the channel calling the application."
+#define SET_LONG_DESC "Set a channel varaible for the channel calling the application."
+#define EXPORT_LONG_DESC "Set and export a channel varaible for the channel calling the application."
+#define LOG_LONG_DESC "Logs a channel varaible for the channel calling the application."
+#define TRANSFER_LONG_DESC "Immediatly transfer the calling channel to a new extension"
+#define SLEEP_LONG_DESC "Pause the channel for a given number of milliseconds, consuming the audio for that period of time."
SWITCH_MODULE_LOAD_FUNCTION(mod_dptools_load)
{
+ switch_api_interface_t *api_interface;
+ switch_application_interface_t *app_interface;
/* connect my internal structure to the blank pointer passed to me */
- *module_interface = &dptools_module_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ SWITCH_ADD_API(api_interface, "strepoch", "Convert a date string into epoch time", strepoch_api_function, "<string>");
+ SWITCH_ADD_API(api_interface, "chat", "chat", chat_api_function, "<proto>|<from>|<to>|<message>");
+ SWITCH_ADD_API(api_interface, "strftime", "strftime", strftime_api_function, "<format_string>");
+ SWITCH_ADD_API(api_interface, "presence", "presence", presence_api_function, "<user> <rpid> <message>");
+ SWITCH_ADD_APP(app_interface, "privacy", "Set privacy on calls", "Set caller privacy on calls.", privacy_function, "off|on|name|full|number", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "transfer", "Transfer a channel", TRANSFER_LONG_DESC, transfer_function, "<exten> [<dialplan> <context>]", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "sleep", "Pause a channel", SLEEP_LONG_DESC, sleep_function, "<pausemilliseconds>", SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "strftime", NULL, NULL, strftime_function, NULL, SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "phrase", "Say a Phrase", "Say a Phrase", phrase_function, "<macro_name>,<data>", SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "eval", "Do Nothing", "Do Nothing", eval_function, "", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "pre_answer", "Pre-Answer the call", "Pre-Answer the call for a channel.", pre_answer_function, "", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "answer", "Answer the call", "Answer the call for a channel.", answer_function, "", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "hangup", "Hangup the call", "Hangup the call for a channel.", hangup_function, "[<cause>]", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "log", "Logs a channel varaible", LOG_LONG_DESC, log_function, "<varname>", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "info", "Display Call Info", "Display Call Info", info_function, "", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "export", "Export a channel varaible across a bridge", EXPORT_LONG_DESC, export_function, "<varname>=<value>", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "set", "Set a channel varaible", SET_LONG_DESC, set_function, "<varname>=<value>", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "unset", "Unset a channel varaible", UNSET_LONG_DESC, unset_function, "<varname>", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "ring_ready", "Indicate Ring_Ready", "Indicate Ring_Ready on a channel.", ring_ready_function, "", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "detect_speech", "Detect speech", "Detect speech on a channel.", detect_speech_function, DETECT_SPEECH_SYNTAX, SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "ivr", "Run an ivr menu", "Run an ivr menu.", ivr_application_function, "<menu_name>", SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "redirect", "Send session redirect", "Send a redirect message to a session.", redirect_function, "<redirect_data>", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "reject", "Send session reject", "Send a reject message to a session.", reject_function, "<reject_data>", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "queue_dtmf", "Queue dtmf to be sent", "Queue dtmf to be sent from a session", queue_dtmf_function, "<dtmf_data>", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "sched_hangup", SCHED_HANGUP_DESCR, SCHED_HANGUP_DESCR, sched_hangup_function, "[+]<time> [<cause>]", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "sched_broadcast", SCHED_BROADCAST_DESCR, SCHED_BROADCAST_DESCR, sched_broadcast_function, "[+]<time> <path> [aleg|bleg|both]", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "sched_transfer", SCHED_TRANSF_DESCR, SCHED_TRANSF_DESCR, sched_transfer_function, "[+]<time> <extension> <dialplan> <context>", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "execute_extension", "Execute an extension", "Execute an extension", exe_function, EXE_SYNTAX, SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "stop_dtmf", "stop inband dtmf", "Stop detecting inband dtmf.", stop_dtmf_session_function, "", SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "start_dtmf", "Detect dtmf", "Detect inband dtmf on the session", dtmf_session_function, "", SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "stop_tone_detect", "stop detecting tones", "Stop detecting tones", stop_fax_detect_session_function, "", SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "fax_detect", "Detect faxes", "Detect fax send tone", fax_detect_session_function, "", SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "tone_detect", "Detect tones", "Detect tones", tone_detect_session_function, "", SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "echo", "Echo", "Perform an echo test against the calling channel", echo_function, "", SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "park", NULL, NULL, park_function, NULL, SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "gentones", "Generate Tones", "Generate tones to the channel", gentones_function, "<tgml_script>[|<loops>]", SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "playback", "Playback File", "Playback a file to the channel", playback_function, "<path>", SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "stop_record_session", "Stop Record Session", STOP_SESS_REC_DESC, stop_record_session_function, "<path>", SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "record_session", "Record Session", SESS_REC_DESC, record_session_function, "<path>", SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "record", "Record File", "Record a file from the channels input", record_function, "<path> [+time_limit_ms]", SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "stop_displace_session", "Stop Displace File", "Stop Displacing to a file", stop_displace_session_function, "<path>", SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "displace_session", "Displace File", DISPLACE_DESC, displace_session_function, "<path> [+time_limit_ms] [mux]", SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "speak", "Speak text", SPEAK_DESC, speak_function, "<engine>|<voice>|<text>", SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "bridge", "Bridge Audio", "Bridge the audio between two sessions", audio_bridge_function, "<channel_url>", SAF_SUPPORT_NOMEDIA);
+ SWITCH_ADD_APP(app_interface, "system", "Execute a system command", "Execute a system command", system_session_function, "<command>", SAF_SUPPORT_NOMEDIA);
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
1
0
[commit] r5398 - in freeswitch/trunk/src: include mod/applications/mod_conference
by Freeswitch SVN 20 Jun '07
by Freeswitch SVN 20 Jun '07
20 Jun '07
Author: mikej
Date: Wed Jun 20 00:17:26 2007
New Revision: 5398
Modified:
freeswitch/trunk/src/include/switch_loadable_module.h
freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
Log:
move mod_conference to use new module loader interfaces.
Modified: freeswitch/trunk/src/include/switch_loadable_module.h
==============================================================================
--- freeswitch/trunk/src/include/switch_loadable_module.h (original)
+++ freeswitch/trunk/src/include/switch_loadable_module.h Wed Jun 20 00:17:26 2007
@@ -275,6 +275,26 @@
break; \
}
+#define SWITCH_ADD_CHAT(chat_int, int_name, funcptr) \
+ for (;;) { \
+ chat_int = switch_loadable_module_create_interface(*module_interface, SWITCH_CHAT_INTERFACE); \
+ chat_int->chat_send = funcptr; \
+ chat_int->interface_name = int_name; \
+ break; \
+ }
+
+#define SWITCH_ADD_APP(app_int, int_name, short_descript, long_descript, funcptr, syntax_string, app_flags) \
+ for (;;) { \
+ app_int = switch_loadable_module_create_interface(*module_interface, SWITCH_APPLICATION_INTERFACE); \
+ app_int->interface_name = int_name; \
+ app_int->application_function = funcptr; \
+ app_int->short_desc = short_descript; \
+ app_int->long_desc = long_descript; \
+ app_int->syntax = syntax_string; \
+ app_interface->flags = app_flags; \
+ break; \
+ }
+
///\}
SWITCH_END_EXTERN_C
Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c Wed Jun 20 00:17:26 2007
@@ -39,7 +39,7 @@
static const char global_app_name[] = "conference";
static char *global_cf_name = "conference.conf";
-static switch_api_interface_t conf_api_interface;
+static char *api_syntax;
/* Size to allocate for audio buffers */
#define CONF_BUFFER_SIZE 1024 * 128
@@ -3523,7 +3523,7 @@
if (strcasecmp(argv[0], "list") == 0) {
conf_api_sub_list(NULL, stream, argc, argv);
} else if (strcasecmp(argv[0], "help") == 0 || strcasecmp(argv[0], "commands") == 0) {
- stream->write_function(stream, "%s\n", conf_api_interface.syntax);
+ stream->write_function(stream, "%s\n", api_syntax);
} else if (argv[1] && strcasecmp(argv[1], "dial") == 0) {
if (conf_api_sub_dial(NULL, stream, argc, argv) != SWITCH_STATUS_SUCCESS) {
/* command returned error, so show syntax usage */
@@ -4338,30 +4338,6 @@
switch_thread_create(&thread, thd_attr, conference_record_thread_run, rec, rec->pool);
}
-static switch_application_interface_t conference_autocall_application_interface = {
- /*.interface_name */ "conference_set_auto_outcall",
- /*.application_function */ conference_auto_function,
- NULL, NULL, NULL,
- /* flags */ SAF_NONE,
- /*.next */
-};
-
-static switch_application_interface_t conference_application_interface = {
- /*.interface_name */ global_app_name,
- /*.application_function */ conference_function,
- NULL, NULL, NULL,
- /* flags */ SAF_NONE,
- /*.next */ &conference_autocall_application_interface
-};
-
-static switch_api_interface_t conf_api_interface = {
- /*.interface_name */ "conference",
- /*.desc */ "Conference module commands",
- /*.function */ conf_api_main,
- /*.syntax *//* see switch_module_load, this is built on the fly */
- /*.next */
-};
-
static switch_status_t chat_send(char *proto, char *from, char *to, char *subject, char *body, char *hint)
{
char name[512] = "", *p, *lbuf = NULL;
@@ -4412,7 +4388,7 @@
#if 0
else {
if (strcasecmp(argv[0], "help") == 0 || strcasecmp(argv[0], "commands") == 0) {
- stream.write_function(&stream, "%s\n", conf_api_interface.syntax);
+ stream.write_function(&stream, "%s\n", api_syntax);
/* find a normal command */
} else {
conf_api_dispatch(conference, &stream, argc, argv, (const char *) body, 0);
@@ -4431,26 +4407,6 @@
return SWITCH_STATUS_SUCCESS;
}
-static switch_chat_interface_t conference_chat_interface = {
- /*.name */ CONF_CHAT_PROTO,
- /*.chat_send */ chat_send,
-
-};
-
-static switch_loadable_module_interface_t conference_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ &conference_application_interface,
- /*.api_interface */ &conf_api_interface,
- /*.file_interface */ NULL,
- /*.speech_interface */ NULL,
- /*.directory_interface */ NULL,
- /*.chat_interface */ &conference_chat_interface
-};
-
static switch_status_t conf_default_controls(conference_obj_t * conference)
{
switch_status_t status = SWITCH_STATUS_FALSE;
@@ -4941,10 +4897,16 @@
uint32_t i;
size_t nl, ol = 0;
char *p = NULL;
+ switch_chat_interface_t *chat_interface;
+ switch_api_interface_t *api_interface;
+ switch_application_interface_t *app_interface;
switch_status_t status = SWITCH_STATUS_SUCCESS;
memset(&globals, 0, sizeof(globals));
+ /* Connect my internal structure to the blank pointer passed to me */
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+
/* build api interface help ".syntax" field string */
p = strdup("");
for (i = 0; i < CONFFUNCAPISIZE; i++) {
@@ -4962,13 +4924,12 @@
}
}
- /* install api interface help ".syntax" field string */
- if (p != NULL) {
- conf_api_interface.syntax = p;
- }
+ api_syntax = p;
- /* Connect my internal structure to the blank pointer passed to me */
- *module_interface = &conference_module_interface;
+ SWITCH_ADD_API(api_interface, "conference", "Conference module commands", conf_api_main, p);
+ SWITCH_ADD_APP(app_interface, global_app_name, global_app_name, NULL, conference_function, NULL, SAF_NONE);
+ SWITCH_ADD_APP(app_interface, "conference_set_auto_outcall", "conference_set_auto_outcall", NULL, conference_auto_function, NULL, SAF_NONE);
+ SWITCH_ADD_CHAT(chat_interface, CONF_CHAT_PROTO, chat_send);
/* create/register custom event message type */
if (switch_event_reserve_subclass(CONF_EVENT_MAINT) != SWITCH_STATUS_SUCCESS) {
@@ -4977,10 +4938,7 @@
}
/* Setup the pool */
- if (switch_core_new_memory_pool(&globals.conference_pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no conference pool\n");
- return SWITCH_STATUS_TERM;
- }
+ globals.conference_pool = pool;
/* Setup a hash to store conferences by name */
switch_core_hash_init(&globals.conference_hash, globals.conference_pool);
@@ -5015,9 +4973,7 @@
}
/* free api interface help ".syntax" field string */
- if (conf_api_interface.syntax != NULL) {
- free((char *) conf_api_interface.syntax);
- }
+ switch_safe_free(api_syntax);
}
return SWITCH_STATUS_SUCCESS;
1
0
[commit] r5397 - in freeswitch/trunk/src: include mod/applications/mod_commands
by Freeswitch SVN 20 Jun '07
by Freeswitch SVN 20 Jun '07
20 Jun '07
Author: mikej
Date: Tue Jun 19 23:26:52 2007
New Revision: 5397
Modified:
freeswitch/trunk/src/include/switch_loadable_module.h
freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
Log:
move mod_commands to use new module loader interfaces.
Modified: freeswitch/trunk/src/include/switch_loadable_module.h
==============================================================================
--- freeswitch/trunk/src/include/switch_loadable_module.h (original)
+++ freeswitch/trunk/src/include/switch_loadable_module.h Tue Jun 19 23:26:52 2007
@@ -257,18 +257,24 @@
\return SWITCH_STATUS_SUCCESS on a successful load
*/
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename);
-SWITCH_MOD_DECLARE(switch_status_t) switch_module_reload(void);
-SWITCH_MOD_DECLARE(switch_status_t) switch_module_pause(void);
-SWITCH_MOD_DECLARE(switch_status_t) switch_module_resume(void);
-SWITCH_MOD_DECLARE(switch_status_t) switch_module_status(void);
SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void);
-
/*!
\brief Shutdown a module
\return SWITCH_STATUS_SUCCESS on a successful shutdown
*/
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void);
+
+#define SWITCH_ADD_API(api_int, int_name, descript, funcptr, syntax_string) \
+ for (;;) { \
+ api_int = switch_loadable_module_create_interface(*module_interface, SWITCH_API_INTERFACE); \
+ api_int->interface_name = int_name; \
+ api_int->desc = descript; \
+ api_int->function = funcptr; \
+ api_int->syntax = syntax_string; \
+ break; \
+ }
+
///\}
SWITCH_END_EXTERN_C
Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c Tue Jun 19 23:26:52 2007
@@ -39,25 +39,6 @@
SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load);
SWITCH_MODULE_DEFINITION(mod_commands, mod_commands_load, NULL, NULL);
-static switch_api_interface_t ctl_api_interface;
-static switch_api_interface_t uuid_bridge_api_interface;
-static switch_api_interface_t session_record_api_interface;
-static switch_api_interface_t status_api_interface;
-static switch_api_interface_t show_api_interface;
-static switch_api_interface_t pause_api_interface;
-static switch_api_interface_t transfer_api_interface;
-static switch_api_interface_t load_api_interface;
-static switch_api_interface_t unload_api_interface;
-static switch_api_interface_t reload_api_interface;
-static switch_api_interface_t kill_api_interface;
-static switch_api_interface_t originate_api_interface;
-static switch_api_interface_t media_api_interface;
-static switch_api_interface_t hold_api_interface;
-static switch_api_interface_t broadcast_api_interface;
-static switch_api_interface_t sched_broadcast_api_interface;
-static switch_api_interface_t sched_transfer_api_interface;
-static switch_api_interface_t sched_hangup_api_interface;
-
SWITCH_STANDARD_API(status_function)
{
uint8_t html = 0;
@@ -108,6 +89,7 @@
return SWITCH_STATUS_SUCCESS;
}
+#define CTL_SYNTAX "[hupall|pause|resume|shutdown]"
SWITCH_STANDARD_API(ctl_function)
{
int argc;
@@ -115,7 +97,7 @@
uint32_t arg = 0;
if (switch_strlen_zero(cmd)) {
- stream->write_function(stream, "USAGE: %s\n", ctl_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", CTL_SYNTAX);
return SWITCH_STATUS_SUCCESS;
}
@@ -150,6 +132,7 @@
}
+#define LOAD_SYNTAX "<mod_name>"
SWITCH_STANDARD_API(load_function)
{
const char *err;
@@ -159,7 +142,7 @@
}
if (switch_strlen_zero(cmd)) {
- stream->write_function(stream, "USAGE: %s\n", load_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", LOAD_SYNTAX);
return SWITCH_STATUS_SUCCESS;
}
@@ -181,7 +164,7 @@
}
if (switch_strlen_zero(cmd)) {
- stream->write_function(stream, "USAGE: %s\n", unload_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", LOAD_SYNTAX);
return SWITCH_STATUS_SUCCESS;
}
@@ -212,6 +195,7 @@
return SWITCH_STATUS_SUCCESS;
}
+#define KILL_SYNTAX "<uuid>"
SWITCH_STANDARD_API(kill_function)
{
switch_core_session_t *ksession = NULL;
@@ -221,7 +205,7 @@
}
if (!cmd) {
- stream->write_function(stream, "USAGE: %s\n", kill_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", KILL_SYNTAX);
} else if ((ksession = switch_core_session_locate(cmd))) {
switch_channel_t *channel = switch_core_session_get_channel(ksession);
switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
@@ -234,6 +218,7 @@
return SWITCH_STATUS_SUCCESS;
}
+#define TRANSFER_SYNTAX "<uuid> <dest-exten> [<dialplan>] [<context>]"
SWITCH_STANDARD_API(transfer_function)
{
switch_core_session_t *tsession = NULL;
@@ -269,13 +254,14 @@
}
}
- stream->write_function(stream, "USAGE: %s\n", transfer_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", TRANSFER_SYNTAX);
done:
switch_safe_free(mycmd);
return SWITCH_STATUS_SUCCESS;
}
+#define TONE_DETECT_SYNTAX "<uuid> <key> <tone_spec> [<flags> <timeout> <app> <args>]"
SWITCH_STANDARD_API(tone_detect_session_function)
{
char *argv[6] = { 0 };
@@ -325,6 +311,7 @@
return SWITCH_STATUS_SUCCESS;
}
+#define SCHED_TRANSFER_SYNTAX "[+]<time> <uuid> <extension> [<dialplan>] [<context>]"
SWITCH_STANDARD_API(sched_transfer_function)
{
switch_core_session_t *tsession = NULL;
@@ -340,7 +327,7 @@
}
if (switch_strlen_zero(cmd) || argc < 2 || argc > 5) {
- stream->write_function(stream, "USAGE: %s\n", sched_transfer_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", SCHED_TRANSFER_SYNTAX);
} else {
char *uuid = argv[1];
char *dest = argv[2];
@@ -367,6 +354,7 @@
return SWITCH_STATUS_SUCCESS;
}
+#define SCHED_HANGUP_SYNTAX "[+]<time> <uuid> [<cause>]"
SWITCH_STANDARD_API(sched_hangup_function)
{
switch_core_session_t *hsession = NULL;
@@ -382,7 +370,7 @@
}
if (switch_strlen_zero(cmd) || argc < 1) {
- stream->write_function(stream, "USAGE: %s\n", sched_hangup_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", SCHED_HANGUP_SYNTAX);
} else {
char *uuid = argv[1];
char *cause_str = argv[2];
@@ -412,7 +400,7 @@
return SWITCH_STATUS_SUCCESS;
}
-
+#define MEDIA_SYNTAX "<uuid>"
SWITCH_STANDARD_API(uuid_media_function)
{
char *mycmd = NULL, *argv[4] = { 0 };
@@ -428,7 +416,7 @@
}
if (switch_strlen_zero(cmd) || argc < 1) {
- stream->write_function(stream, "USAGE: %s\n", media_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", MEDIA_SYNTAX);
} else {
if (!strcmp(argv[0], "off")) {
status = switch_ivr_nomedia(argv[1], SMF_REBRIDGE);
@@ -447,7 +435,7 @@
return SWITCH_STATUS_SUCCESS;
}
-
+#define BROADCAST_SYNTAX "<uuid> <path> [aleg|bleg|both]"
SWITCH_STANDARD_API(uuid_broadcast_function)
{
char *mycmd = NULL, *argv[4] = { 0 };
@@ -463,7 +451,7 @@
}
if (switch_strlen_zero(cmd) || argc < 2) {
- stream->write_function(stream, "USAGE: %s\n", broadcast_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", BROADCAST_SYNTAX);
} else {
switch_media_flag_t flags = SMF_NONE;
@@ -487,7 +475,7 @@
return SWITCH_STATUS_SUCCESS;
}
-
+#define SCHED_BROADCAST_SYNTAX "[+]<time> <uuid> <path> [aleg|bleg|both]"
SWITCH_STANDARD_API(sched_broadcast_function)
{
char *mycmd = NULL, *argv[4] = { 0 };
@@ -503,7 +491,7 @@
}
if (switch_strlen_zero(cmd) || argc < 3) {
- stream->write_function(stream, "USAGE: %s\n", sched_broadcast_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", SCHED_BROADCAST_SYNTAX);
} else {
switch_media_flag_t flags = SMF_NONE;
time_t when;
@@ -534,6 +522,7 @@
return SWITCH_STATUS_SUCCESS;
}
+#define HOLD_SYNTAX "<uuid>"
SWITCH_STANDARD_API(uuid_hold_function)
{
char *mycmd = NULL, *argv[4] = { 0 };
@@ -549,7 +538,7 @@
}
if (switch_strlen_zero(cmd) || argc < 1) {
- stream->write_function(stream, "USAGE: %s\n", hold_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", HOLD_SYNTAX);
} else {
if (!strcmp(argv[0], "off")) {
status = switch_ivr_unhold_uuid(argv[1]);
@@ -568,6 +557,7 @@
return SWITCH_STATUS_SUCCESS;
}
+#define UUID_SYNTAX "<uuid> <other_uuid>"
SWITCH_STANDARD_API(uuid_bridge_function)
{
char *mycmd = NULL, *argv[4] = { 0 };
@@ -582,7 +572,7 @@
}
if (switch_strlen_zero(cmd) || argc != 2) {
- stream->write_function(stream, "USAGE: %s\n", uuid_bridge_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", UUID_SYNTAX);
} else {
if (switch_ivr_uuid_bridge(argv[0], argv[1]) != SWITCH_STATUS_SUCCESS) {
stream->write_function(stream, "Invalid uuid\n");
@@ -593,6 +583,7 @@
return SWITCH_STATUS_SUCCESS;
}
+#define SESS_REC_SYNTAX "<uuid> [start|stop] <path> [<limit>]"
SWITCH_STANDARD_API(session_record_function)
{
switch_core_session_t *rsession = NULL;
@@ -643,7 +634,7 @@
usage:
- stream->write_function(stream, "USAGE: %s\n", session_record_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", SESS_REC_SYNTAX);
switch_safe_free(mycmd);
@@ -724,6 +715,7 @@
return SWITCH_STATUS_SUCCESS;
}
+#define PAUSE_SYNTAX "<uuid> <on|off>"
SWITCH_STANDARD_API(pause_function)
{
switch_core_session_t *psession = NULL;
@@ -739,7 +731,7 @@
}
if (switch_strlen_zero(cmd) || argc < 2) {
- stream->write_function(stream, "USAGE: %s\n", pause_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", PAUSE_SYNTAX);
} else {
char *uuid = argv[0];
char *dest = argv[1];
@@ -764,6 +756,7 @@
return SWITCH_STATUS_SUCCESS;
}
+#define ORIGINATE_SYNTAX "<call url> <exten>|&<application_name>(<app_args>) [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>]"
SWITCH_STANDARD_API(originate_function)
{
switch_channel_t *caller_channel;
@@ -785,7 +778,7 @@
}
if (switch_strlen_zero(cmd) || argc < 2 || argc > 7) {
- stream->write_function(stream, "USAGE: %s\n", originate_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", ORIGINATE_SYNTAX);
switch_safe_free(mycmd);
return SWITCH_STATUS_SUCCESS;
}
@@ -1097,6 +1090,7 @@
return 0;
}
+#define SHOW_SYNTAX "codec|application|api|dialplan|file|timer|calls|channels"
SWITCH_STANDARD_API(show_function)
{
char sql[1024];
@@ -1129,7 +1123,7 @@
// If you changes the field qty or order of any of these select
// statmements, you must also change show_callback and friends to match!
if (!command) {
- stream->write_function(stream, "USAGE: %s\n", show_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", SHOW_SYNTAX);
return SWITCH_STATUS_SUCCESS;
} else if (!strcmp(command, "codec") || !strcmp(command, "dialplan") || !strcmp(command, "file") || !strcmp(command, "timer")) {
sprintf(sql, "select type, name from interfaces where type = '%s'", command);
@@ -1153,7 +1147,7 @@
snprintf(sql, sizeof(sql) - 1, "select name, syntax, description from interfaces where type = 'api'");
}
} else {
- stream->write_function(stream, "USAGE: %s\n", show_api_interface.syntax);
+ stream->write_function(stream, "USAGE: %s\n", SHOW_SYNTAX);
return SWITCH_STATUS_SUCCESS;
}
@@ -1247,224 +1241,36 @@
return SWITCH_STATUS_SUCCESS;
}
-
-static switch_api_interface_t xml_wrap_api_interface = {
- /*.interface_name */ "xml_wrap",
- /*.desc */ "Wrap another api command in xml",
- /*.function */ xml_wrap_api_function,
- /*.syntax */ "<command> <args>",
- /*.next */ NULL
-};
-
-static switch_api_interface_t sched_del_api_interface = {
- /*.interface_name */ "sched_del",
- /*.desc */ "Delete a Scheduled task",
- /*.function */ sched_del_function,
- /*.syntax */ "<task_id>|<group_id>",
- /*.next */ &xml_wrap_api_interface
-};
-
-static switch_api_interface_t sched_api_api_interface = {
- /*.interface_name */ "sched_api",
- /*.desc */ "Schedule an api command",
- /*.function */ sched_api_function,
- /*.syntax */ "[+]<time> <group_name> <command_string>",
- /*.next */ &sched_del_api_interface
-};
-
-static switch_api_interface_t sched_transfer_api_interface = {
- /*.interface_name */ "sched_transfer",
- /*.desc */ "Schedule a broadcast event to a running call",
- /*.function */ sched_transfer_function,
- /*.syntax */ "[+]<time> <uuid> <extension> [<dialplan>] [<context>]",
- /*.next */ &sched_api_api_interface
-};
-
-static switch_api_interface_t sched_broadcast_api_interface = {
- /*.interface_name */ "sched_broadcast",
- /*.desc */ "Schedule a broadcast event to a running call",
- /*.function */ sched_broadcast_function,
- /*.syntax */ "[+]<time> <uuid> <path> [aleg|bleg|both]",
- /*.next */ &sched_transfer_api_interface
-};
-
-static switch_api_interface_t sched_hangup_api_interface = {
- /*.interface_name */ "sched_hangup",
- /*.desc */ "Schedule a running call to hangup",
- /*.function */ sched_hangup_function,
- /*.syntax */ "[+]<time> <uuid> [<cause>]",
- /*.next */ &sched_broadcast_api_interface
-};
-
-static switch_api_interface_t version_api_interface = {
- /*.interface_name */ "version",
- /*.desc */ "Show version of the switch",
- /*.function */ version_function,
- /*.syntax */ "",
- /*.next */ &sched_hangup_api_interface
-};
-
-static switch_api_interface_t help_api_interface = {
- /*.interface_name */ "help",
- /*.desc */ "Show help for all the api commands",
- /*.function */ help_function,
- /*.syntax */ "",
- /*.next */ &version_api_interface,
-};
-
-static switch_api_interface_t ctl_api_interface = {
- /*.interface_name */ "fsctl",
- /*.desc */ "control messages",
- /*.function */ ctl_function,
- /*.syntax */ "[hupall|pause|resume|shutdown]",
- /*.next */ &help_api_interface
-};
-
-static switch_api_interface_t media_api_interface = {
- /*.interface_name */ "media",
- /*.desc */ "media",
- /*.function */ uuid_media_function,
- /*.syntax */ "<uuid>",
- /*.next */ &ctl_api_interface
-};
-
-static switch_api_interface_t hold_api_interface = {
- /*.interface_name */ "hold",
- /*.desc */ "hold",
- /*.function */ uuid_hold_function,
- /*.syntax */ "<uuid>",
- /*.next */ &media_api_interface
-};
-
-static switch_api_interface_t broadcast_api_interface = {
- /*.interface_name */ "broadcast",
- /*.desc */ "broadcast",
- /*.function */ uuid_broadcast_function,
- /*.syntax */ "<uuid> <path> [aleg|bleg|both]",
- /*.next */ &hold_api_interface
-};
-
-static switch_api_interface_t session_record_api_interface = {
- /*.interface_name */ "session_record",
- /*.desc */ "session record",
- /*.function */ session_record_function,
- /*.syntax */ "<uuid> [start|stop] <path> [<limit>]",
- /*.next */ &broadcast_api_interface
-};
-
-static switch_api_interface_t session_displace_api_interface = {
- /*.interface_name */ "session_displace",
- /*.desc */ "session displace",
- /*.function */ session_displace_function,
- /*.syntax */ "<uuid> [start|stop] <path> [<limit>] [mux]",
- /*.next */ &broadcast_api_interface
-};
-
-static switch_api_interface_t uuid_bridge_api_interface = {
- /*.interface_name */ "uuid_bridge",
- /*.desc */ "uuid_bridge",
- /*.function */ uuid_bridge_function,
- /*.syntax */ "<uuid> <other_uuid>",
- /*.next */ &session_displace_api_interface
-};
-
-static switch_api_interface_t status_api_interface = {
- /*.interface_name */ "status",
- /*.desc */ "status",
- /*.function */ status_function,
- /*.syntax */ "",
- /*.next */ &uuid_bridge_api_interface
-};
-
-static switch_api_interface_t show_api_interface = {
- /*.interface_name */ "show",
- /*.desc */ "Show",
- /*.function */ show_function,
- /*.syntax */ "codec|application|api|dialplan|file|timer|calls|channels",
- /*.next */ &status_api_interface
-};
-
-static switch_api_interface_t pause_api_interface = {
- /*.interface_name */ "pause",
- /*.desc */ "Pause",
- /*.function */ pause_function,
- /*.syntax */ "<uuid> <on|off>",
- /*.next */ &show_api_interface
-};
-
-static switch_api_interface_t transfer_api_interface = {
- /*.interface_name */ "transfer",
- /*.desc */ "Transfer",
- /*.function */ transfer_function,
- /*.syntax */ "<uuid> <dest-exten> [<dialplan>] [<context>]",
- /*.next */ &pause_api_interface
-};
-
-static switch_api_interface_t load_api_interface = {
- /*.interface_name */ "load",
- /*.desc */ "Load Module",
- /*.function */ load_function,
- /*.syntax */ "<mod_name>",
- /*.next */ &transfer_api_interface
-};
-
-static switch_api_interface_t unload_api_interface = {
- /*.interface_name */ "unload",
- /*.desc */ "Unoad Module",
- /*.function */ unload_function,
- /*.syntax */ "<mod_name>",
- /*.next */ &load_api_interface
-};
-
-static switch_api_interface_t reload_api_interface = {
- /*.interface_name */ "reloadxml",
- /*.desc */ "Reload XML",
- /*.function */ reload_function,
- /*.syntax */ "",
- /*.next */ &unload_api_interface,
-
-};
-
-static switch_api_interface_t kill_api_interface = {
- /*.interface_name */ "killchan",
- /*.desc */ "Kill Channel",
- /*.function */ kill_function,
- /*.syntax */ "<uuid>",
- /*.next */ &reload_api_interface
-};
-
-static switch_api_interface_t tone_detect_session_interface = {
- /*.interface_name */ "tone_detect",
- /*.desc */ "Start Tone Detection on a channel",
- /*.function */ tone_detect_session_function,
- /*.syntax */
- "<uuid> <key> <tone_spec> [<flags> <timeout> <app> <args>]",
- /*.next */ &kill_api_interface
-};
-
-static switch_api_interface_t originate_api_interface = {
- /*.interface_name */ "originate",
- /*.desc */ "Originate a Call",
- /*.function */ originate_function,
- /*.syntax */
- "<call url> <exten>|&<application_name>(<app_args>) [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>]",
- /*.next */ &tone_detect_session_interface
-};
-
-static switch_loadable_module_interface_t commands_module_interface = {
- /*.module_name */ modname,
- /*.endpoint_interface */ NULL,
- /*.timer_interface */ NULL,
- /*.dialplan_interface */ NULL,
- /*.codec_interface */ NULL,
- /*.application_interface */ NULL,
- /*.api_interface */ &originate_api_interface
-};
-
SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load)
{
- /* connect my internal structure to the blank pointer passed to me */
- *module_interface = &commands_module_interface;
+ switch_api_interface_t *commands_api_interface;
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+
+ SWITCH_ADD_API(commands_api_interface, "originate", "Originate a Call", originate_function, ORIGINATE_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "tone_detect", "Start Tone Detection on a channel", tone_detect_session_function, TONE_DETECT_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "killchan", "Kill Channel", kill_function, KILL_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "reloadxml", "Reload XML", reload_function, "");
+ SWITCH_ADD_API(commands_api_interface, "unload", "Unload Module", unload_function, LOAD_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "load", "Load Module", unload_function, LOAD_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "transfer", "Transfer Module", transfer_function, TRANSFER_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "pause", "Pause", pause_function, PAUSE_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "show", "Show", show_function, SHOW_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "status", "status", status_function, "");
+ SWITCH_ADD_API(commands_api_interface, "uuid_bridge", "uuid_bridge", uuid_bridge_function, UUID_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "session_displace", "session displace", session_displace_function, "<uuid> [start|stop] <path> [<limit>] [mux]");
+ SWITCH_ADD_API(commands_api_interface, "session_record", "session record", session_record_function, SESS_REC_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "broadcast", "broadcast", uuid_broadcast_function, BROADCAST_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "hold", "hold", uuid_hold_function, HOLD_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "media", "media", uuid_media_function, MEDIA_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "fsctl", "control messages", ctl_function, CTL_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "help", "Show help for all the api commands", help_function, "");
+ SWITCH_ADD_API(commands_api_interface, "version", "Show version of the switch", version_function, "");
+ SWITCH_ADD_API(commands_api_interface, "sched_hangup", "Schedule a running call to hangup", sched_hangup_function, SCHED_HANGUP_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "sched_broadcast", "Schedule a broadcast event to a running call", sched_broadcast_function, SCHED_BROADCAST_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "sched_transfer", "Schedule a broadcast event to a running call", sched_transfer_function, SCHED_TRANSFER_SYNTAX);
+ SWITCH_ADD_API(commands_api_interface, "sched_api", "Schedule an api command", sched_api_function, "[+]<time> <group_name> <command_string>");
+ SWITCH_ADD_API(commands_api_interface, "sched_del", "Delete a Scheduled task", sched_del_function, "<task_id>|<group_id>");
+ SWITCH_ADD_API(commands_api_interface, "xml_wrap", "Wrap another api command in xml", xml_wrap_api_function, "<command> <args>");
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_NOUNLOAD;
1
0