X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fgraph%2Fnotification-iterator-internal.h;h=55aa4e6210d09942c493d62ec9524b60aec1960c;hb=312c056ae3d374b253fa0cfe5ed576c0b0e5e569;hp=ab545008d94942638f7388858b91bd13919bd2c8;hpb=50842bdc4c21f3de2b63e29cdac730af8b6dcca6;p=babeltrace.git diff --git a/include/babeltrace/graph/notification-iterator-internal.h b/include/babeltrace/graph/notification-iterator-internal.h index ab545008..55aa4e62 100644 --- a/include/babeltrace/graph/notification-iterator-internal.h +++ b/include/babeltrace/graph/notification-iterator-internal.h @@ -1,5 +1,5 @@ -#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 @@ -34,8 +34,8 @@ #include #include #include +#include #include -#include struct bt_port; struct bt_graph; @@ -95,43 +95,27 @@ struct bt_notification_iterator_private_connection { struct bt_component *upstream_component; /* Weak */ struct bt_port *upstream_port; /* Weak */ struct bt_connection *connection; /* Weak */ - GQueue *queue; /* struct bt_notification * (owned by this) */ /* * This hash table keeps the state of a stream as viewed by - * this notification iterator. This is used to: + * this notification iterator. This is used to, in developer + * mode: * * * Automatically enqueue "stream begin", "packet begin", * "packet end", and "stream end" notifications depending * on the stream's state and on the next notification returned * by the upstream component. * - * * Make sure that, once the notification iterator has seen - * a "stream end" notification for a given stream, that no - * other notifications which refer to this stream can be - * delivered by this iterator. + * * Make sure that, once the notification iterator has seen a + * "stream end" notification for a given stream, no other + * notifications which refer to this stream can be delivered + * by this iterator. * * The key (struct bt_stream *) is not owned by this. The * value is an allocated state structure. */ GHashTable *stream_states; - /* - * This is an array of actions which can be rolled back. It's - * similar to the memento pattern, but it's not exactly that. It - * is allocated once and reset for each notification to process. - * More details near the implementation. - */ - GArray *actions; - - /* - * This is a mask of notifications to which the user of this - * iterator is subscribed - * (see enum bt_private_connection_notification_iterator_notif_type - * above). - */ - uint32_t subscription_mask; - enum bt_private_connection_notification_iterator_state state; void *user_data; }; @@ -147,7 +131,7 @@ static inline struct bt_notification *bt_notification_iterator_borrow_current_notification( struct bt_notification_iterator *iterator) { - assert(iterator); + BT_ASSERT(iterator); return iterator->current_notification; } @@ -156,7 +140,7 @@ void bt_notification_iterator_replace_current_notification( struct bt_notification_iterator *iterator, struct bt_notification *notification) { - assert(iterator); + BT_ASSERT(iterator); bt_put(iterator->current_notification); iterator->current_notification = bt_get(notification); } @@ -181,7 +165,6 @@ BT_HIDDEN enum bt_connection_status bt_private_connection_notification_iterator_create( struct bt_component *upstream_comp, struct bt_port *upstream_port, - const enum bt_notification_type *notification_types, struct bt_connection *connection, struct bt_notification_iterator_private_connection **iterator); @@ -238,4 +221,4 @@ const char *bt_private_connection_notification_iterator_state_string( } }; -#endif /* BABELTRACE_COMPONENT_NOTIFICATION_ITERATOR_INTERNAL_H */ +#endif /* BABELTRACE_GRAPH_NOTIFICATION_ITERATOR_INTERNAL_H */