Add notification documentation
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 19 May 2015 16:11:50 +0000 (12:11 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 16:54:31 +0000 (12:54 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/babeltrace/plugin/notification/eot.h [new file with mode: 0644]
include/babeltrace/plugin/notification/notification.h
include/babeltrace/plugin/notification/packet.h [new file with mode: 0644]

diff --git a/include/babeltrace/plugin/notification/eot.h b/include/babeltrace/plugin/notification/eot.h
new file mode 100644 (file)
index 0000000..e69de29
index 6db3a503078547d71efad3822066152d4d76df10..a15fde6a99f24f154888bb0c8662a81316dc31a7 100644 (file)
@@ -35,16 +35,48 @@ extern "C" {
 
 struct bt_notification;
 
+/**
+ * Notification types. Unhandled notification types should be ignored.
+ */
 enum bt_plugin_notification_type {
        BT_PLUGIN_NOTIFICATION_TYPE_UNKNOWN = -1,
-       BT_PLUGIN_NOTIFICATION_TYPE_EVENT = 0, /* see notification/event.h */
-       BT_PLUGIN_NOTIFICATION_TYPE_EVENTS_DISCARDED = 0, /* see notification/events-discarded.h */
+
+       /** Event delivery notification, see event.h */
+       BT_PLUGIN_NOTIFICATION_TYPE_EVENT = 0,
+
+       /** New stream packet notification, see packet.h */
+       BT_PLUGIN_NOTIFICATION_TYPE_NEW_PACKET = 1,
+
+       /** End of trace notification, see eot.h */
+       BT_PLUGIN_NOTIFICATION_TYPE_EOT = 2,
 };
 
+/**
+ * Get a notification's type.
+ *
+ * @param notification Notification instance
+ * @returns            One of #bt_plugin_notification_type
+ */
 enum bt_plugin_notification_type bt_plugin_notification_get_type(
                struct bt_plugin_notification *notification);
 
+/**
+ * Increments the reference count of \p notifiaction.
+ *
+ * @param notification Notification of which to increment the reference count
+ *
+ * @see bt_plugin_notification_put()
+ */
 void bt_plugin_notification_get(struct bt_plugin_notification *notification);
+
+/**
+ * Decrements the reference count of \p notification, destroying it when this
+ * count reaches 0.
+ *
+ * @param notification Notification of which to decrement the reference count
+ *
+ * @see bt_plugin_notification_get()
+ */
 void bt_plugin_notification_put(struct bt_plugin_notification *notification);
 
 #ifdef __cplusplus
diff --git a/include/babeltrace/plugin/notification/packet.h b/include/babeltrace/plugin/notification/packet.h
new file mode 100644 (file)
index 0000000..e69de29
This page took 0.025857 seconds and 4 git commands to generate.