diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-12 17:58:43 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-12 17:58:43 +0000 |
commit | f1d71922fd0eb88326fba7617e3c53a6923e93dc (patch) | |
tree | 3980a7c459a6b1019a57245fb799db1244124ccd /include | |
parent | c02a5a74a07232221886f87a8cfef5aa45e8154d (diff) |
- 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: http://svn.digium.com/svn/asterisk/branches/1.4@54066 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/dial.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/asterisk/dial.h b/include/asterisk/dial.h index 92220e8cb..eec5bb238 100644 --- a/include/asterisk/dial.h +++ b/include/asterisk/dial.h @@ -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 |