summaryrefslogtreecommitdiffstats
path: root/include/afb/afb-eventid.h
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-04-09 14:18:46 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-06-13 17:14:22 +0200
commit1d550bd6d5caad377a22425cb9f346b011cf527b (patch)
tree4737c37b71d00aba453db02dcdaad59784e10873 /include/afb/afb-eventid.h
parent9dfc52b10b075bf538e9774176178007eec8e48a (diff)
afb-eventid: Fix comments
Change-Id: I4ba49719a4776511d7f5448cd7fbf84caf7474e8 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'include/afb/afb-eventid.h')
-rw-r--r--include/afb/afb-eventid.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/include/afb/afb-eventid.h b/include/afb/afb-eventid.h
index 4c68d029..69d82a75 100644
--- a/include/afb/afb-eventid.h
+++ b/include/afb/afb-eventid.h
@@ -29,7 +29,9 @@
*
* Returns the count of clients that received the event.
*/
-static inline int afb_eventid_broadcast(struct afb_eventid *eventid, struct json_object *object)
+static inline int afb_eventid_broadcast(
+ struct afb_eventid *eventid,
+ struct json_object *object)
{
return eventid->itf->broadcast(eventid, object);
}
@@ -44,13 +46,16 @@ static inline int afb_eventid_broadcast(struct afb_eventid *eventid, struct json
*
* Returns the count of clients that received the event.
*/
-static inline int afb_eventid_push(struct afb_eventid *eventid, struct json_object *object)
+static inline int afb_eventid_push(
+ struct afb_eventid *eventid,
+ struct json_object *object)
{
return eventid->itf->push(eventid, object);
}
/*
* Gets the name associated to 'eventid'.
+ * The returned name can be used until call to 'afb_eventid_unref'.
*/
static inline const char *afb_eventid_name(struct afb_eventid *eventid)
{
@@ -58,8 +63,9 @@ static inline const char *afb_eventid_name(struct afb_eventid *eventid)
}
/*
- * Decrease the count of reference to 'eventid' and
- * destroys the eventid when the reference count falls to zero.
+ * Decrease the count of references to 'eventid'.
+ * Call this function when the evenid is no more used.
+ * It destroys the eventid when the reference count falls to zero.
*/
static inline void afb_eventid_unref(struct afb_eventid *eventid)
{
@@ -67,9 +73,10 @@ static inline void afb_eventid_unref(struct afb_eventid *eventid)
}
/*
- * Increases the count of reference to 'eventid'
+ * Increases the count of references to 'eventid'
*/
-static inline struct afb_eventid *afb_eventid_addref(struct afb_eventid *eventid)
+static inline struct afb_eventid *afb_eventid_addref(
+ struct afb_eventid *eventid)
{
return eventid->itf->addref(eventid);
}