summaryrefslogtreecommitdiff
path: root/res/res_monitor.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2009-06-15 16:07:23 +0000
committerKevin P. Fleming <kpfleming@digium.com>2009-06-15 16:07:23 +0000
commit6c5987811c7c3decff795e46f5b371fa931475fe (patch)
tree890da581f24a2e3e5d3947988627e6a294bed01d /res/res_monitor.c
parentd224f78dd552131c387d1ccb8dae33d7883ea3a6 (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: https://origsvn.digium.com/svn/asterisk/trunk@200519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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;