mirror of
https://github.com/asterisk/asterisk.git
synced 2026-06-09 03:45:27 +00:00
METERMAIDS:
----------- - Adding devicestate providers, a new architecture to add non-channel related device state information, like parking lots, queues, meetmes, vending machines and Windows 98 reboots (lots of blinking on those lights) - Adding provider for parking lots, so you can subscribe to the status of a parking lot - Adding provider for meetme, so you can have a blinking lamp for a meetme ( Example: exten => edvina,hint,meetme:1234 ) - Adding support for directed parking - set the PARKINGEXTEN before you manually call Park() and you will be parked on that space. If it's occupied, dialplan execution will continue. This work was sponsored by Voop A/S - www.voop.com git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -44,8 +44,12 @@ extern "C" {
|
||||
/*! Device is ringing *and* in use */
|
||||
#define AST_DEVICE_RINGINUSE 7
|
||||
|
||||
/*! \brief Devicestate watcher call back */
|
||||
typedef int (*ast_devstate_cb_type)(const char *dev, int state, void *data);
|
||||
|
||||
/*! \brief Devicestate provider call back */
|
||||
typedef int (*ast_devstate_prov_cb_type)(const char *data);
|
||||
|
||||
/*! \brief Convert device state to text string for output
|
||||
* \param devstate Current device state
|
||||
*/
|
||||
@@ -95,8 +99,28 @@ int ast_device_state_changed_literal(const char *device);
|
||||
* Return -1 on failure, ID on success
|
||||
*/
|
||||
int ast_devstate_add(ast_devstate_cb_type callback, void *data);
|
||||
|
||||
/*! \brief Unregisters a device state change callback
|
||||
* \param callback 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
|
||||
*/
|
||||
void ast_devstate_del(ast_devstate_cb_type callback, void *data);
|
||||
|
||||
/*! \brief Add device state provider
|
||||
* \param label to use in hint, like label:object
|
||||
* \param callback Callback
|
||||
* Return -1 on failure, ID on success
|
||||
*/
|
||||
int ast_devstate_prov_add(const char *label, ast_devstate_prov_cb_type callback);
|
||||
|
||||
/*! \brief Remove device state provider
|
||||
* \param label to use in hint, like label:object
|
||||
* Return -1 on failure, ID on success
|
||||
*/
|
||||
void ast_devstate_prov_del(const char *label);
|
||||
|
||||
int ast_device_state_engine_init(void);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
|
||||
Reference in New Issue
Block a user