mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@157706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -66,11 +66,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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user