lib: remove BT_NOTIFICATION_TYPE_{UNKNOWN,NR}
[babeltrace.git] / lib / graph / notification / notification.c
index 0bcfb7dfbdacf225ba6f6898b1d105f5aba6f8e3..5a835092001e48528857b4d46d0b6ae32b5712e5 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * Babeltrace Plug-in Notification
- *
  * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
@@ -27,6 +25,7 @@
 #define BT_LOG_TAG "NOTIF"
 #include <babeltrace/lib-logging-internal.h>
 
+#include <babeltrace/graph/private-notification.h>
 #include <babeltrace/graph/notification-internal.h>
 #include <babeltrace/graph/graph-internal.h>
 #include <babeltrace/assert-internal.h>
@@ -50,10 +49,11 @@ void bt_notification_init(struct bt_notification *notification,
                bt_object_release_func release,
                struct bt_graph *graph)
 {
-       BT_ASSERT(type >= 0 && type < BT_NOTIFICATION_TYPE_NR);
+       BT_ASSERT(type >= 0 &&
+               type <= BT_NOTIFICATION_TYPE_PACKET_END);
        notification->type = type;
        init_seq_num(notification);
-       bt_object_init(&notification->base, release);
+       bt_object_init_shared(&notification->base, release);
        notification->graph = graph;
 
        if (graph) {
This page took 0.024563 seconds and 4 git commands to generate.