ref.h: doc: fix typo
[babeltrace.git] / lib / plugin-system / notification / notification.c
index a8bb0882da0ee71a1d7387704d83e4c5d68bf469..139caed0b85f7d6eb966a23992c64c668091fffd 100644 (file)
 
 #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(&notification->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;
+}
This page took 0.041247 seconds and 4 git commands to generate.