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