-#ifndef BABELTRACE_COMPONENT_NOTIFICATION_ITERATOR_INTERNAL_H
-#define BABELTRACE_COMPONENT_NOTIFICATION_ITERATOR_INTERNAL_H
+#ifndef BABELTRACE_GRAPH_NOTIFICATION_ITERATOR_INTERNAL_H
+#define BABELTRACE_GRAPH_NOTIFICATION_ITERATOR_INTERNAL_H
/*
* BabelTrace - Notification Iterator Internal
#include <babeltrace/babeltrace-internal.h>
#include <babeltrace/object-internal.h>
-#include <babeltrace/ref-internal.h>
#include <babeltrace/graph/connection.h>
#include <babeltrace/graph/notification.h>
#include <babeltrace/graph/notification-iterator.h>
struct bt_notification_iterator {
struct bt_object base;
enum bt_notification_iterator_type type;
- struct bt_notification *current_notification; /* owned by this */
+ GPtrArray *notifs;
};
struct bt_notification_iterator_private_connection {
struct bt_component *upstream_component; /* Weak */
struct bt_port *upstream_port; /* Weak */
struct bt_connection *connection; /* Weak */
+ struct bt_graph *graph; /* Weak */
/*
* This hash table keeps the state of a stream as viewed by
struct bt_notification_iterator base;
struct bt_graph *graph; /* Owned by this */
struct bt_component *colander; /* Owned by this */
- struct bt_port *output_port; /* Owned by this */
-};
-
-static inline
-struct bt_notification *bt_notification_iterator_borrow_current_notification(
- struct bt_notification_iterator *iterator)
-{
- BT_ASSERT(iterator);
- return iterator->current_notification;
-}
-static inline
-void bt_notification_iterator_replace_current_notification(
- struct bt_notification_iterator *iterator,
- struct bt_notification *notification)
-{
- BT_ASSERT(iterator);
- bt_put(iterator->current_notification);
- iterator->current_notification = bt_get(notification);
-}
-
-static inline
-struct bt_notification_iterator_private_connection *
-bt_private_connection_notification_iterator_borrow_from_private(
- struct bt_private_connection_private_notification_iterator *private_notification_iterator)
-{
- return (void *) private_notification_iterator;
-}
+ /*
+ * Only used temporarily as a bridge between a colander sink and
+ * the user.
+ */
+ uint64_t count;
+};
static inline
struct bt_private_connection_private_notification_iterator *
}
};
-#endif /* BABELTRACE_COMPONENT_NOTIFICATION_ITERATOR_INTERNAL_H */
+#endif /* BABELTRACE_GRAPH_NOTIFICATION_ITERATOR_INTERNAL_H */