summaryrefslogtreecommitdiff
path: root/include/asterisk/devicestate.h
diff options
context:
space:
mode:
authorOlle Johansson <oej@edvina.net>2006-06-26 16:43:21 +0000
committerOlle Johansson <oej@edvina.net>2006-06-26 16:43:21 +0000
commitf8311adcdafbe3e8692f99e2e064112a591972da (patch)
tree7c4ae410cac4ecff766920eb510930499d5d5a19 /include/asterisk/devicestate.h
parente2b0c5b55852d20ff90c2d9d95fed1534060b864 (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: https://origsvn.digium.com/svn/asterisk/trunk@36055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/devicestate.h')
-rw-r--r--include/asterisk/devicestate.h24
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)