summaryrefslogtreecommitdiff
path: root/include/asterisk/stasis.h
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-05-08 13:39:08 +0000
committerDavid M. Lee <dlee@digium.com>2013-05-08 13:39:08 +0000
commite06e519a908dd7640764778cfb91c29699f3f679 (patch)
treef85a10cf963caba787a9e506963e0ef4d63c0ff1 /include/asterisk/stasis.h
parentefd28c676a4a467f1bb31d3359c43c2f1d70029b (diff)
Initial support for endpoints.
An endpoint is an external device/system that may offer/accept channels to/from Asterisk. While this is a very useful concept for end users, it is surprisingly not a core concept within Asterisk itself. This patch defines ast_endpoint as a separate object, which channel drivers may use to expose their concept of an endpoint. As the channel driver creates channels, it can use ast_endpoint_add_channel() to associate channels to the endpoint. This updated the endpoint appropriately, and forwards all of the channel's events to the endpoint's topic. In order to avoid excessive locking on the endpoint object itself, the mutable state is not accessible via getters. Instead, you can create a snapshot using ast_endpoint_snapshot_create() to get a consistent snapshot of the internal state. This patch also includes a set of topics and messages associated with endpoints, and implementations of the endpoint-related RESTful API. chan_sip was updated to create endpoints with SIP peers, but the state of the endpoints is not updated with the state of the peer. Along for the ride in this patch is a Stasis test API. This is a stasis_message_sink object, which can be subscribed to a Stasis topic. It has functions for blocking while waiting for conditions in the message sink to be fulfilled. (closes issue ASTERISK-21421) Review: https://reviewboard.asterisk.org/r/2492/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/stasis.h')
-rw-r--r--include/asterisk/stasis.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/asterisk/stasis.h b/include/asterisk/stasis.h
index 07c3c5c6b..48d51e369 100644
--- a/include/asterisk/stasis.h
+++ b/include/asterisk/stasis.h
@@ -431,6 +431,22 @@ struct stasis_cache_update {
};
/*!
+ * \brief Cache clear message.
+ */
+struct stasis_cache_clear {
+ /*! Type of object being cleared from the cache */
+ struct stasis_message_type *type;
+ /*! Id of the object being cleared from the cache */
+ char id[];
+};
+
+/*!
+ * \brief Message type for \ref stasis_cache_clear.
+ * \since 12
+ */
+struct stasis_message_type *stasis_cache_clear_type(void);
+
+/*!
* \brief A message which instructs the caching topic to remove an entry from its cache.
* \param type Message type.
* \param id Unique id of the snapshot to clear.