diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-26 16:43:21 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-26 16:43:21 +0000 |
commit | 653b869cfdf3128de920f1a954a590cc398655f2 (patch) | |
tree | 7c4ae410cac4ecff766920eb510930499d5d5a19 /include | |
parent | f6f781f7896a25862974ea01825fa16d2b8882f2 (diff) |
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: http://svn.digium.com/svn/asterisk/trunk@36055 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/devicestate.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/asterisk/devicestate.h b/include/asterisk/devicestate.h index 3c7f5b40e..d93d6d996 100644 --- a/include/asterisk/devicestate.h +++ b/include/asterisk/devicestate.h @@ -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) |