| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
Endpoint abstractions. More...
#include "asterisk/endpoints.h"#include "asterisk/stasis.h"#include "asterisk/stasis_cache_pattern.h"#include "asterisk/stringfields.h"

Go to the source code of this file.
| Data Structures | |
| struct | ast_endpoint_blob | 
| Blob of data associated with an endpoint.  More... | |
| struct | ast_endpoint_snapshot | 
| A snapshot of an endpoint's state.  More... | |
| Functions | |
| 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. | |
| 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 stasis_cache * | ast_endpoint_cache (void) | 
| Backend cache for ast_endpoint_topic_all_cached(). | |
| struct stasis_cp_all * | ast_endpoint_cache_all (void) | 
| struct stasis_message_type * | ast_endpoint_contact_state_type (void) | 
| Message type for endpoint contact state changes. | |
| 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 ast_endpoint_snapshot * | ast_endpoint_snapshot_create (struct ast_endpoint *endpoint) | 
| Create a snapshot of an endpoint. | |
| 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_message_type * | ast_endpoint_snapshot_type (void) | 
| Message type for ast_endpoint_snapshot. | |
| int | ast_endpoint_stasis_init (void) | 
| Initialization function for endpoint stasis support. | |
| struct stasis_message_type * | ast_endpoint_state_type (void) | 
| Message type for endpoint state changes. | |
| struct stasis_topic * | ast_endpoint_topic (struct ast_endpoint *endpoint) | 
| Returns the topic for a specific endpoint. | |
| struct stasis_topic * | ast_endpoint_topic_all (void) | 
| Topic for all endpoint related messages. | |
| struct stasis_topic * | ast_endpoint_topic_all_cached (void) | 
| Cached topic for all endpoint related messages. | |
| struct stasis_topic * | ast_endpoint_topic_cached (struct ast_endpoint *endpoint) | 
| Returns the topic for a specific endpoint. | |
| 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.
| snapshot | Endpoint snapshot. | 
| sanitize | The message sanitizer to use on the snapshot | 
| NULL | on error | 
Definition at line 404 of file stasis_endpoints.c.
References ast_assert, ast_endpoint_state_to_string(), ast_json_array_append(), ast_json_integer_create(), ast_json_object_get(), ast_json_object_set(), ast_json_pack(), ast_json_string_create(), ast_json_unref(), stasis_message_sanitizer::channel_id, ast_endpoint_snapshot::channel_ids, ast_endpoint_snapshot::max_channels, NULL, ast_endpoint_snapshot::num_channels, ast_endpoint_snapshot::resource, ast_endpoint_snapshot::state, and ast_endpoint_snapshot::tech.
Referenced by ast_ari_endpoints_get(), ast_ari_endpoints_list(), ast_ari_endpoints_list_by_tech(), contactstatus_to_json(), message_received_handler(), multi_user_event_to_json(), peerstatus_to_json(), and simple_endpoint_event().
| int ast_endpoint_stasis_init | ( | void | ) | 
Initialization function for endpoint stasis support.
Definition at line 464 of file stasis_endpoints.c.
References ast_endpoint_contact_state_type(), ast_endpoint_snapshot_type(), ast_endpoint_state_type(), ast_register_cleanup(), endpoint_cache_all, endpoint_snapshot_get_id(), endpoints_stasis_cleanup(), stasis_cp_all_create(), and STASIS_MESSAGE_TYPE_INIT.
Referenced by asterisk_daemon().