aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/dial.h
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-12 18:01:15 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-12 18:01:15 +0000
commitf065afb98732557832c86e12ba6b137f66d34895 (patch)
tree032ff608f202b9ca90d2ee3f5b83be36459c03e5 /include/asterisk/dial.h
parenta563a68e9ffdf2059860236f9a8720c8d4c2e264 (diff)
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: http://svn.digium.com/svn/asterisk/trunk@54067 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/dial.h')
-rw-r--r--include/asterisk/dial.h15
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