*_string() enumerator to string functions: remove common prefix
[babeltrace.git] / src / lib / graph / message / iterator.h
index d28a88102ac0be6dc53cdb44aae8c8dc88baa7d6..f48872ece5dde7d748f895ad430bf2dff8754280 100644 (file)
@@ -31,7 +31,7 @@
 #include <babeltrace2/types.h>
 #include "common/assert.h"
 #include <stdbool.h>
-#include <compat/uuid.h>
+#include "common/uuid.h"
 
 struct bt_port;
 struct bt_graph;
@@ -103,6 +103,27 @@ struct bt_self_component_port_input_message_iterator {
        struct bt_connection *connection; /* Weak */
        struct bt_graph *graph; /* Weak */
 
+       /*
+        * Array of
+        * `struct bt_self_component_port_input_message_iterator *`
+        * (weak).
+        *
+        * This is an array of upstream message iterators on which this
+        * iterator depends. The references are weak: an upstream
+        * message iterator is responsible for removing its entry within
+        * this array on finalization/destruction.
+        */
+       GPtrArray *upstream_msg_iters;
+
+       /*
+        * Downstream message iterator which depends on this message
+        * iterator (weak).
+        *
+        * This can be `NULL` if this message iterator's owner is a sink
+        * component.
+        */
+       struct bt_self_component_port_input_message_iterator *downstream_msg_iter;
+
        struct {
                bt_self_component_port_input_message_iterator_next_method next;
                bt_self_component_port_input_message_iterator_seek_ns_from_origin_method seek_ns_from_origin;
@@ -144,7 +165,7 @@ struct bt_self_component_port_input_message_iterator {
                 * irrelevant (as the clock will be correlatable with other
                 * clocks having the same origin).
                 */
-               uint8_t uuid[BABELTRACE_UUID_LEN];
+               bt_uuid_t uuid;
        } clock_expectation;
 
        /*
@@ -205,19 +226,19 @@ const char *bt_self_component_port_input_message_iterator_state_string(
 {
        switch (state) {
        case BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ACTIVE:
-               return "BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ACTIVE";
+               return "ACTIVE";
        case BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ENDED:
-               return "BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ENDED";
+               return "ENDED";
        case BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_FINALIZING:
-               return "BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_FINALIZING";
+               return "FINALIZING";
        case BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_FINALIZED:
-               return "BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_FINALIZED";
+               return "FINALIZED";
        case BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_SEEKING:
-               return "BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_SEEKING";
+               return "SEEKING";
        case BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_AGAIN:
-               return "BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_AGAIN";
+               return "LAST_SEEKING_RETURNED_AGAIN";
        case BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_ERROR:
-               return "BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_ERROR";
+               return "LAST_SEEKING_RETURNED_ERROR";
        default:
                return "(unknown)";
        }
This page took 0.025981 seconds and 4 git commands to generate.