summaryrefslogtreecommitdiff
path: root/include/asterisk/agi.h
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 /include/asterisk/agi.h
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 'include/asterisk/agi.h')
-rw-r--r--include/asterisk/agi.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/asterisk/agi.h b/include/asterisk/agi.h
index c44aafc3f..210b895ad 100644
--- a/include/asterisk/agi.h
+++ b/include/asterisk/agi.h
@@ -72,7 +72,8 @@ typedef struct agi_command {
* \return 1 on success, 0 if the command is already registered
*
*/
-AST_OPTIONAL_API(int, ast_agi_register, (struct ast_module *mod, agi_command *cmd),
+AST_OPTIONAL_API(int, ast_agi_register,
+ (struct ast_module *mod, agi_command *cmd),
{ return AST_OPTIONAL_API_UNAVAILABLE; });
/*!
@@ -85,7 +86,8 @@ AST_OPTIONAL_API(int, ast_agi_register, (struct ast_module *mod, agi_command *cm
* \return 1 on success, 0 if the command was not already registered
*
*/
-AST_OPTIONAL_API(int, ast_agi_unregister, (struct ast_module *mod, agi_command *cmd),
+AST_OPTIONAL_API(int, ast_agi_unregister,
+ (struct ast_module *mod, agi_command *cmd),
{ return AST_OPTIONAL_API_UNAVAILABLE; });
/*!
@@ -103,7 +105,8 @@ AST_OPTIONAL_API(int, ast_agi_unregister, (struct ast_module *mod, agi_command *
* will be unregistered. In other words, this function registers all the provided commands, or none
* of them.
*/
-AST_OPTIONAL_API(int, ast_agi_register_multiple, (struct ast_module *mod, struct agi_command *cmd, unsigned int len),
+AST_OPTIONAL_API(int, ast_agi_register_multiple,
+ (struct ast_module *mod, struct agi_command *cmd, unsigned int len),
{ return AST_OPTIONAL_API_UNAVAILABLE; });
/*!
@@ -120,7 +123,8 @@ AST_OPTIONAL_API(int, ast_agi_register_multiple, (struct ast_module *mod, struct
* \note If any command fails to unregister, this function will continue to unregister the
* remaining commands in the array; it will not reregister the already-unregistered commands.
*/
-AST_OPTIONAL_API(int, ast_agi_unregister_multiple, (struct ast_module *mod, struct agi_command *cmd, unsigned int len),
+AST_OPTIONAL_API(int, ast_agi_unregister_multiple,
+ (struct ast_module *mod, struct agi_command *cmd, unsigned int len),
{ return AST_OPTIONAL_API_UNAVAILABLE; });
/*!
@@ -134,7 +138,8 @@ AST_OPTIONAL_API(int, ast_agi_unregister_multiple, (struct ast_module *mod, stru
* \return 0 for success, -1 for failure, AST_OPTIONAL_API_UNAVAILABLE if res_agi is not loaded
*
*/
-AST_OPTIONAL_API_ATTR(int, format(printf, 3, 4), ast_agi_send, (int fd, struct ast_channel *chan, char *fmt, ...),
+AST_OPTIONAL_API_ATTR(int, format(printf, 3, 4), ast_agi_send,
+ (int fd, struct ast_channel *chan, char *fmt, ...),
{ return AST_OPTIONAL_API_UNAVAILABLE; });
#if defined(__cplusplus) || defined(c_plusplus)