diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-07-08 21:14:34 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-07-08 21:14:34 +0000 |
commit | 1945cc0f8179b17589095af3550c8969d7790eed (patch) | |
tree | 0991463e1dac7d5f44a2be634d9a79b713a86521 /include/asterisk/pbx.h | |
parent | 4f868cef84f239a71b4f93b58aeb4852b3f0a0d3 (diff) |
queue device state changes and handle them serially in a background thread
optimize device state related functions
add ast_get_channel_by_name_prefix to allow searching for matching channels in O(1) operation
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6062 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/pbx.h')
-rwxr-xr-x | include/asterisk/pbx.h | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h index b0f92b60a..187372dcb 100755 --- a/include/asterisk/pbx.h +++ b/include/asterisk/pbx.h @@ -51,8 +51,6 @@ struct ast_sw; typedef int (*ast_state_cb_type)(char *context, char* id, int state, void *data); -typedef int (*ast_devstate_cb_type)(const char *dev, int state, void *data); - /*! Data structure associated with a custom function */ struct ast_custom_function { char *name; @@ -253,16 +251,6 @@ int ast_unregister_application(const char *app); */ int ast_extension_state(struct ast_channel *c, char *context, char *exten); -/*! Tells Asterisk the State for Device is changed */ -/*! - * \param fmt devicename like a dialstring with format parameters - * Asterisk polls the new extensionstates and calls the registered - * callbacks for the changed extensions - * Returns 0 on success, -1 on failure - */ -int ast_device_state_changed(const char *fmt, ...) - __attribute__ ((format (printf, 1, 2))); - /*! Registers a state change callback */ /*! * \param context which context to look in @@ -275,15 +263,6 @@ int ast_device_state_changed(const char *fmt, ...) int ast_extension_state_add(const char *context, const char *exten, ast_state_cb_type callback, void *data); -/*! Registers a device state change callback */ -/*! - * \param data to pass to callback - * The callback is called if the state for extension is changed - * Return -1 on failure, ID on success - */ -int ast_devstate_add(ast_devstate_cb_type callback, void *data); -void ast_devstate_del(ast_devstate_cb_type callback, void *data); - /*! Deletes a registered state change callback by ID */ /*! * \param id of the callback to delete @@ -629,6 +608,8 @@ char *ast_func_read(struct ast_channel *chan, const char *in, char *workspace, s */ void ast_func_write(struct ast_channel *chan, const char *in, const char *value); +void ast_hint_state_changed(const char *device); + #if defined(__cplusplus) || defined(c_plusplus) } #endif |