aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/devicestate.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asterisk/devicestate.h')
-rw-r--r--include/asterisk/devicestate.h79
1 files changed, 43 insertions, 36 deletions
diff --git a/include/asterisk/devicestate.h b/include/asterisk/devicestate.h
index ab37fe1ed..b0bf5bfcf 100644
--- a/include/asterisk/devicestate.h
+++ b/include/asterisk/devicestate.h
@@ -23,7 +23,7 @@
* method. For an example, see apps/app_queue.c.
*
* \todo Currently, when the state of a device changes, the device state provider
- * calls one of the functions defined here to queue an object to say that the
+ * calls one of the functions defined here to queue an object to say that the
* state of a device has changed. However, this does not include the new state.
* Another thread processes these device state change objects and calls the
* device state provider's callback to figure out what the new state is. It
@@ -41,7 +41,7 @@
extern "C" {
#endif
-/*! \brief Device States
+/*! \brief Device States
* \note The order of these states may not change because they are included
* in Asterisk events which may be transmitted across the network to
* other servers.
@@ -65,24 +65,25 @@ typedef enum ast_device_state (*ast_devstate_prov_cb_type)(const char *data);
* \brief Convert channel state to devicestate
*
* \param chanstate Current channel state
+ * \since 1.6.1
*/
enum ast_device_state ast_state_chan2dev(enum ast_channel_state chanstate);
-/*!
- * \brief Convert device state to text string for output
+/*!
+ * \brief Convert device state to text string for output
*
- * \param devstate Current device state
+ * \param devstate Current device state
*/
const char *devstate2str(enum ast_device_state devstate);
-/*!
- * \brief Convert device state to text string that is easier to parse
+/*!
+ * \brief Convert device state to text string that is easier to parse
*
- * \param devstate Current device state
+ * \param devstate Current device state
*/
const char *ast_devstate_str(enum ast_device_state devstate);
-/*!
+/*!
* \brief Convert device state from text to integer value
*
* \param val The text representing the device state. Valid values are anything
@@ -92,12 +93,12 @@ const char *ast_devstate_str(enum ast_device_state devstate);
*/
enum ast_device_state ast_devstate_val(const char *val);
-/*!
+/*!
* \brief Search the Channels by Name
*
* \param device like a dial string
*
- * Search the Device in active channels by compare the channel name against
+ * Search the Device in active channels by compare the channel name against
* the device name. Compared are only the first chars to the first '-' char.
*
* \retval AST_DEVICE_UNKNOWN if no channel found
@@ -105,7 +106,7 @@ enum ast_device_state ast_devstate_val(const char *val);
*/
enum ast_device_state ast_parse_device_state(const char *device);
-/*!
+/*!
* \brief Asks a channel for device state
*
* \param device like a dial string
@@ -115,12 +116,12 @@ enum ast_device_state ast_parse_device_state(const char *device);
* Tries the channel device state callback if not supported search in the
* active channels list for the device.
*
- * \retval an AST_DEVICE_??? state
+ * \retval an AST_DEVICE_??? state
* \retval -1 on failure
*/
enum ast_device_state ast_device_state(const char *device);
-/*!
+/*!
* \brief Tells Asterisk the State for Device is changed
*
* \param state the new state of the device
@@ -130,13 +131,13 @@ enum ast_device_state ast_device_state(const char *device);
* of device states. It will also be stored in the internal event
* cache.
*
- * \retval 0 on success
+ * \retval 0 on success
* \retval -1 on failure
*/
int ast_devstate_changed(enum ast_device_state state, const char *fmt, ...)
__attribute__((format(printf, 2, 3)));
-/*!
+/*!
* \brief Tells Asterisk the State for Device is changed
*
* \param state the new state of the device
@@ -146,62 +147,65 @@ int ast_devstate_changed(enum ast_device_state state, const char *fmt, ...)
* of device states. It will also be stored in the internal event
* cache.
*
- * \retval 0 on success
+ * \retval 0 on success
* \retval -1 on failure
*/
int ast_devstate_changed_literal(enum ast_device_state state, const char *device);
-/*!
- * \brief Tells Asterisk the State for Device is changed
+/*!
+ * \brief Tells Asterisk the State for Device is changed.
+ * (Accept change notification, add it to change queue.)
*
* \param fmt device name like a dial string with format parameters
*
* Asterisk polls the new extension states and calls the registered
* callbacks for the changed extensions
*
- * \retval 0 on success
+ * \retval 0 on success
* \retval -1 on failure
*
* \note This is deprecated in favor of ast_devstate_changed()
+ * \version 1.6.1 deprecated
*/
int ast_device_state_changed(const char *fmt, ...)
__attribute__((deprecated,format(printf, 1, 2)));
-/*!
- * \brief Tells Asterisk the State for Device is changed
+/*!
+ * \brief Tells Asterisk the State for Device is changed
*
* \param device device name like a dial string
*
* Asterisk polls the new extension states and calls the registered
* callbacks for the changed extensions
*
- * \retval 0 on success
+ * \retval 0 on success
* \retval -1 on failure
*
* \note This is deprecated in favor of ast_devstate_changed_literal()
+ * \version 1.6.1 deprecated
*/
int ast_device_state_changed_literal(const char *device)
__attribute__((deprecated));
-/*!
- * \brief Add device state provider
+/*!
+ * \brief Add device state provider
*
* \param label to use in hint, like label:object
* \param callback Callback
*
* \retval 0 success
* \retval -1 failure
- */
+ */
int ast_devstate_prov_add(const char *label, ast_devstate_prov_cb_type callback);
-/*!
- * \brief Remove device state provider
+/*!
+ * \brief Remove device state provider
*
* \param label to use in hint, like label:object
*
- * \retval -1 on failure
+ * \retval -1 on failure
* \retval 0 on success
- */
+ */
int ast_devstate_prov_del(const char *label);
/*!
@@ -212,33 +216,36 @@ struct ast_devstate_aggregate;
/*!
* \brief Initialize aggregate device state
*
- * \param agg the state object
+ * \param[in] agg the state object
*
* \return nothing
+ * \since 1.6.1
*/
void ast_devstate_aggregate_init(struct ast_devstate_aggregate *agg);
/*!
* \brief Add a device state to the aggregate device state
*
- * \param agg the state object
- * \param state the state to add
+ * \param[in] agg the state object
+ * \param[in] state the state to add
*
* \return nothing
+ * \since 1.6.1
*/
void ast_devstate_aggregate_add(struct ast_devstate_aggregate *agg, enum ast_device_state state);
/*!
* \brief Get the aggregate device state result
*
- * \param agg the state object
+ * \param[in] agg the state object
*
* \return the aggregate device state after adding some number of device states.
+ * \since 1.6.1
*/
enum ast_device_state ast_devstate_aggregate_result(struct ast_devstate_aggregate *agg);
-/*!
- * \brief You shouldn't care about the contents of this struct
+/*!
+ * \brief You shouldn't care about the contents of this struct
*
* This struct is only here so that it can be easily declared on the stack.
*/