#include <babeltrace/plugin/notification/notification-internal.h>
+BT_HIDDEN
+void bt_notification_init(struct bt_notification *notification,
+ enum bt_notification_type type,
+ bt_object_release_func release)
+{
+ assert(type > BT_NOTIFICATION_TYPE_ALL &&
+ type < BT_NOTIFICATION_TYPE_NR);
+ notification->type = type;
+ bt_object_init(¬ification->base, release);
+}
+
enum bt_notification_type bt_notification_get_type(
struct bt_notification *notification)
{
return notification ? notification->type : BT_NOTIFICATION_TYPE_UNKNOWN;
}
+
+struct bt_ctf_stream *bt_notification_get_stream(
+ struct bt_notification *notification)
+{
+ struct bt_ctf_stream *stream = NULL;
+
+ if (!notification || !notification->get_stream) {
+ goto end;
+ }
+
+ stream = notification->get_stream(notification);
+end:
+ return stream;
+}