diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-19 13:19:49 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-19 13:19:49 +0000 |
commit | 84de3e7ec27cbda09e16e0c2a49e330862ac271f (patch) | |
tree | 01ab767bcc6afcdf0de8f3c318a97b5122cb720e /include | |
parent | 296683f301336b411ceef41a96ebe5a9684fc6e0 (diff) |
Merged revisions 157706 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r157706 | kpfleming | 2008-11-19 06:42:19 -0600 (Wed, 19 Nov 2008) | 5 lines
make some corrections to the ast_agi_register_multiple(), ast_agi_unregister_multiple() and ast_agi_fdprintf() API calls to be consistent with API guidelines
also, move UPGRADE.txt to UPGRADE-1.6.txt and make the new UPGRADE.txt contain information about upgrading between Asterisk 1.6 releases
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@157738 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/agi.h | 48 |
1 files changed, 45 insertions, 3 deletions
diff --git a/include/asterisk/agi.h b/include/asterisk/agi.h index 609e98815..10c88e632 100644 --- a/include/asterisk/agi.h +++ b/include/asterisk/agi.h @@ -61,11 +61,53 @@ typedef struct agi_command { #define AGI_WEAK #endif -int AGI_WEAK ast_agi_fdprintf(struct ast_channel *chan, int fd, char *fmt, ...); +/*! + * \brief + * + * Sends a string of text to an application connected via AGI. + * + * \param fd The file descriptor for the AGI session (from struct agi_state) + * \param chan Pointer to an associated Asterisk channel, if any + * \param fmt printf-style format string + * \return 0 for success, -1 for failure + * + */ +int AGI_WEAK ast_agi_send(int fd, struct ast_channel *chan, char *fmt, ...) __attribute__((format(printf, 3, 4))); int AGI_WEAK ast_agi_register(struct ast_module *mod, agi_command *cmd); int AGI_WEAK ast_agi_unregister(struct ast_module *mod, agi_command *cmd); -void AGI_WEAK ast_agi_register_multiple(struct ast_module *mod, agi_command *cmd, int len); -void AGI_WEAK ast_agi_unregister_multiple(struct ast_module *mod, agi_command *cmd, int len); + +/*! + * \brief + * + * Registers a group of AGI commands, provided as an array of struct agi_command + * entries. + * + * \param mod Pointer to the module_info structure for the module that is registering the commands + * \param cmd Pointer to the first entry in the array of commands + * \param len Length of the array (use the ARRAY_LEN macro to determine this easily) + * \return 0 on success, -1 on failure + * + * \note If any command fails to register, all commands previously registered during the operation + * will be unregistered. In other words, this function registers all the provided commands, or none + * of them. + */ +int AGI_WEAK ast_agi_register_multiple(struct ast_module *mod, struct agi_command *cmd, unsigned int len); + +/*! + * \brief + * + * Unregisters a group of AGI commands, provided as an array of struct agi_command + * entries. + * + * \param mod Pointer to the module_info structure for the module that is unregistering the commands + * \param cmd Pointer to the first entry in the array of commands + * \param len Length of the array (use the ARRAY_LEN macro to determine this easily) + * \return 0 on success, -1 on failure + * + * \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. + */ +int AGI_WEAK ast_agi_unregister_multiple(struct ast_module *mod, struct agi_command *cmd, unsigned int len); #if defined(__cplusplus) || defined(c_plusplus) } |