Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
#include <babeltrace/babeltrace-internal.h>
#include <babeltrace/object-internal.h>
#include <babeltrace/plugin/notification/notification.h>
+#include <babeltrace/ctf-ir/stream.h>
#ifdef __cplusplus
extern "C" {
#endif
+typedef struct bt_ctf_stream *(*get_stream_func)(
+ struct bt_notification *notification);
+
struct bt_notification {
struct bt_object base;
enum bt_notification_type type;
+ get_stream_func get_stream;
};
BT_HIDDEN
*/
#include <babeltrace/plugin/notification/notification.h>
+#include <babeltrace/ctf-ir/stream.h>
#ifdef __cplusplus
extern "C" {
{
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;
+}