Rename to separate the plug-in and component notions
[babeltrace.git] / include / babeltrace / plugin / notification / notification.h
index 2d73dcc1a79c8fe9d8e5189dfb1b1e411c9a0303..3e3459b8b685d8c97fdf2a2691c2773c44fb4e97 100644 (file)
  * SOFTWARE.
  */
 
-#include <stdint.h>
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 struct bt_notification;
 
-enum bt_plugin_notification_type {
-       BT_PLUGIN_NOTIFICATION_TYPE_UNKNOWN = -1,
-       BT_PLUGIN_NOTIFICATION_TYPE_EVENT = 0, /* see notification/event.h */
+/**
+ * Notification types. Unhandled notification types should be ignored.
+ */
+enum bt_notification_type {
+       BT_NOTIFICATION_TYPE_UNKNOWN = -1,
+
+       /** Event delivery notification, see event.h */
+       BT_NOTIFICATION_TYPE_EVENT = 0,
+
+       /** New stream packet notification, see packet.h */
+       BT_NOTIFICATION_TYPE_NEW_PACKET = 1,
+
+       /** End of stream packet notification, see packet.h */
+       BT_NOTIFICATION_TYPE_END_PACKET = 1,
+
+       /** End of trace notification, see eot.h */
+       BT_NOTIFICATION_TYPE_END_OF_TRACE = 2,
 };
 
-enum bt_plugin_notification_type bt_plugin_notification_get_type(
-               struct bt_plugin_notification *notification);
+/**
+ * Get a notification's type.
+ *
+ * @param notification Notification instance
+ * @returns            One of #bt_notification_type
+ */
+extern enum bt_notification_type bt_notification_get_type(
+               struct bt_notification *notification);
 
-void bt_plugin_notification_get(struct bt_plugin_notification *notification);
-void bt_plugin_notification_put(struct bt_plugin_notification *notification);
+/**
+ * Increments the reference count of \p notification.
+ *
+ * @param notification Notification of which to increment the reference count
+ *
+ * @see bt_notification_put()
+ */
+extern void bt_notification_get(struct bt_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_notification_get()
+ */
+extern void bt_notification_put(
+               struct bt_notification *notification);
 
 #ifdef __cplusplus
 }
This page took 0.04019 seconds and 4 git commands to generate.