提交 76dfa310 authored 作者: Michael Jerris's avatar Michael Jerris

add access or function for channel variable iterator

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1612 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 72183965
......@@ -203,6 +203,15 @@ SWITCH_DECLARE(switch_status_t) switch_channel_set_variable(switch_channel_t *ch
*/
SWITCH_DECLARE(char *) switch_channel_get_variable(switch_channel_t *channel, char *varname);
/*!
* Start iterating over the entries in the channel variable list.
* @param channel the channel to intterate the variales for
* @param pool The pool to allocate the switch_hash_index_t iterator. If this
* pool is NULL, then an internal, non-thread-safe iterator is used.
* @remark Use switch_hash_next and switch_hash_this with this function to iterate all the channel variables
*/
SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel, switch_memory_pool_t *pool);
/*!
\brief Assign a caller extension to a given channel
\param channel channel to assign extension to
......
......@@ -292,6 +292,11 @@ SWITCH_DECLARE(char *) switch_channel_get_variable(switch_channel_t *channel, ch
return switch_core_hash_find(channel->variables, varname);
}
SWITCH_DECLARE(switch_hash_index_t *) switch_channel_variable_first(switch_channel_t *channel, switch_memory_pool_t *pool)
{
return switch_hash_first(pool, channel->variables);
}
SWITCH_DECLARE(switch_status_t) switch_channel_set_private(switch_channel_t *channel, void *private_info)
{
assert(channel != NULL);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论