aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_monitor.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-15 16:07:23 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-15 16:07:23 +0000
commit12ab0bbe1523fa2716e9e7954e27aab441ab8a34 (patch)
tree890da581f24a2e3e5d3947988627e6a294bed01d /res/res_monitor.c
parent80c50f0c393f737601a6186ec84f6e963fc35b72 (diff)
Redesigned 'optional API' support.
This patch provides a new implementation of the optional API support defined in asterisk/optional_api.h; this new version provides solves compatibility issues with the use of linker version scripts for suppressing global symbols. In addition, there is now a functional (and tested!) implementation for Mac OS/X, so module writers no longer need to use special tests before calling optional API functions. All future implementations must provide these same semantics, so that module writers can rely on them. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@200519 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_monitor.c')
-rw-r--r--res/res_monitor.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/res/res_monitor.c b/res/res_monitor.c
index 5f25d8dce..f296cf612 100644
--- a/res/res_monitor.c
+++ b/res/res_monitor.c
@@ -283,8 +283,8 @@ static int ast_monitor_set_state(struct ast_channel *chan, int state)
* \retval 0 on success
* \retval -1 on failure
*/
-int ast_monitor_start( struct ast_channel *chan, const char *format_spec,
- const char *fname_base, int need_lock, int stream_action)
+int AST_OPTIONAL_API_NAME(ast_monitor_start)(struct ast_channel *chan, const char *format_spec,
+ const char *fname_base, int need_lock, int stream_action)
{
int res = 0;
@@ -423,7 +423,7 @@ static const char *get_soxmix_format(const char *format)
* Stop the recording, close any open streams, mix in/out channels if required
* \return Always 0
*/
-int ast_monitor_stop(struct ast_channel *chan, int need_lock)
+int AST_OPTIONAL_API_NAME(ast_monitor_stop)(struct ast_channel *chan, int need_lock)
{
int delfiles = 0;
@@ -516,13 +516,13 @@ int ast_monitor_stop(struct ast_channel *chan, int need_lock)
/*! \brief Pause monitoring of channel */
-int ast_monitor_pause(struct ast_channel *chan)
+int AST_OPTIONAL_API_NAME(ast_monitor_pause)(struct ast_channel *chan)
{
return ast_monitor_set_state(chan, AST_MONITOR_PAUSED);
}
/*! \brief Unpause monitoring of channel */
-int ast_monitor_unpause(struct ast_channel *chan)
+int AST_OPTIONAL_API_NAME(ast_monitor_unpause)(struct ast_channel *chan)
{
return ast_monitor_set_state(chan, AST_MONITOR_RUNNING);
}
@@ -547,7 +547,7 @@ static int unpause_monitor_exec(struct ast_channel *chan, const char *data)
* \retval 0 on success.
* \retval -1 on failure.
*/
-int ast_monitor_change_fname(struct ast_channel *chan, const char *fname_base, int need_lock)
+int AST_OPTIONAL_API_NAME(ast_monitor_change_fname)(struct ast_channel *chan, const char *fname_base, int need_lock)
{
if (ast_strlen_zero(fname_base)) {
ast_log(LOG_WARNING, "Cannot change monitor filename of channel %s to null\n", chan->name);
@@ -808,7 +808,7 @@ static int change_monitor_action(struct mansession *s, const struct message *m)
return 0;
}
-void ast_monitor_setjoinfiles(struct ast_channel *chan, int turnon)
+void AST_OPTIONAL_API_NAME(ast_monitor_setjoinfiles)(struct ast_channel *chan, int turnon)
{
if (chan->monitor)
chan->monitor->joinfiles = turnon;