Merged revisions 54066 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r54066 | russell | 2007-02-12 11:58:43 -0600 (Mon, 12 Feb 2007) | 4 lines

- Add the ability to register a callback to monitor state changes in an
  asynchronous dial operation.
- Rename the various references to "status" to "state" in the dial API

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2007-02-12 18:01:15 +00:00
parent e413063fc3
commit 2a5477b35e
4 changed files with 54 additions and 32 deletions

View File

@@ -33,6 +33,8 @@ struct ast_dial;
/*! \brief Dialing channel structure. Contains per-channel dialing options, asterisk channel, and more! */
struct ast_dial_channel;
typedef void (*ast_dial_state_callback)(struct ast_dial *);
/*! \brief List of options that are applicable either globally or per dialed channel */
enum ast_dial_option {
AST_DIAL_OPTION_RINGING, /*!< Always indicate ringing to caller */
@@ -78,11 +80,11 @@ enum ast_dial_result ast_dial_run(struct ast_dial *dial, struct ast_channel *cha
*/
struct ast_channel *ast_dial_answered(struct ast_dial *dial);
/*! \brief Return status of dial
* \note Returns the status of the dial attempt
/*! \brief Return state of dial
* \note Returns the state of the dial attempt
* \param dial Dialing structure
*/
enum ast_dial_result ast_dial_status(struct ast_dial *dial);
enum ast_dial_result ast_dial_state(struct ast_dial *dial);
/*! \brief Cancel async thread
* \note Cancel a running async thread
@@ -135,6 +137,13 @@ int ast_dial_option_global_disable(struct ast_dial *dial, enum ast_dial_option o
*/
int ast_dial_option_disable(struct ast_dial *dial, int num, enum ast_dial_option option);
/*! \brief Set a callback for state changes
* \param dial The dial structure to watch for state changes
* \param callback the callback
* \return nothing
*/
void ast_set_state_callback(struct ast_dial *dial, ast_dial_state_callback callback);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif