37#ifndef _ASTERISK_DEVICESTATE_H
38#define _ASTERISK_DEVICESTATE_H
43#if defined(__cplusplus) || defined(c_plusplus)
150 __attribute__((format(printf, 3, 4)));
321#define ast_publish_device_state(device, state, cachable) \
322 ast_publish_device_state_full(device, state, cachable, &ast_eid_default)
340#if defined(__cplusplus) || defined(c_plusplus)
ast_channel_state
ast_channel states
struct stasis_message_type * ast_device_state_message_type(void)
Get the Stasis message type for device state messages.
int ast_devstate_prov_del(const char *label)
Remove device state provider.
ast_devstate_cache
Device State Cachability.
@ AST_DEVSTATE_NOT_CACHABLE
const char * ast_devstate_str(enum ast_device_state devstate) attribute_pure
Convert device state to text string that is easier to parse.
void ast_devstate_aggregate_add(struct ast_devstate_aggregate *agg, enum ast_device_state state)
Add a device state to the aggregate device state.
struct stasis_cache * ast_device_state_cache(void)
Backend cache for ast_device_state_topic_cached()
int ast_devstate_changed(enum ast_device_state state, enum ast_devstate_cache cachable, const char *fmt,...)
Tells Asterisk the State for Device is changed.
void ast_devstate_aggregate_init(struct ast_devstate_aggregate *agg)
Initialize aggregate device state.
struct stasis_topic * ast_device_state_topic_cached(void)
Get the Stasis caching topic for device state messages.
const char * ast_devstate2str(enum ast_device_state devstate) attribute_pure
Convert device state to text string for output.
struct stasis_topic * ast_device_state_topic_all(void)
Get the Stasis topic for device state messages.
enum ast_device_state ast_devstate_aggregate_result(struct ast_devstate_aggregate *agg)
Get the aggregate device state result.
enum ast_device_state ast_state_chan2dev(enum ast_channel_state chanstate)
Convert channel state to devicestate.
enum ast_device_state ast_parse_device_state(const char *device)
Search the Channels by Name.
int devstate_init(void)
Initialize the device state core.
int ast_device_state_clear_cache(const char *device)
Clear the device from the stasis cache.
int ast_devstate_changed_literal(enum ast_device_state state, enum ast_devstate_cache cachable, const char *device)
Tells Asterisk the State for Device is changed.
enum ast_device_state ast_devstate_val(const char *val)
Convert device state from text to integer value.
struct stasis_topic * ast_device_state_topic(const char *device)
Get the Stasis topic for device state messages for a specific device.
int ast_devstate_prov_add(const char *label, ast_devstate_prov_cb_type callback)
Add device state provider.
enum ast_device_state(* ast_devstate_prov_cb_type)(const char *data)
Devicestate provider call back.
ast_device_state
Device States.
int ast_publish_device_state_full(const char *device, enum ast_device_state state, enum ast_devstate_cache cachable, struct ast_eid *eid)
Publish a device state update with EID.
The structure that contains device state.
enum ast_device_state state
const struct ast_eid * eid
The EID of the server where this message originated.
enum ast_devstate_cache cachable
You shouldn't care about the contents of this struct.
enum ast_device_state state
An Entity ID is essentially a MAC address, brief and unique.