mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Merge enhanced status changes, add SIP subscribe from Andre
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -48,7 +48,7 @@ struct ast_include;
|
||||
struct ast_ignorepat;
|
||||
struct ast_sw;
|
||||
|
||||
typedef int (*ast_notify_cb_type)(char *context, char* id, int state, void *data);
|
||||
typedef int (*ast_state_cb_type)(char *context, char* id, int state, void *data);
|
||||
|
||||
//! Data structure associated with an asterisk switch
|
||||
struct ast_switch {
|
||||
@@ -215,12 +215,13 @@ int ast_extension_state(struct ast_channel *c, char *context, char *exten);
|
||||
|
||||
//! Tells Asterisk the State for Device is changed
|
||||
/*!
|
||||
* \param device devicename like a dialstring
|
||||
* \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(char *device);
|
||||
int ast_device_state_changed(const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
//! Registers a state change callback
|
||||
/*!
|
||||
@@ -232,7 +233,7 @@ int ast_device_state_changed(char *device);
|
||||
* Return -1 on failure, ID on success
|
||||
*/
|
||||
int ast_extension_state_add(char *context, char *exten,
|
||||
ast_notify_cb_type callback, void *data);
|
||||
ast_state_cb_type callback, void *data);
|
||||
|
||||
//! Deletes a registered state change callback by ID
|
||||
/*!
|
||||
@@ -240,7 +241,7 @@ int ast_extension_state_add(char *context, char *exten,
|
||||
* Removes the callback from list of callbacks
|
||||
* Return 0 on success, -1 on failure
|
||||
*/
|
||||
int ast_extension_state_del(int id);
|
||||
int ast_extension_state_del(int id, ast_state_cb_type callback);
|
||||
|
||||
//! If an extension exists, return non-zero
|
||||
/*!
|
||||
|
Reference in New Issue
Block a user