Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
86c1904c
提交
86c1904c
authored
12月 09, 2005
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@101
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
bbb07474
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
21 行增加
和
0 行删除
+21
-0
switch_loadable_module.h
src/include/switch_loadable_module.h
+2
-0
switch_types.h
src/include/switch_types.h
+1
-0
switch_loadable_module.c
src/switch_loadable_module.c
+18
-0
没有找到文件。
src/include/switch_loadable_module.h
浏览文件 @
86c1904c
...
...
@@ -46,6 +46,7 @@ struct switch_loadable_module_interface {
const
switch_dialplan_interface
*
dialplan_interface
;
const
switch_codec_interface
*
codec_interface
;
const
switch_application_interface
*
application_interface
;
const
switch_api_interface
*
api_interface
;
};
SWITCH_DECLARE
(
switch_status
)
switch_loadable_module_init
(
void
);
...
...
@@ -54,6 +55,7 @@ SWITCH_DECLARE(switch_codec_interface *) loadable_module_get_codec_interface(cha
SWITCH_DECLARE
(
switch_dialplan_interface
*
)
loadable_module_get_dialplan_interface
(
char
*
name
);
SWITCH_DECLARE
(
switch_timer_interface
*
)
loadable_module_get_timer_interface
(
char
*
name
);
SWITCH_DECLARE
(
switch_application_interface
*
)
loadable_module_get_application_interface
(
char
*
name
);
SWITCH_DECLARE
(
switch_application_interface
*
)
loadable_module_get_api_interface
(
char
*
name
);
SWITCH_DECLARE
(
int
)
loadable_module_get_codecs
(
switch_memory_pool
*
pool
,
switch_codec_interface
**
array
,
int
arraylen
);
SWITCH_DECLARE
(
int
)
loadable_module_get_codecs_sorted
(
switch_memory_pool
*
pool
,
switch_codec_interface
**
array
,
int
arraylen
,
char
**
prefs
,
int
preflen
);
SWITCH_DECLARE
(
void
)
loadable_module_shutdown
(
void
);
...
...
src/include/switch_types.h
浏览文件 @
86c1904c
...
...
@@ -130,6 +130,7 @@ typedef struct switch_timer_interface switch_timer_interface;
typedef
struct
switch_dialplan_interface
switch_dialplan_interface
;
typedef
struct
switch_codec_interface
switch_codec_interface
;
typedef
struct
switch_application_interface
switch_application_interface
;
typedef
struct
switch_api_interface
switch_api_interface
;
typedef
struct
switch_core_session
switch_core_session
;
typedef
struct
switch_loadable_module_interface
switch_loadable_module_interface
;
typedef
struct
switch_caller_profile
switch_caller_profile
;
...
...
src/switch_loadable_module.c
浏览文件 @
86c1904c
...
...
@@ -60,6 +60,7 @@ struct switch_loadable_module_container {
switch_hash
*
dialplan_hash
;
switch_hash
*
timer_hash
;
switch_hash
*
application_hash
;
switch_hash
*
api_hash
;
switch_memory_pool
*
pool
;
};
...
...
@@ -205,6 +206,7 @@ SWITCH_DECLARE(switch_status) switch_loadable_module_init()
switch_core_hash_init
(
&
loadable_modules
.
codec_hash
,
loadable_modules
.
pool
);
switch_core_hash_init
(
&
loadable_modules
.
timer_hash
,
loadable_modules
.
pool
);
switch_core_hash_init
(
&
loadable_modules
.
application_hash
,
loadable_modules
.
pool
);
switch_core_hash_init
(
&
loadable_modules
.
api_hash
,
loadable_modules
.
pool
);
switch_core_hash_init
(
&
loadable_modules
.
dialplan_hash
,
loadable_modules
.
pool
);
while
(
apr_dir_read
(
&
finfo
,
finfo_flags
,
module_dir_handle
)
==
APR_SUCCESS
)
{
...
...
@@ -297,6 +299,17 @@ SWITCH_DECLARE(switch_status) switch_loadable_module_init()
}
}
if
(
new_module
->
interface
->
api_interface
)
{
const
switch_api_interface
*
ptr
;
for
(
ptr
=
new_module
->
interface
->
api_interface
;
ptr
;
ptr
=
ptr
->
next
)
{
switch_console_printf
(
SWITCH_CHANNEL_CONSOLE
,
"Adding API Function '%s'
\n
"
,
ptr
->
interface_name
);
switch_core_hash_insert
(
loadable_modules
.
api_hash
,
(
char
*
)
ptr
->
interface_name
,
(
void
*
)
ptr
);
}
}
}
}
...
...
@@ -350,6 +363,11 @@ SWITCH_DECLARE(switch_application_interface *) loadable_module_get_application_i
return
switch_core_hash_find
(
loadable_modules
.
application_hash
,
name
);
}
SWITCH_DECLARE
(
switch_application_interface
*
)
loadable_module_get_api_interface
(
char
*
name
)
{
return
switch_core_hash_find
(
loadable_modules
.
api_hash
,
name
);
}
SWITCH_DECLARE
(
int
)
loadable_module_get_codecs
(
switch_memory_pool
*
pool
,
switch_codec_interface
**
array
,
int
arraylen
)
{
apr_hash_index_t
*
hi
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论