60 #if defined(__cplusplus) || defined(c_plusplus)
512 const void *data,
size_t data_len);
753 #if defined(__cplusplus) || defined(c_plusplus)
int ast_event_sub_append_ie_str(struct ast_event_sub *sub, enum ast_event_ie_type ie_type, const char *str)
Append a string parameter to a subscription.
int ast_event_str_to_ie_type(const char *str, enum ast_event_ie_type *ie_type)
Convert a string to an IE type.
int ast_event_sub_append_ie_bitflags(struct ast_event_sub *sub, enum ast_event_ie_type ie_type, uint32_t flags)
Append a bitflags parameter to a subscription.
int ast_event_str_to_event_type(const char *str, enum ast_event_type *event_type)
Convert a string into an event type.
uint32_t ast_event_get_ie_bitflags(const struct ast_event *event, enum ast_event_ie_type ie_type)
Get the value of an information element that has a bitflags payload.
enum ast_event_type ast_event_get_type(const struct ast_event *event)
Get the type for an event.
ast_event_ie_pltype
Payload types for event information elements.
enum ast_event_subscriber_res ast_event_check_subscriber(enum ast_event_type event_type,...)
Check if subscribers exist.
int ast_event_queue_and_cache(struct ast_event *event)
Queue and cache an event.
void ast_event_report_subs(const struct ast_event_sub *sub)
Report current subscriptions to a subscription subscriber.
struct ast_event_sub * event_sub
ast_event_subscriber_res
Results for checking for subscribers.
const char * ast_event_subscriber_get_description(struct ast_event_sub *sub)
Get description for a subscription.
struct ast_event * ast_event_get_cached(enum ast_event_type,...)
Retrieve an event from the cache.
int ast_event_append_ie_bitflags(struct ast_event **event, enum ast_event_ie_type ie_type, uint32_t bitflags)
Append an information element that has a bitflags payload.
uint32_t ast_event_iterator_get_ie_bitflags(struct ast_event_iterator *iterator)
Get the value of the current IE in the iterator as a bitflags payload.
enum ast_event_ie_pltype ast_event_get_ie_pltype(enum ast_event_ie_type ie_type)
Get the payload type for a given information element type.
supposed to be an opaque type
void ast_event_sub_destroy(struct ast_event_sub *sub)
Destroy an allocated subscription.
uint32_t ast_event_get_ie_str_hash(const struct ast_event *event, enum ast_event_ie_type ie_type)
Get the hash for the string payload of an IE.
int ast_event_queue(struct ast_event *event)
Queue an event.
ast_event_ie_type
Event Information Element types.
ast_event_type
Event types.
void(* ast_event_cb_t)(const struct ast_event *event, void *userdata)
Subscriber event callback type.
int ast_event_sub_append_ie_raw(struct ast_event_sub *sub, enum ast_event_ie_type ie_type, void *data, size_t raw_datalen)
Append a raw parameter to a subscription.
const void * ast_event_get_ie_raw(const struct ast_event *event, enum ast_event_ie_type ie_type)
Get the value of an information element that has a raw payload.
void ast_event_dump_cache(const struct ast_event_sub *event_sub)
Dump the event cache for the subscriber.
int ast_event_append_ie_raw(struct ast_event **event, enum ast_event_ie_type ie_type, const void *data, size_t data_len)
Append an information element that has a raw payload.
int ast_event_sub_activate(struct ast_event_sub *sub)
Activate a dynamically built subscription.
int ast_event_append_ie_str(struct ast_event **event, enum ast_event_ie_type ie_type, const char *str)
Append an information element that has a string payload.
size_t ast_event_minimum_length(void)
Get the minimum length of an ast_event.
int ast_event_sub_append_ie_uint(struct ast_event_sub *sub, enum ast_event_ie_type ie_type, uint32_t uint)
Append a uint parameter to a subscription.
uint32_t ast_event_get_ie_uint(const struct ast_event *event, enum ast_event_ie_type ie_type)
Get the value of an information element that has an integer payload.
int ast_event_iterator_init(struct ast_event_iterator *iterator, const struct ast_event *event)
Initialize an event iterator instance.
void ast_event_destroy(struct ast_event *event)
Destroy an event.
int ast_event_iterator_next(struct ast_event_iterator *iterator)
Move iterator instance to next IE.
struct ast_event * ast_event_new(enum ast_event_type event_type,...)
Create a new event.
struct ast_event_sub * ast_event_subscribe(enum ast_event_type event_type, ast_event_cb_t cb, const char *description, void *userdata,...)
Subscribe to events.
uint32_t ast_event_iterator_get_ie_uint(struct ast_event_iterator *iterator)
Get the value of the current IE in the iterator as an integer payload.
int ast_event_append_eid(struct ast_event **event)
Append the global EID IE.
uint16_t ast_event_iterator_get_ie_raw_payload_len(struct ast_event_iterator *iterator)
Get the length of the raw payload for the current IE for an iterator.
const char * ast_event_get_ie_type_name(enum ast_event_ie_type ie_type)
Get the string representation of an information element type.
const char * ast_event_iterator_get_ie_str(struct ast_event_iterator *iterator)
Get the value of the current IE in the iterator as a string payload.
size_t ast_event_get_size(const struct ast_event *event)
Get the size of an event.
const char * ast_event_get_type_name(const struct ast_event *event)
Get the string representation of the type of the given event.
const char * ast_event_get_ie_str(const struct ast_event *event, enum ast_event_ie_type ie_type)
Get the value of an information element that has a string payload.
void * ast_event_iterator_get_ie_raw(struct ast_event_iterator *iterator)
Get the value of the current IE in the iterator instance that has a raw payload.
enum ast_event_ie_type ast_event_iterator_get_ie_type(struct ast_event_iterator *iterator)
Get the type of the current IE in the iterator instance.
struct ast_event_sub * ast_event_unsubscribe(struct ast_event_sub *event_sub)
Un-subscribe from events.
struct ast_event_sub * ast_event_subscribe_new(enum ast_event_type type, ast_event_cb_t cb, void *userdata)
Allocate a subscription, but do not activate it.
uint16_t ast_event_get_ie_raw_payload_len(const struct ast_event *event, enum ast_event_ie_type ie_type)
Get the length of the raw payload for a particular IE.
int ast_event_append_ie_uint(struct ast_event **event, enum ast_event_ie_type ie_type, uint32_t data)
Append an information element that has an integer payload.
int ast_event_sub_append_ie_exists(struct ast_event_sub *sub, enum ast_event_ie_type ie_type)
Append an 'exists' parameter to a subscription.