Merge "stasis.c: Added topic_all container"

This commit is contained in:
George Joseph
2019-04-08 10:53:18 -05:00
committed by Gerrit Code Review
2 changed files with 350 additions and 16 deletions

View File

@@ -519,15 +519,56 @@ struct stasis_topic;
*/
struct stasis_topic *stasis_topic_create(const char *name);
/*!
* \brief Create a new topic with given detail.
* \param name Name of the new topic.
* \param detail Detail description of the new topic. i.e. "Queue main topic for subscribing every queue event"
* \return New topic instance.
* \return \c NULL on error.
*
* \note There is no explicit ability to unsubscribe all subscribers
* from a topic and destroy it. As a result the topic can persist until
* the last subscriber unsubscribes itself even if there is no
* publisher.
*/
struct stasis_topic *stasis_topic_create_with_detail(
const char *name, const char *detail);
/*!
* \brief Get a topic of the given name.
* \param name Topic's name.
* \return Name of the topic.
* \return \c NULL on error or not exist.
*
* \note This SHOULD NOT be used in normal operation for publishing messages.
*/
struct stasis_topic *stasis_topic_get(const char *name);
/*!
* \brief Return the uniqueid of a topic.
* \param topic Topic.
* \return Uniqueid of the topic.
* \return \c NULL if topic is \c NULL.
*/
const char *stasis_topic_uniqueid(const struct stasis_topic *topic);
/*!
* \brief Return the name of a topic.
* \param topic Topic.
* \return Name of the topic.
* \return \c NULL if topic is \c NULL.
* \since 12
*/
const char *stasis_topic_name(const struct stasis_topic *topic);
/*!
* \brief Return the detail of a topic.
* \param topic Topic.
* \return Detail of the topic.
* \return \c NULL if topic is \c NULL.
* \since 12
*/
const char *stasis_topic_detail(const struct stasis_topic *topic);
/*!
* \brief Return the number of subscribers of a topic.
* \param topic Topic.