19 #ifndef _ASTERISK_STASIS_ENDPOINTS_H 20 #define _ASTERISK_STASIS_ENDPOINTS_H
Caching pattern for Stasis Message Bus API topics.
struct ast_endpoint_snapshot * ast_endpoint_snapshot_create(struct ast_endpoint *endpoint)
Create a snapshot of an endpoint.
struct stasis_cp_all * ast_endpoint_cache_all(void)
Stasis Message Bus API. See Stasis Message Bus API for detailed documentation.
struct stasis_message * ast_endpoint_blob_create(struct ast_endpoint *endpoint, struct stasis_message_type *type, struct ast_json *blob)
Creates a ast_endpoint_blob message.
struct stasis_message_type * ast_endpoint_snapshot_type(void)
Message type for ast_endpoint_snapshot.
struct ast_endpoint_snapshot * ast_endpoint_latest_snapshot(const char *tech, const char *resource)
Retrieve the most recent snapshot for the endpoint with the given name.
struct stasis_topic * ast_endpoint_topic(struct ast_endpoint *endpoint)
Returns the topic for a specific endpoint.
int ast_endpoint_stasis_init(void)
Initialization function for endpoint stasis support.
#define AST_DECLARE_STRING_FIELDS(field_list)
Declare the fields needed in a structure.
ast_endpoint_state
Valid states for an endpoint.
Blob of data associated with an endpoint.
Structure containing callbacks for Stasis message sanitization.
struct stasis_topic * ast_endpoint_topic_all_cached(void)
Cached topic for all endpoint related messages.
#define AST_STRING_FIELD(name)
Declare a string field.
const ast_string_field resource
A snapshot of an endpoint's state.
struct stasis_topic * ast_endpoint_topic_cached(struct ast_endpoint *endpoint)
Returns the topic for a specific endpoint.
const ast_string_field tech
struct stasis_message_type * ast_endpoint_state_type(void)
Message type for endpoint state changes.
struct stasis_topic * ast_endpoint_topic_all(void)
Topic for all endpoint releated messages.
void ast_endpoint_blob_publish(struct ast_endpoint *endpoint, struct stasis_message_type *type, struct ast_json *blob)
Creates and publishes a ast_endpoint_blob message.
struct ast_endpoint_snapshot * snapshot
struct stasis_message_type * ast_endpoint_contact_state_type(void)
Message type for endpoint contact state changes.
Abstract JSON element (object, array, string, int, ...).
enum ast_endpoint_state state
struct ast_json * ast_endpoint_snapshot_to_json(const struct ast_endpoint_snapshot *snapshot, const struct stasis_message_sanitizer *sanitize)
Build a JSON object from a ast_endpoint_snapshot.
struct stasis_cache * ast_endpoint_cache(void)
Backend cache for ast_endpoint_topic_all_cached().