lib: rename "self comp. input port message iter." -> "message iterator"
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 10 Jan 2020 02:16:39 +0000 (21:16 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 10 Jan 2020 20:00:40 +0000 (15:00 -0500)
This simplifies the terminology (and therefore the eventual
documentation). It's possible because we have a single type of message
iterator since 6c373cc9 ("lib: remove output port message iterator").

I just moved everything in
`self-component-port-input-message-iterator.h` to `message-iterator.h`
and removed the specific prefix. Header files are about to be reshaped
soon anyway with the C API documentation patch.

In the Python API, I changed *._create_input_port_message_iterator() to
*._create_message_iterator(). I didn't change
`_UserComponentInputPortMessageIterator` because it's not a public name,
so it's not critical to change it now.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I219b25495911363595bdf3b8b3f3b3cf802f20ac
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2749
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
CI-Build: Simon Marchi <simon.marchi@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
39 files changed:
include/Makefile.am
include/babeltrace2/babeltrace.h
include/babeltrace2/graph/graph.h
include/babeltrace2/graph/message-iterator.h
include/babeltrace2/graph/self-component-port-input-message-iterator.h [deleted file]
include/babeltrace2/types.h
src/bindings/python/bt2/bt2/component.py
src/bindings/python/bt2/bt2/message_iterator.py
src/bindings/python/bt2/bt2/native_bt_message_iterator.i
src/bindings/python/bt2/bt2/native_bt_message_iterator.i.h
src/bindings/python/bt2/bt2/trace_collection_message_iterator.py
src/lib/error.c
src/lib/graph/component-class-sink-simple.c
src/lib/graph/connection.c
src/lib/graph/connection.h
src/lib/graph/iterator.c
src/lib/graph/message/event.c
src/lib/graph/message/iterator.h
src/lib/graph/message/message-iterator-inactivity.c
src/lib/graph/message/packet.c
src/lib/lib-logging.c
src/plugins/ctf/fs-sink/fs-sink.c
src/plugins/ctf/fs-sink/fs-sink.h
src/plugins/lttng-utils/debug-info/debug-info.c
src/plugins/text/details/details.c
src/plugins/text/details/details.h
src/plugins/text/pretty/pretty.c
src/plugins/text/pretty/pretty.h
src/plugins/utils/counter/counter.c
src/plugins/utils/counter/counter.h
src/plugins/utils/dummy/dummy.c
src/plugins/utils/dummy/dummy.h
src/plugins/utils/muxer/muxer.c
src/plugins/utils/trimmer/trimmer.c
tests/bindings/python/bt2/test_error.py
tests/bindings/python/bt2/test_graph.py
tests/bindings/python/bt2/test_message_iterator.py
tests/bindings/python/bt2/utils.py
tests/lib/test_simple_sink.c

index a44ef6ee0c0b9741d47fb9e84054f09f3ddcdd94..dbb6efa5d796952fad49c7b59925b0b2f08efd04 100644 (file)
@@ -123,7 +123,6 @@ babeltrace2graphinclude_HEADERS = \
        babeltrace2/graph/self-component-class-source.h \
        babeltrace2/graph/self-component-class.h \
        babeltrace2/graph/self-component-filter.h \
-       babeltrace2/graph/self-component-port-input-message-iterator.h \
        babeltrace2/graph/self-component-port-input.h \
        babeltrace2/graph/self-component-port-output.h \
        babeltrace2/graph/self-component-port.h \
index ce324694da86e1afc229b4233ba349fcf5e6dff0..ffb8109e7c7680a2518b59d6dda51f83de7ae8c5 100644 (file)
 
 /* Message iterator API */
 #include <babeltrace2/graph/message-iterator.h>
-#include <babeltrace2/graph/self-component-port-input-message-iterator.h>
 #include <babeltrace2/graph/self-message-iterator.h>
 
 /* Message API */
index 0806509644bd7ddbb81d4d71cd5a277cd4bb3020..d562e366e41ace21e3efe49da982d8115eaf8e28 100644 (file)
@@ -97,7 +97,7 @@ typedef enum bt_graph_simple_sink_component_initialize_func_status {
 
 typedef bt_graph_simple_sink_component_initialize_func_status
 (*bt_graph_simple_sink_component_initialize_func)(
-               bt_self_component_port_input_message_iterator *iterator,
+               bt_message_iterator *iterator,
                void *data);
 
 typedef enum bt_graph_simple_sink_component_consume_func_status {
@@ -110,7 +110,7 @@ typedef enum bt_graph_simple_sink_component_consume_func_status {
 
 typedef bt_graph_simple_sink_component_consume_func_status
 (*bt_graph_simple_sink_component_consume_func)(
-               bt_self_component_port_input_message_iterator *iterator,
+               bt_message_iterator *iterator,
                void *data);
 
 typedef void (*bt_graph_simple_sink_component_finalize_func)(void *data);
index eafab9968eeff60c98d9e60469990f044c90b60f..228b40d1ab15b70d81f27edb96b042776a90be62 100644 (file)
@@ -67,6 +67,89 @@ typedef enum bt_message_iterator_can_seek_ns_from_origin_status {
        BT_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
 } bt_message_iterator_can_seek_ns_from_origin_status;
 
+typedef enum bt_message_iterator_create_from_message_iterator_status {
+       BT_MESSAGE_ITERATOR_CREATE_FROM_MESSAGE_ITERATOR_STATUS_OK              = __BT_FUNC_STATUS_OK,
+       BT_MESSAGE_ITERATOR_CREATE_FROM_MESSAGE_ITERATOR_STATUS_ERROR           = __BT_FUNC_STATUS_ERROR,
+       BT_MESSAGE_ITERATOR_CREATE_FROM_MESSAGE_ITERATOR_STATUS_MEMORY_ERROR    = __BT_FUNC_STATUS_MEMORY_ERROR,
+} bt_message_iterator_create_from_message_iterator_status;
+
+typedef enum bt_message_iterator_create_from_sink_component_status {
+       BT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_OK                = __BT_FUNC_STATUS_OK,
+       BT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_ERROR             = __BT_FUNC_STATUS_ERROR,
+       BT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_MEMORY_ERROR      = __BT_FUNC_STATUS_MEMORY_ERROR,
+} bt_message_iterator_create_from_sink_component_status;
+
+static inline
+bt_message_iterator *
+bt_message_iterator_as_message_iterator(
+               bt_message_iterator *iterator)
+{
+       return __BT_UPCAST(bt_message_iterator, iterator);
+}
+
+extern bt_message_iterator_create_from_message_iterator_status
+bt_message_iterator_create_from_message_iterator(
+               bt_self_message_iterator *self_msg_iter,
+               bt_self_component_port_input *input_port,
+               bt_message_iterator **message_iterator);
+
+extern bt_message_iterator_create_from_sink_component_status
+bt_message_iterator_create_from_sink_component(
+               bt_self_component_sink *self_comp,
+               bt_self_component_port_input *input_port,
+               bt_message_iterator **message_iterator);
+
+extern bt_component *
+bt_message_iterator_borrow_component(
+               bt_message_iterator *iterator);
+
+extern bt_message_iterator_next_status
+bt_message_iterator_next(
+               bt_message_iterator *iterator,
+               bt_message_array_const *msgs, uint64_t *count);
+
+extern bt_message_iterator_can_seek_ns_from_origin_status
+bt_message_iterator_can_seek_ns_from_origin(
+               bt_message_iterator *iterator,
+               int64_t ns_from_origin, bt_bool *can_seek);
+
+extern bt_message_iterator_can_seek_beginning_status
+bt_message_iterator_can_seek_beginning(
+               bt_message_iterator *iterator,
+               bt_bool *can_seek);
+
+extern bt_message_iterator_seek_ns_from_origin_status
+bt_message_iterator_seek_ns_from_origin(
+               bt_message_iterator *iterator,
+               int64_t ns_from_origin);
+
+extern bt_message_iterator_seek_beginning_status
+bt_message_iterator_seek_beginning(
+               bt_message_iterator *iterator);
+
+extern bt_bool
+bt_message_iterator_can_seek_forward(
+               bt_message_iterator *iterator);
+
+extern void bt_message_iterator_get_ref(
+               const bt_message_iterator *message_iterator);
+
+extern void bt_message_iterator_put_ref(
+               const bt_message_iterator *message_iterator);
+
+#define BT_MESSAGE_ITERATOR_PUT_REF_AND_RESET(_var) \
+       do {                                                            \
+               bt_message_iterator_put_ref(_var); \
+               (_var) = NULL;                                          \
+       } while (0)
+
+#define BT_MESSAGE_ITERATOR_MOVE_REF(_var_dst, _var_src) \
+       do {                                                            \
+               bt_message_iterator_put_ref(_var_dst); \
+               (_var_dst) = (_var_src);                                \
+               (_var_src) = NULL;                                      \
+       } while (0)
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/include/babeltrace2/graph/self-component-port-input-message-iterator.h b/include/babeltrace2/graph/self-component-port-input-message-iterator.h
deleted file mode 100644 (file)
index a0c8c54..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-#ifndef BABELTRACE2_GRAPH_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_H
-#define BABELTRACE2_GRAPH_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_H
-
-/*
- * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef __BT_IN_BABELTRACE_H
-# error "Please include <babeltrace2/babeltrace.h> instead."
-#endif
-
-#include <stdint.h>
-
-#include <babeltrace2/graph/message-iterator.h>
-#include <babeltrace2/types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum bt_self_component_port_input_message_iterator_create_from_message_iterator_status {
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_MESSAGE_ITERATOR_STATUS_OK            = __BT_FUNC_STATUS_OK,
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_MESSAGE_ITERATOR_STATUS_ERROR         = __BT_FUNC_STATUS_ERROR,
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_MESSAGE_ITERATOR_STATUS_MEMORY_ERROR  = __BT_FUNC_STATUS_MEMORY_ERROR,
-} bt_self_component_port_input_message_iterator_create_from_message_iterator_status;
-
-typedef enum bt_self_component_port_input_message_iterator_create_from_sink_component_status {
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_OK              = __BT_FUNC_STATUS_OK,
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_ERROR           = __BT_FUNC_STATUS_ERROR,
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_MEMORY_ERROR    = __BT_FUNC_STATUS_MEMORY_ERROR,
-} bt_self_component_port_input_message_iterator_create_from_sink_component_status;
-
-static inline
-bt_message_iterator *
-bt_self_component_port_input_message_iterator_as_message_iterator(
-               bt_self_component_port_input_message_iterator *iterator)
-{
-       return __BT_UPCAST(bt_message_iterator, iterator);
-}
-
-extern bt_self_component_port_input_message_iterator_create_from_message_iterator_status
-bt_self_component_port_input_message_iterator_create_from_message_iterator(
-               bt_self_message_iterator *self_msg_iter,
-               bt_self_component_port_input *input_port,
-               bt_self_component_port_input_message_iterator **message_iterator);
-
-extern bt_self_component_port_input_message_iterator_create_from_sink_component_status
-bt_self_component_port_input_message_iterator_create_from_sink_component(
-               bt_self_component_sink *self_comp,
-               bt_self_component_port_input *input_port,
-               bt_self_component_port_input_message_iterator **message_iterator);
-
-extern bt_component *
-bt_self_component_port_input_message_iterator_borrow_component(
-               bt_self_component_port_input_message_iterator *iterator);
-
-extern bt_message_iterator_next_status
-bt_self_component_port_input_message_iterator_next(
-               bt_self_component_port_input_message_iterator *iterator,
-               bt_message_array_const *msgs, uint64_t *count);
-
-extern bt_message_iterator_can_seek_ns_from_origin_status
-bt_self_component_port_input_message_iterator_can_seek_ns_from_origin(
-               bt_self_component_port_input_message_iterator *iterator,
-               int64_t ns_from_origin, bt_bool *can_seek);
-
-extern bt_message_iterator_can_seek_beginning_status
-bt_self_component_port_input_message_iterator_can_seek_beginning(
-               bt_self_component_port_input_message_iterator *iterator,
-               bt_bool *can_seek);
-
-extern bt_message_iterator_seek_ns_from_origin_status
-bt_self_component_port_input_message_iterator_seek_ns_from_origin(
-               bt_self_component_port_input_message_iterator *iterator,
-               int64_t ns_from_origin);
-
-extern bt_message_iterator_seek_beginning_status
-bt_self_component_port_input_message_iterator_seek_beginning(
-               bt_self_component_port_input_message_iterator *iterator);
-
-extern bt_bool
-bt_self_component_port_input_message_iterator_can_seek_forward(
-               bt_self_component_port_input_message_iterator *iterator);
-
-extern void bt_self_component_port_input_message_iterator_get_ref(
-               const bt_self_component_port_input_message_iterator *self_component_port_input_message_iterator);
-
-extern void bt_self_component_port_input_message_iterator_put_ref(
-               const bt_self_component_port_input_message_iterator *self_component_port_input_message_iterator);
-
-#define BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_PUT_REF_AND_RESET(_var) \
-       do {                                                            \
-               bt_self_component_port_input_message_iterator_put_ref(_var); \
-               (_var) = NULL;                                          \
-       } while (0)
-
-#define BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_MOVE_REF(_var_dst, _var_src) \
-       do {                                                            \
-               bt_self_component_port_input_message_iterator_put_ref(_var_dst); \
-               (_var_dst) = (_var_src);                                \
-               (_var_src) = NULL;                                      \
-       } while (0)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE2_GRAPH_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_H */
index e2b9854eade93b07ab274b984da72dbd30059ccd..11c6e82425ae6681249f884efad90a7b47f8628f 100644 (file)
@@ -140,7 +140,7 @@ typedef struct bt_self_component_filter bt_self_component_filter;
 typedef struct bt_self_component_filter_configuration bt_self_component_filter_configuration;
 typedef struct bt_self_component_port bt_self_component_port;
 typedef struct bt_self_component_port_input bt_self_component_port_input;
-typedef struct bt_self_component_port_input_message_iterator bt_self_component_port_input_message_iterator;
+typedef struct bt_message_iterator bt_message_iterator;
 typedef struct bt_self_component_port_output bt_self_component_port_output;
 typedef struct bt_self_component_sink bt_self_component_sink;
 typedef struct bt_self_component_sink_configuration bt_self_component_sink_configuration;
index 9ccd64528d0dc95c96b434c553a2ab575b669a21..afc1047d0c8ee4781672b7ba2cae9fae064a38c6 100644 (file)
@@ -945,13 +945,13 @@ class _UserSinkComponent(_UserComponent, _SinkComponentConst):
         assert self_port_ptr
         return bt2_port._UserComponentInputPort._create_from_ptr(self_port_ptr)
 
-    def _create_input_port_message_iterator(self, input_port):
+    def _create_message_iterator(self, input_port):
         utils._check_type(input_port, bt2_port._UserComponentInputPort)
 
         (
             status,
             msg_iter_ptr,
-        ) = native_bt.bt2_self_component_port_input_message_iterator_create_from_sink_component(
+        ) = native_bt.bt2_message_iterator_create_from_sink_component(
             self._bt_ptr, input_port._ptr
         )
         utils._handle_func_status(status, 'cannot create message iterator object')
index 8f3aac92ef6c8e045cefb62c13229706558d8825..2fef7d68dfcb183f6cf15b5d78c5b9a9b008d686 100644 (file)
@@ -37,12 +37,8 @@ class _MessageIterator(collections.abc.Iterator):
 
 
 class _UserComponentInputPortMessageIterator(object._SharedObject, _MessageIterator):
-    _get_ref = staticmethod(
-        native_bt.self_component_port_input_message_iterator_get_ref
-    )
-    _put_ref = staticmethod(
-        native_bt.self_component_port_input_message_iterator_put_ref
-    )
+    _get_ref = staticmethod(native_bt.message_iterator_get_ref)
+    _put_ref = staticmethod(native_bt.message_iterator_put_ref)
 
     def __init__(self, ptr):
         self._current_msgs = []
@@ -66,12 +62,7 @@ class _UserComponentInputPortMessageIterator(object._SharedObject, _MessageItera
         return bt2_message._create_from_ptr(msg_ptr)
 
     def can_seek_beginning(self):
-        (
-            status,
-            res,
-        ) = native_bt.self_component_port_input_message_iterator_can_seek_beginning(
-            self._ptr
-        )
+        (status, res) = native_bt.message_iterator_can_seek_beginning(self._ptr)
         utils._handle_func_status(
             status,
             'cannot check whether or not message iterator can seek its beginning',
@@ -83,17 +74,12 @@ class _UserComponentInputPortMessageIterator(object._SharedObject, _MessageItera
         self._current_msgs.clear()
         self._at = 0
 
-        status = native_bt.self_component_port_input_message_iterator_seek_beginning(
-            self._ptr
-        )
+        status = native_bt.message_iterator_seek_beginning(self._ptr)
         utils._handle_func_status(status, 'cannot seek message iterator beginning')
 
     def can_seek_ns_from_origin(self, ns_from_origin):
         utils._check_int64(ns_from_origin)
-        (
-            status,
-            res,
-        ) = native_bt.self_component_port_input_message_iterator_can_seek_ns_from_origin(
+        (status, res) = native_bt.message_iterator_can_seek_ns_from_origin(
             self._ptr, ns_from_origin
         )
         utils._handle_func_status(
@@ -109,7 +95,7 @@ class _UserComponentInputPortMessageIterator(object._SharedObject, _MessageItera
         self._current_msgs.clear()
         self._at = 0
 
-        status = native_bt.self_component_port_input_message_iterator_seek_ns_from_origin(
+        status = native_bt.message_iterator_seek_ns_from_origin(
             self._ptr, ns_from_origin
         )
         utils._handle_func_status(
@@ -118,9 +104,7 @@ class _UserComponentInputPortMessageIterator(object._SharedObject, _MessageItera
 
     @property
     def can_seek_forward(self):
-        return native_bt.self_component_port_input_message_iterator_can_seek_forward(
-            self._ptr
-        )
+        return native_bt.message_iterator_can_seek_forward(self._ptr)
 
 
 class _MessageIteratorConfiguration:
@@ -249,13 +233,13 @@ class _UserMessageIterator(_MessageIterator):
     def _bt_seek_ns_from_origin_from_native(self, ns_from_origin):
         self._user_seek_ns_from_origin(ns_from_origin)
 
-    def _create_input_port_message_iterator(self, input_port):
+    def _create_message_iterator(self, input_port):
         utils._check_type(input_port, bt2_port._UserComponentInputPort)
 
         (
             status,
             msg_iter_ptr,
-        ) = native_bt.bt2_self_component_port_input_message_iterator_create_from_message_iterator(
+        ) = native_bt.bt2_message_iterator_create_from_message_iterator(
             self._bt_ptr, input_port._ptr
         )
         utils._handle_func_status(status, 'cannot create message iterator object')
index 7362bb7962d861a166689ed166759562f2788af9..23b697999c3c50ee82adb7410e52f7e43ad6bd63 100644 (file)
 
 /* Output argument typemap for message_iterator (always appends) */
 %typemap(in, numinputs=0)
-       (bt_self_component_port_input_message_iterator **)
-       (bt_self_component_port_input_message_iterator *temp_msg_iter = NULL) {
+       (bt_message_iterator **)
+       (bt_message_iterator *temp_msg_iter = NULL) {
        $1 = &temp_msg_iter;
 }
 
 %typemap(argout)
-       (bt_self_component_port_input_message_iterator **) {
+       (bt_message_iterator **) {
        if (*$1) {
                /* SWIG_Python_AppendOutput() steals the created object */
                $result = SWIG_Python_AppendOutput($result,
                                SWIG_NewPointerObj(SWIG_as_voidptr(*$1),
-                                       SWIGTYPE_p_bt_self_component_port_input_message_iterator, 0));
+                                       SWIGTYPE_p_bt_message_iterator, 0));
        } else {
                /* SWIG_Python_AppendOutput() steals Py_None */
                Py_INCREF(Py_None);
@@ -44,7 +44,6 @@
 }
 
 %include <babeltrace2/graph/message-iterator.h>
-%include <babeltrace2/graph/self-component-port-input-message-iterator.h>
 %include <babeltrace2/graph/self-message-iterator.h>
 
 /* Helper functions for Python */
 #include "native_bt_message_iterator.i.h"
 %}
 
-bt_self_component_port_input_message_iterator_create_from_message_iterator_status
-bt_bt2_self_component_port_input_message_iterator_create_from_message_iterator(
+bt_message_iterator_create_from_message_iterator_status
+bt_bt2_message_iterator_create_from_message_iterator(
                bt_self_message_iterator *self_msg_iter,
                bt_self_component_port_input *input_port,
-               bt_self_component_port_input_message_iterator **message_iterator);
-bt_self_component_port_input_message_iterator_create_from_sink_component_status
-bt_bt2_self_component_port_input_message_iterator_create_from_sink_component(
+               bt_message_iterator **message_iterator);
+bt_message_iterator_create_from_sink_component_status
+bt_bt2_message_iterator_create_from_sink_component(
                bt_self_component_sink *self_comp,
                bt_self_component_port_input *input_port,
-               bt_self_component_port_input_message_iterator **message_iterator);
+               bt_message_iterator **message_iterator);
 PyObject *bt_bt2_get_user_component_from_user_msg_iter(
                bt_self_message_iterator *self_message_iterator);
 PyObject *bt_bt2_self_component_port_input_get_msg_range(
-               bt_self_component_port_input_message_iterator *iter);
+               bt_message_iterator *iter);
index 7802ee6d0830f5ac0379703a40f1c83b82bf7548..67b63fd6aa14e7a3bf6652c6eabf18435ad5b838 100644 (file)
  */
 
 static
-bt_self_component_port_input_message_iterator_create_from_message_iterator_status
-bt_bt2_self_component_port_input_message_iterator_create_from_message_iterator(
+bt_message_iterator_create_from_message_iterator_status
+bt_bt2_message_iterator_create_from_message_iterator(
                bt_self_message_iterator *self_msg_iter,
                bt_self_component_port_input *input_port,
-               bt_self_component_port_input_message_iterator **message_iterator)
+               bt_message_iterator **message_iterator)
 {
-       bt_self_component_port_input_message_iterator_create_from_message_iterator_status
+       bt_message_iterator_create_from_message_iterator_status
                status;
 
-       status = bt_self_component_port_input_message_iterator_create_from_message_iterator(
+       status = bt_message_iterator_create_from_message_iterator(
                self_msg_iter, input_port, message_iterator);
 
-       if (status != BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_MESSAGE_ITERATOR_STATUS_OK) {
+       if (status != BT_MESSAGE_ITERATOR_CREATE_FROM_MESSAGE_ITERATOR_STATUS_OK) {
                *message_iterator = NULL;
        }
 
@@ -43,19 +43,19 @@ bt_bt2_self_component_port_input_message_iterator_create_from_message_iterator(
 }
 
 static
-bt_self_component_port_input_message_iterator_create_from_sink_component_status
-bt_bt2_self_component_port_input_message_iterator_create_from_sink_component(
+bt_message_iterator_create_from_sink_component_status
+bt_bt2_message_iterator_create_from_sink_component(
                bt_self_component_sink *self_comp,
                bt_self_component_port_input *input_port,
-               bt_self_component_port_input_message_iterator **message_iterator)
+               bt_message_iterator **message_iterator)
 {
-       bt_self_component_port_input_message_iterator_create_from_sink_component_status
+       bt_message_iterator_create_from_sink_component_status
                status;
 
-       status = bt_self_component_port_input_message_iterator_create_from_sink_component(
+       status = bt_message_iterator_create_from_sink_component(
                self_comp, input_port, message_iterator);
 
-       if (status != BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_OK) {
+       if (status != BT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_OK) {
                *message_iterator = NULL;
        }
 
@@ -124,13 +124,13 @@ PyObject *get_msg_range_common(bt_message_iterator_next_status status,
 }
 
 static PyObject *bt_bt2_self_component_port_input_get_msg_range(
-               bt_self_component_port_input_message_iterator *iter)
+               bt_message_iterator *iter)
 {
        bt_message_array_const messages;
        uint64_t message_count = 0;
        bt_message_iterator_next_status status;
 
-       status = bt_self_component_port_input_message_iterator_next(iter,
+       status = bt_message_iterator_next(iter,
                &messages, &message_count);
        return get_msg_range_common(status, messages, message_count);
 }
index 6c1991f93f3ae3e839f55a7a7937659957e7d4d2..101d0017b2d72d2ed757bddb680049c60c0feda8 100644 (file)
@@ -265,9 +265,7 @@ class _TraceCollectionMessageIteratorProxySink(bt2_component._UserSinkComponent)
         self._add_input_port('in')
 
     def _user_graph_is_configured(self):
-        self._msg_iter = self._create_input_port_message_iterator(
-            self._input_ports['in']
-        )
+        self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
     def _user_consume(self):
         assert self._msg_list[0] is None
index 3972b26c7f54b76a7b20f79baf5f0f26b7d5aca5..65638b9394436d0e93c2a632f214b20c646cba19 100644 (file)
@@ -369,7 +369,7 @@ create_error_cause_message_iterator_actor(struct bt_message_iterator *iter,
                const char *file_name, uint64_t line_no)
 {
        struct bt_error_cause_message_iterator_actor *cause;
-       struct bt_self_component_port_input_message_iterator *input_port_iter;
+       struct bt_message_iterator *input_port_iter;
        int ret;
 
        BT_LOGD_STR("Creating error cause object (message iterator actor).");
index 21fb0b799ed65e2bc0b431c8b46c4cfca28ed3e3..e7ca81b9d4e28db486652f04d1bf0199476a797f 100644 (file)
@@ -30,7 +30,6 @@
 #include <babeltrace2/graph/component-class-sink.h>
 #include <babeltrace2/graph/self-component-sink.h>
 #include <babeltrace2/graph/self-component-port.h>
-#include <babeltrace2/graph/self-component-port-input-message-iterator.h>
 #include <babeltrace2/graph/self-component.h>
 #include <glib.h>
 
@@ -46,7 +45,7 @@ static
 struct bt_component_class_sink *simple_comp_cls;
 
 struct simple_sink_data {
-       bt_self_component_port_input_message_iterator *msg_iter;
+       bt_message_iterator *msg_iter;
        struct simple_sink_init_method_data init_method_data;
 };
 
@@ -111,7 +110,7 @@ simple_sink_graph_is_configured(
        bt_self_component_sink *self_comp)
 {
        bt_component_class_sink_graph_is_configured_method_status status;
-       bt_self_component_port_input_message_iterator_create_from_sink_component_status
+       bt_message_iterator_create_from_sink_component_status
                msg_iter_status;
        struct simple_sink_data *data = bt_self_component_get_data(
                bt_self_component_sink_as_self_component(self_comp));
@@ -130,9 +129,9 @@ simple_sink_graph_is_configured(
        }
 
        BT_ASSERT(data);
-       msg_iter_status = bt_self_component_port_input_message_iterator_create_from_sink_component(
+       msg_iter_status = bt_message_iterator_create_from_sink_component(
                self_comp, self_port, &data->msg_iter);
-       if (msg_iter_status != BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_OK) {
+       if (msg_iter_status != BT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_OK) {
                BT_LIB_LOGE_APPEND_CAUSE(
                        "Cannot create input port message iterator: "
                        "%![comp-]+c, %![port-]+p", self_comp, self_port);
index df25867602b5deccf01c693ea9c86d3c8cb41404..743553b96d0a4d6c0aeec942640c77c17218d97b 100644 (file)
@@ -205,12 +205,12 @@ void bt_connection_end(struct bt_connection *conn, bool try_remove_from_graph)
         * which is on graph destruction.
         */
        for (i = 0; i < conn->iterators->len; i++) {
-               struct bt_self_component_port_input_message_iterator *iterator =
+               struct bt_message_iterator *iterator =
                        g_ptr_array_index(conn->iterators, i);
 
                BT_LIB_LOGD("Finalizing message iterator created by "
                        "this ended connection: %![iter-]+i", iterator);
-               bt_self_component_port_input_message_iterator_try_finalize(
+               bt_message_iterator_try_finalize(
                        iterator);
 
                /*
@@ -218,7 +218,7 @@ void bt_connection_end(struct bt_connection *conn, bool try_remove_from_graph)
                 * from this connection's iterators on destruction
                 * because this connection won't exist anymore.
                 */
-               bt_self_component_port_input_message_iterator_set_connection(
+               bt_message_iterator_set_connection(
                        iterator, NULL);
        }
 
@@ -245,7 +245,7 @@ const struct bt_port_input *bt_connection_borrow_downstream_port_const(
 
 BT_HIDDEN
 void bt_connection_remove_iterator(struct bt_connection *conn,
-               struct bt_self_component_port_input_message_iterator *iterator)
+               struct bt_message_iterator *iterator)
 {
        g_ptr_array_remove(conn->iterators, iterator);
        BT_LIB_LOGD("Removed message iterator from connection: "
index 8f2c32caf7a44a7fa618e5d1b121b2c7f2adf189..2024244ddf3e6884903dde8b1b9d5d4c0bf386e2 100644 (file)
@@ -71,7 +71,7 @@ void bt_connection_end(struct bt_connection *conn, bool try_remove_from_graph);
 
 BT_HIDDEN
 void bt_connection_remove_iterator(struct bt_connection *conn,
-               struct bt_self_component_port_input_message_iterator *iterator);
+               struct bt_message_iterator *iterator);
 
 static inline
 struct bt_graph *bt_connection_borrow_graph(struct bt_connection *conn)
index c7ab253c3aaae3edc836a8429d6039e0d50931f3..c0ca8f8675f69e90767aba0c5b76590256bf43a1 100644 (file)
@@ -42,7 +42,6 @@
 #include <babeltrace2/graph/component-sink-const.h>
 #include <babeltrace2/graph/message-const.h>
 #include <babeltrace2/graph/message-iterator.h>
-#include <babeltrace2/graph/self-component-port-input-message-iterator.h>
 #include <babeltrace2/graph/message-event-const.h>
 #include <babeltrace2/graph/message-message-iterator-inactivity-const.h>
 #include <babeltrace2/graph/message-packet-beginning.h>
 #define MSG_BATCH_SIZE 15
 
 #define BT_ASSERT_PRE_ITER_HAS_STATE_TO_SEEK(_iter)                    \
-       BT_ASSERT_PRE((_iter)->state == BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ACTIVE || \
-               (_iter)->state == BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ENDED || \
-               (_iter)->state == BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_AGAIN || \
-               (_iter)->state == BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_ERROR, \
+       BT_ASSERT_PRE((_iter)->state == BT_MESSAGE_ITERATOR_STATE_ACTIVE || \
+               (_iter)->state == BT_MESSAGE_ITERATOR_STATE_ENDED || \
+               (_iter)->state == BT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_AGAIN || \
+               (_iter)->state == BT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_ERROR, \
                "Message iterator is in the wrong state: %!+i", _iter)
 
 static inline
-void set_self_comp_port_input_msg_iterator_state(
-               struct bt_self_component_port_input_message_iterator *iterator,
-               enum bt_self_component_port_input_message_iterator_state state)
+void set_msg_iterator_state(struct bt_message_iterator *iterator,
+               enum bt_message_iterator_state state)
 {
        BT_ASSERT_DBG(iterator);
        BT_LIB_LOGD("Updating message iterator's state: new-state=%s",
-               bt_self_component_port_input_message_iterator_state_string(state));
+               bt_message_iterator_state_string(state));
        iterator->state = state;
 }
 
 static
-void bt_self_component_port_input_message_iterator_destroy(struct bt_object *obj)
+void bt_message_iterator_destroy(struct bt_object *obj)
 {
-       struct bt_self_component_port_input_message_iterator *iterator;
+       struct bt_message_iterator *iterator;
 
        BT_ASSERT(obj);
 
@@ -125,7 +123,7 @@ void bt_self_component_port_input_message_iterator_destroy(struct bt_object *obj
        iterator = (void *) obj;
        BT_LIB_LOGI("Destroying self component input port message iterator object: "
                "%!+i", iterator);
-       bt_self_component_port_input_message_iterator_try_finalize(iterator);
+       bt_message_iterator_try_finalize(iterator);
 
        if (iterator->connection) {
                /*
@@ -166,8 +164,8 @@ void bt_self_component_port_input_message_iterator_destroy(struct bt_object *obj
 }
 
 BT_HIDDEN
-void bt_self_component_port_input_message_iterator_try_finalize(
-               struct bt_self_component_port_input_message_iterator *iterator)
+void bt_message_iterator_try_finalize(
+               struct bt_message_iterator *iterator)
 {
        uint64_t i;
        bool call_user_finalize = true;
@@ -175,7 +173,7 @@ void bt_self_component_port_input_message_iterator_try_finalize(
        BT_ASSERT(iterator);
 
        switch (iterator->state) {
-       case BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_NON_INITIALIZED:
+       case BT_MESSAGE_ITERATOR_STATE_NON_INITIALIZED:
                /*
                 * If this function is called while the iterator is in the
                 * NON_INITIALIZED state, it means the user initialization
@@ -188,12 +186,12 @@ void bt_self_component_port_input_message_iterator_try_finalize(
                 */
                call_user_finalize = false;
                break;
-       case BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_FINALIZED:
+       case BT_MESSAGE_ITERATOR_STATE_FINALIZED:
                /* Already finalized */
                BT_LIB_LOGD("Not finalizing message iterator: already finalized: "
                        "%!+i", iterator);
                goto end;
-       case BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_FINALIZING:
+       case BT_MESSAGE_ITERATOR_STATE_FINALIZING:
                /* Finalizing */
                BT_LIB_LOGF("Message iterator is already being finalized: "
                        "%!+i", iterator);
@@ -203,8 +201,8 @@ void bt_self_component_port_input_message_iterator_try_finalize(
        }
 
        BT_LIB_LOGD("Finalizing message iterator: %!+i", iterator);
-       set_self_comp_port_input_msg_iterator_state(iterator,
-               BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_FINALIZING);
+       set_msg_iterator_state(iterator,
+               BT_MESSAGE_ITERATOR_STATE_FINALIZING);
        BT_ASSERT(iterator->upstream_component);
 
        /* Call user-defined destroy method */
@@ -237,7 +235,7 @@ void bt_self_component_port_input_message_iterator_try_finalize(
 
        /* Detach upstream message iterators */
        for (i = 0; i < iterator->upstream_msg_iters->len; i++) {
-               struct bt_self_component_port_input_message_iterator *upstream_msg_iter =
+               struct bt_message_iterator *upstream_msg_iter =
                        iterator->upstream_msg_iters->pdata[i];
 
                upstream_msg_iter->downstream_msg_iter = NULL;
@@ -258,8 +256,8 @@ void bt_self_component_port_input_message_iterator_try_finalize(
 
        iterator->upstream_component = NULL;
        iterator->upstream_port = NULL;
-       set_self_comp_port_input_msg_iterator_state(iterator,
-               BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_FINALIZED);
+       set_msg_iterator_state(iterator,
+               BT_MESSAGE_ITERATOR_STATE_FINALIZED);
        BT_LIB_LOGD("Finalized message iterator: %!+i", iterator);
 
 end:
@@ -267,8 +265,8 @@ end:
 }
 
 BT_HIDDEN
-void bt_self_component_port_input_message_iterator_set_connection(
-               struct bt_self_component_port_input_message_iterator *iterator,
+void bt_message_iterator_set_connection(
+               struct bt_message_iterator *iterator,
                struct bt_connection *connection)
 {
        BT_ASSERT(iterator);
@@ -279,7 +277,7 @@ void bt_self_component_port_input_message_iterator_set_connection(
 
 static
 enum bt_message_iterator_can_seek_beginning_status can_seek_ns_from_origin_true(
-               struct bt_self_component_port_input_message_iterator *iterator,
+               struct bt_message_iterator *iterator,
                int64_t ns_from_origin, bt_bool *can_seek)
 {
        *can_seek = BT_TRUE;
@@ -289,7 +287,7 @@ enum bt_message_iterator_can_seek_beginning_status can_seek_ns_from_origin_true(
 
 static
 enum bt_message_iterator_can_seek_beginning_status can_seek_beginning_true(
-               struct bt_self_component_port_input_message_iterator *iterator,
+               struct bt_message_iterator *iterator,
                bt_bool *can_seek)
 {
        *can_seek = BT_TRUE;
@@ -301,12 +299,12 @@ static
 int create_self_component_input_port_message_iterator(
                struct bt_self_message_iterator *self_downstream_msg_iter,
                struct bt_self_component_port_input *self_port,
-               struct bt_self_component_port_input_message_iterator **message_iterator)
+               struct bt_message_iterator **message_iterator)
 {
        bt_message_iterator_class_initialize_method init_method = NULL;
-       struct bt_self_component_port_input_message_iterator *iterator =
+       struct bt_message_iterator *iterator =
                NULL;
-       struct bt_self_component_port_input_message_iterator *downstream_msg_iter =
+       struct bt_message_iterator *downstream_msg_iter =
                (void *) self_downstream_msg_iter;
        struct bt_port *port = (void *) self_port;
        struct bt_port *upstream_port;
@@ -343,7 +341,7 @@ int create_self_component_input_port_message_iterator(
        BT_LIB_LOGI("Creating message iterator on self component input port: "
                "%![up-comp-]+c, %![up-port-]+p", upstream_comp, upstream_port);
        iterator = g_new0(
-               struct bt_self_component_port_input_message_iterator, 1);
+               struct bt_message_iterator, 1);
        if (!iterator) {
                BT_LIB_LOGE_APPEND_CAUSE(
                        "Failed to allocate one self component input port "
@@ -353,7 +351,7 @@ int create_self_component_input_port_message_iterator(
        }
 
        bt_object_init_shared(&iterator->base,
-               bt_self_component_port_input_message_iterator_destroy);
+               bt_message_iterator_destroy);
        iterator->msgs = g_ptr_array_new();
        if (!iterator->msgs) {
                BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GPtrArray.");
@@ -381,8 +379,8 @@ int create_self_component_input_port_message_iterator(
        iterator->upstream_port = upstream_port;
        iterator->connection = iterator->upstream_port->connection;
        iterator->graph = bt_component_borrow_graph(upstream_comp);
-       set_self_comp_port_input_msg_iterator_state(iterator,
-               BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_NON_INITIALIZED);
+       set_msg_iterator_state(iterator,
+               BT_MESSAGE_ITERATOR_STATE_NON_INITIALIZED);
 
        /* Copy methods from the message iterator class to the message iterator. */
        BT_ASSERT(bt_component_class_has_message_iterator_class(upstream_comp_cls));
@@ -390,32 +388,32 @@ int create_self_component_input_port_message_iterator(
                struct bt_component_class_with_iterator_class, parent);
 
        iterator->methods.next =
-               (bt_self_component_port_input_message_iterator_next_method)
+               (bt_message_iterator_next_method)
                        upstream_comp_cls_with_iter_cls->msg_iter_cls->methods.next;
        iterator->methods.seek_ns_from_origin =
-               (bt_self_component_port_input_message_iterator_seek_ns_from_origin_method)
+               (bt_message_iterator_seek_ns_from_origin_method)
                        upstream_comp_cls_with_iter_cls->msg_iter_cls->methods.seek_ns_from_origin;
        iterator->methods.seek_beginning =
-               (bt_self_component_port_input_message_iterator_seek_beginning_method)
+               (bt_message_iterator_seek_beginning_method)
                        upstream_comp_cls_with_iter_cls->msg_iter_cls->methods.seek_beginning;
        iterator->methods.can_seek_ns_from_origin =
-               (bt_self_component_port_input_message_iterator_can_seek_ns_from_origin_method)
+               (bt_message_iterator_can_seek_ns_from_origin_method)
                        upstream_comp_cls_with_iter_cls->msg_iter_cls->methods.can_seek_ns_from_origin;
        iterator->methods.can_seek_beginning =
-               (bt_self_component_port_input_message_iterator_can_seek_beginning_method)
+               (bt_message_iterator_can_seek_beginning_method)
                        upstream_comp_cls_with_iter_cls->msg_iter_cls->methods.can_seek_beginning;
 
        if (iterator->methods.seek_ns_from_origin &&
                        !iterator->methods.can_seek_ns_from_origin) {
                iterator->methods.can_seek_ns_from_origin =
-                       (bt_self_component_port_input_message_iterator_can_seek_ns_from_origin_method)
+                       (bt_message_iterator_can_seek_ns_from_origin_method)
                                can_seek_ns_from_origin_true;
        }
 
        if (iterator->methods.seek_beginning &&
                        !iterator->methods.can_seek_beginning) {
                iterator->methods.can_seek_beginning =
-                       (bt_self_component_port_input_message_iterator_can_seek_beginning_method)
+                       (bt_message_iterator_can_seek_beginning_method)
                                can_seek_beginning_true;
        }
 
@@ -459,8 +457,8 @@ int create_self_component_input_port_message_iterator(
                        iterator);
        }
 
-       set_self_comp_port_input_msg_iterator_state(iterator,
-               BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ACTIVE);
+       set_msg_iterator_state(iterator,
+               BT_MESSAGE_ITERATOR_STATE_ACTIVE);
        g_ptr_array_add(port->connection->iterators, iterator);
        BT_LIB_LOGI("Created message iterator on self component input port: "
                "%![up-port-]+p, %![up-comp-]+c, %![iter-]+i",
@@ -477,11 +475,11 @@ end:
        return status;
 }
 
-bt_self_component_port_input_message_iterator_create_from_message_iterator_status
-bt_self_component_port_input_message_iterator_create_from_message_iterator(
+bt_message_iterator_create_from_message_iterator_status
+bt_message_iterator_create_from_message_iterator(
                struct bt_self_message_iterator *self_msg_iter,
                struct bt_self_component_port_input *input_port,
-               struct bt_self_component_port_input_message_iterator **message_iterator)
+               struct bt_message_iterator **message_iterator)
 {
        BT_ASSERT_PRE_NO_ERROR();
        BT_ASSERT_PRE_NON_NULL(self_msg_iter, "Message iterator");
@@ -489,11 +487,11 @@ bt_self_component_port_input_message_iterator_create_from_message_iterator(
                input_port, message_iterator);
 }
 
-bt_self_component_port_input_message_iterator_create_from_sink_component_status
-bt_self_component_port_input_message_iterator_create_from_sink_component(
+bt_message_iterator_create_from_sink_component_status
+bt_message_iterator_create_from_sink_component(
                struct bt_self_component_sink *self_comp,
                struct bt_self_component_port_input *input_port,
-               struct bt_self_component_port_input_message_iterator **message_iterator)
+               struct bt_message_iterator **message_iterator)
 {
        BT_ASSERT_PRE_NO_ERROR();
        BT_ASSERT_PRE_NON_NULL(self_comp, "Sink component");
@@ -504,7 +502,7 @@ bt_self_component_port_input_message_iterator_create_from_sink_component(
 void *bt_self_message_iterator_get_data(
                const struct bt_self_message_iterator *self_iterator)
 {
-       struct bt_self_component_port_input_message_iterator *iterator =
+       struct bt_message_iterator *iterator =
                (void *) self_iterator;
 
        BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
@@ -514,7 +512,7 @@ void *bt_self_message_iterator_get_data(
 void bt_self_message_iterator_set_data(
                struct bt_self_message_iterator *self_iterator, void *data)
 {
-       struct bt_self_component_port_input_message_iterator *iterator =
+       struct bt_message_iterator *iterator =
                (void *) self_iterator;
 
        BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
@@ -541,7 +539,7 @@ void bt_self_message_iterator_configuration_set_can_seek_forward(
 BT_ASSERT_POST_DEV_FUNC
 static
 bool clock_snapshots_are_monotonic_one(
-               struct bt_self_component_port_input_message_iterator *iterator,
+               struct bt_message_iterator *iterator,
                const bt_message *msg)
 {
        const struct bt_clock_snapshot *clock_snapshot = NULL;
@@ -623,7 +621,7 @@ end:
 BT_ASSERT_POST_DEV_FUNC
 static
 bool clock_snapshots_are_monotonic(
-               struct bt_self_component_port_input_message_iterator *iterator,
+               struct bt_message_iterator *iterator,
                bt_message_array_const msgs, uint64_t msg_count)
 {
        uint64_t i;
@@ -649,7 +647,7 @@ end:
 
 BT_ASSERT_POST_DEV_FUNC
 static
-bool clock_classes_are_compatible_one(struct bt_self_component_port_input_message_iterator *iterator,
+bool clock_classes_are_compatible_one(struct bt_message_iterator *iterator,
                const struct bt_message *msg)
 {
        enum bt_message_type message_type = bt_message_get_type(msg);
@@ -783,7 +781,7 @@ end:
 BT_ASSERT_POST_DEV_FUNC
 static
 bool clock_classes_are_compatible(
-               struct bt_self_component_port_input_message_iterator *iterator,
+               struct bt_message_iterator *iterator,
                bt_message_array_const msgs, uint64_t msg_count)
 {
        uint64_t i;
@@ -810,7 +808,7 @@ end:
 static
 enum bt_message_iterator_class_next_method_status
 call_iterator_next_method(
-               struct bt_self_component_port_input_message_iterator *iterator,
+               struct bt_message_iterator *iterator,
                bt_message_array_const msgs, uint64_t capacity, uint64_t *user_count)
 {
        enum bt_message_iterator_class_next_method_status status;
@@ -834,8 +832,8 @@ call_iterator_next_method(
 }
 
 enum bt_message_iterator_next_status
-bt_self_component_port_input_message_iterator_next(
-               struct bt_self_component_port_input_message_iterator *iterator,
+bt_message_iterator_next(
+               struct bt_message_iterator *iterator,
                bt_message_array_const *msgs, uint64_t *user_count)
 {
        enum bt_message_iterator_next_status status = BT_FUNC_STATUS_OK;
@@ -845,7 +843,7 @@ bt_self_component_port_input_message_iterator_next(
        BT_ASSERT_PRE_DEV_NON_NULL(msgs, "Message array (output)");
        BT_ASSERT_PRE_DEV_NON_NULL(user_count, "Message count (output)");
        BT_ASSERT_PRE_DEV(iterator->state ==
-               BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ACTIVE,
+               BT_MESSAGE_ITERATOR_STATE_ACTIVE,
                "Message iterator's \"next\" called, but "
                "message iterator is in the wrong state: %!+i", iterator);
        BT_ASSERT_DBG(iterator->upstream_component);
@@ -887,7 +885,7 @@ bt_self_component_port_input_message_iterator_next(
         * have seeked (cannot seek a self message iterator).
         */
        BT_ASSERT_DBG(iterator->state ==
-               BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ACTIVE);
+               BT_MESSAGE_ITERATOR_STATE_ACTIVE);
 
        switch (status) {
        case BT_FUNC_STATUS_OK:
@@ -900,8 +898,8 @@ bt_self_component_port_input_message_iterator_next(
        case BT_FUNC_STATUS_AGAIN:
                goto end;
        case BT_FUNC_STATUS_END:
-               set_self_comp_port_input_msg_iterator_state(iterator,
-                       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ENDED);
+               set_msg_iterator_state(iterator,
+                       BT_MESSAGE_ITERATOR_STATE_ENDED);
                goto end;
        default:
                /* Unknown non-error status */
@@ -913,8 +911,8 @@ end:
 }
 
 struct bt_component *
-bt_self_component_port_input_message_iterator_borrow_component(
-               struct bt_self_component_port_input_message_iterator *iterator)
+bt_message_iterator_borrow_component(
+               struct bt_message_iterator *iterator)
 {
        BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
        return iterator->upstream_component;
@@ -923,7 +921,7 @@ bt_self_component_port_input_message_iterator_borrow_component(
 struct bt_self_component *bt_self_message_iterator_borrow_component(
                struct bt_self_message_iterator *self_iterator)
 {
-       struct bt_self_component_port_input_message_iterator *iterator =
+       struct bt_message_iterator *iterator =
                (void *) self_iterator;
 
        BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
@@ -933,7 +931,7 @@ struct bt_self_component *bt_self_message_iterator_borrow_component(
 struct bt_self_component_port_output *bt_self_message_iterator_borrow_port(
                struct bt_self_message_iterator *self_iterator)
 {
-       struct bt_self_component_port_input_message_iterator *iterator =
+       struct bt_message_iterator *iterator =
                (void *) self_iterator;
 
        BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
@@ -941,8 +939,8 @@ struct bt_self_component_port_output *bt_self_message_iterator_borrow_port(
 }
 
 enum bt_message_iterator_can_seek_ns_from_origin_status
-bt_self_component_port_input_message_iterator_can_seek_ns_from_origin(
-               struct bt_self_component_port_input_message_iterator *iterator,
+bt_message_iterator_can_seek_ns_from_origin(
+               struct bt_message_iterator *iterator,
                int64_t ns_from_origin, bt_bool *can_seek)
 {
        enum bt_message_iterator_can_seek_ns_from_origin_status status;
@@ -999,7 +997,7 @@ bt_self_component_port_input_message_iterator_can_seek_ns_from_origin(
         * iterator supports forward seeking then we can automatically seek to
         * any timestamp.
         */
-       status = (int) bt_self_component_port_input_message_iterator_can_seek_beginning(
+       status = (int) bt_message_iterator_can_seek_beginning(
                iterator, can_seek);
        if (status != BT_FUNC_STATUS_OK) {
                goto end;
@@ -1012,8 +1010,8 @@ end:
 }
 
 enum bt_message_iterator_can_seek_beginning_status
-bt_self_component_port_input_message_iterator_can_seek_beginning(
-               struct bt_self_component_port_input_message_iterator *iterator,
+bt_message_iterator_can_seek_beginning(
+               struct bt_message_iterator *iterator,
                bt_bool *can_seek)
 {
        enum bt_message_iterator_can_seek_beginning_status status;
@@ -1054,36 +1052,36 @@ bt_self_component_port_input_message_iterator_can_seek_beginning(
 
 static inline
 void set_iterator_state_after_seeking(
-               struct bt_self_component_port_input_message_iterator *iterator,
+               struct bt_message_iterator *iterator,
                int status)
 {
-       enum bt_self_component_port_input_message_iterator_state new_state = 0;
+       enum bt_message_iterator_state new_state = 0;
 
        /* Set iterator's state depending on seeking status */
        switch (status) {
        case BT_FUNC_STATUS_OK:
-               new_state = BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ACTIVE;
+               new_state = BT_MESSAGE_ITERATOR_STATE_ACTIVE;
                break;
        case BT_FUNC_STATUS_AGAIN:
-               new_state = BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_AGAIN;
+               new_state = BT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_AGAIN;
                break;
        case BT_FUNC_STATUS_ERROR:
        case BT_FUNC_STATUS_MEMORY_ERROR:
-               new_state = BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_ERROR;
+               new_state = BT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_ERROR;
                break;
        case BT_FUNC_STATUS_END:
-               new_state = BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ENDED;
+               new_state = BT_MESSAGE_ITERATOR_STATE_ENDED;
                break;
        default:
                bt_common_abort();
        }
 
-       set_self_comp_port_input_msg_iterator_state(iterator, new_state);
+       set_msg_iterator_state(iterator, new_state);
 }
 
 static
 void reset_iterator_expectations(
-               struct bt_self_component_port_input_message_iterator *iterator)
+               struct bt_message_iterator *iterator)
 {
        iterator->last_ns_from_origin = INT64_MIN;
        iterator->clock_expectation.type = CLOCK_EXPECTATION_UNSET;
@@ -1091,12 +1089,12 @@ void reset_iterator_expectations(
 
 static
 bool message_iterator_can_seek_beginning(
-               struct bt_self_component_port_input_message_iterator *iterator)
+               struct bt_message_iterator *iterator)
 {
        enum bt_message_iterator_can_seek_beginning_status status;
        bt_bool can_seek;
 
-       status = bt_self_component_port_input_message_iterator_can_seek_beginning(
+       status = bt_message_iterator_can_seek_beginning(
                iterator, &can_seek);
        if (status != BT_FUNC_STATUS_OK) {
                can_seek = BT_FALSE;
@@ -1106,8 +1104,8 @@ bool message_iterator_can_seek_beginning(
 }
 
 enum bt_message_iterator_seek_beginning_status
-bt_self_component_port_input_message_iterator_seek_beginning(
-               struct bt_self_component_port_input_message_iterator *iterator)
+bt_message_iterator_seek_beginning(
+               struct bt_message_iterator *iterator)
 {
        int status;
 
@@ -1129,8 +1127,8 @@ bt_self_component_port_input_message_iterator_seek_beginning(
        reset_iterator_expectations(iterator);
 
        BT_LIB_LOGD("Calling user's \"seek beginning\" method: %!+i", iterator);
-       set_self_comp_port_input_msg_iterator_state(iterator,
-               BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_SEEKING);
+       set_msg_iterator_state(iterator,
+               BT_MESSAGE_ITERATOR_STATE_SEEKING);
        status = iterator->methods.seek_beginning(iterator);
        BT_LOGD("User method returned: status=%s",
                bt_common_func_status_string(status));
@@ -1153,8 +1151,8 @@ bt_self_component_port_input_message_iterator_seek_beginning(
 }
 
 bt_bool
-bt_self_component_port_input_message_iterator_can_seek_forward(
-               bt_self_component_port_input_message_iterator *iterator)
+bt_message_iterator_can_seek_forward(
+               bt_message_iterator *iterator)
 {
        BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
 
@@ -1235,7 +1233,7 @@ void destroy_auto_seek_stream_states(GHashTable *stream_states)
 
 static inline
 int auto_seek_handle_message(
-               struct bt_self_component_port_input_message_iterator *iterator,
+               struct bt_message_iterator *iterator,
                int64_t ns_from_origin, const struct bt_message *msg,
                bool *got_first, GHashTable *stream_states)
 {
@@ -1506,11 +1504,11 @@ end:
 
 static
 int find_message_ge_ns_from_origin(
-               struct bt_self_component_port_input_message_iterator *iterator,
+               struct bt_message_iterator *iterator,
                int64_t ns_from_origin, GHashTable *stream_states)
 {
        int status = BT_FUNC_STATUS_OK;
-       enum bt_self_component_port_input_message_iterator_state init_state =
+       enum bt_message_iterator_state init_state =
                iterator->state;
        const struct bt_message *messages[MSG_BATCH_SIZE];
        uint64_t user_count = 0;
@@ -1524,8 +1522,8 @@ int find_message_ge_ns_from_origin(
         * Make this iterator temporarily active (not seeking) to call
         * the "next" method.
         */
-       set_self_comp_port_input_msg_iterator_state(iterator,
-               BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ACTIVE);
+       set_msg_iterator_state(iterator,
+               BT_MESSAGE_ITERATOR_STATE_ACTIVE);
 
        BT_ASSERT_DBG(iterator->methods.next);
 
@@ -1550,7 +1548,7 @@ int find_message_ge_ns_from_origin(
                 * would change the iterator's state.
                 */
                BT_ASSERT_DBG(iterator->state ==
-                       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ACTIVE);
+                       BT_MESSAGE_ITERATOR_STATE_ACTIVE);
 
                switch (status) {
                case BT_FUNC_STATUS_OK:
@@ -1595,7 +1593,7 @@ end:
                }
        }
 
-       set_self_comp_port_input_msg_iterator_state(iterator, init_state);
+       set_msg_iterator_state(iterator, init_state);
        return status;
 }
 
@@ -1608,7 +1606,7 @@ end:
 
 static
 enum bt_message_iterator_class_next_method_status post_auto_seek_next(
-               struct bt_self_component_port_input_message_iterator *iterator,
+               struct bt_message_iterator *iterator,
                bt_message_array_const msgs, uint64_t capacity,
                uint64_t *count)
 {
@@ -1652,13 +1650,13 @@ int clock_raw_value_from_ns_from_origin(const bt_clock_class *clock_class,
 
 static
 bool message_iterator_can_seek_ns_from_origin(
-               struct bt_self_component_port_input_message_iterator *iterator,
+               struct bt_message_iterator *iterator,
                int64_t ns_from_origin)
 {
        enum bt_message_iterator_can_seek_ns_from_origin_status status;
        bt_bool can_seek;
 
-       status = bt_self_component_port_input_message_iterator_can_seek_ns_from_origin(
+       status = bt_message_iterator_can_seek_ns_from_origin(
                iterator, ns_from_origin, &can_seek);
        if (status != BT_FUNC_STATUS_OK) {
                can_seek = BT_FALSE;
@@ -1668,8 +1666,8 @@ bool message_iterator_can_seek_ns_from_origin(
 }
 
 enum bt_message_iterator_seek_ns_from_origin_status
-bt_self_component_port_input_message_iterator_seek_ns_from_origin(
-               struct bt_self_component_port_input_message_iterator *iterator,
+bt_message_iterator_seek_ns_from_origin(
+               struct bt_message_iterator *iterator,
                int64_t ns_from_origin)
 {
        int status;
@@ -1689,8 +1687,8 @@ bt_self_component_port_input_message_iterator_seek_ns_from_origin(
                message_iterator_can_seek_ns_from_origin(iterator, ns_from_origin),
                "Message iterator cannot seek nanoseconds from origin: %!+i, "
                "ns-from-origin=%" PRId64, iterator, ns_from_origin);
-       set_self_comp_port_input_msg_iterator_state(iterator,
-               BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_SEEKING);
+       set_msg_iterator_state(iterator,
+               BT_MESSAGE_ITERATOR_STATE_SEEKING);
 
        /*
         * We are seeking, reset our expectations about how the following
@@ -1901,7 +1899,7 @@ bt_self_component_port_input_message_iterator_seek_ns_from_origin(
                                iterator->auto_seek.original_next_callback = iterator->methods.next;
 
                                iterator->methods.next =
-                                       (bt_self_component_port_input_message_iterator_next_method)
+                                       (bt_message_iterator_next_method)
                                                post_auto_seek_next;
                        }
 
@@ -1943,21 +1941,21 @@ end:
 bt_bool bt_self_message_iterator_is_interrupted(
                const struct bt_self_message_iterator *self_msg_iter)
 {
-       const struct bt_self_component_port_input_message_iterator *iterator =
+       const struct bt_message_iterator *iterator =
                (const void *) self_msg_iter;
 
        BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
        return (bt_bool) bt_graph_is_interrupted(iterator->graph);
 }
 
-void bt_self_component_port_input_message_iterator_get_ref(
-               const struct bt_self_component_port_input_message_iterator *iterator)
+void bt_message_iterator_get_ref(
+               const struct bt_message_iterator *iterator)
 {
        bt_object_get_ref(iterator);
 }
 
-void bt_self_component_port_input_message_iterator_put_ref(
-               const struct bt_self_component_port_input_message_iterator *iterator)
+void bt_message_iterator_put_ref(
+               const struct bt_message_iterator *iterator)
 {
        bt_object_put_ref(iterator);
 }
index 7c4754f9794cc6213ff3f63e606a807a458e794c..8b211e10bfeaa82395c873b868ed14381ac062c6 100644 (file)
@@ -85,7 +85,7 @@ struct bt_message *create_event_message(
                const struct bt_stream *c_stream, bool with_cs,
                uint64_t raw_value)
 {
-       struct bt_self_component_port_input_message_iterator *msg_iter =
+       struct bt_message_iterator *msg_iter =
                (void *) self_msg_iter;
        struct bt_message_event *message = NULL;
        struct bt_event_class *event_class = (void *) c_event_class;
index 894a914cb68613cde5eeba2792c46225374af0f9..68bdc833433a849a71a28de6350850fc878defaa 100644 (file)
 struct bt_port;
 struct bt_graph;
 
-enum bt_self_component_port_input_message_iterator_state {
+enum bt_message_iterator_state {
        /* Iterator is not initialized */
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_NON_INITIALIZED,
+       BT_MESSAGE_ITERATOR_STATE_NON_INITIALIZED,
 
        /* Iterator is active, not at the end yet, and not finalized */
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ACTIVE,
+       BT_MESSAGE_ITERATOR_STATE_ACTIVE,
 
        /*
         * Iterator is ended, not finalized yet: the "next" method
         * returns BT_MESSAGE_ITERATOR_STATUS_END.
         */
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ENDED,
+       BT_MESSAGE_ITERATOR_STATE_ENDED,
 
        /* Iterator is currently being finalized */
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_FINALIZING,
+       BT_MESSAGE_ITERATOR_STATE_FINALIZING,
 
        /* Iterator is finalized */
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_FINALIZED,
+       BT_MESSAGE_ITERATOR_STATE_FINALIZED,
 
        /* Iterator is seeking */
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_SEEKING,
+       BT_MESSAGE_ITERATOR_STATE_SEEKING,
 
        /* Iterator did seek, but returned `BT_MESSAGE_ITERATOR_STATUS_AGAIN` */
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_AGAIN,
+       BT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_AGAIN,
 
        /* Iterator did seek, but returned error status */
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_ERROR,
+       BT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_ERROR,
 };
 
 typedef enum bt_message_iterator_class_next_method_status
-(*bt_self_component_port_input_message_iterator_next_method)(
+(*bt_message_iterator_next_method)(
                void *, bt_message_array_const, uint64_t, uint64_t *);
 
 typedef enum bt_message_iterator_class_seek_ns_from_origin_method_status
-(*bt_self_component_port_input_message_iterator_seek_ns_from_origin_method)(
+(*bt_message_iterator_seek_ns_from_origin_method)(
                void *, int64_t);
 
 typedef enum bt_message_iterator_class_seek_beginning_method_status
-(*bt_self_component_port_input_message_iterator_seek_beginning_method)(
+(*bt_message_iterator_seek_beginning_method)(
                void *);
 
 typedef enum bt_message_iterator_class_can_seek_ns_from_origin_method_status
-(*bt_self_component_port_input_message_iterator_can_seek_ns_from_origin_method)(
+(*bt_message_iterator_can_seek_ns_from_origin_method)(
                void *, int64_t, bt_bool *);
 
 typedef enum bt_message_iterator_class_can_seek_beginning_method_status
-(*bt_self_component_port_input_message_iterator_can_seek_beginning_method)(
+(*bt_message_iterator_can_seek_beginning_method)(
                void *, bt_bool *);
 
 struct bt_self_message_iterator_configuration {
@@ -90,7 +90,7 @@ struct bt_self_message_iterator_configuration {
        bool can_seek_forward;
 };
 
-struct bt_self_component_port_input_message_iterator {
+struct bt_message_iterator {
        struct bt_object base;
        GPtrArray *msgs;
        struct bt_component *upstream_component; /* Weak */
@@ -101,7 +101,7 @@ struct bt_self_component_port_input_message_iterator {
 
        /*
         * Array of
-        * `struct bt_self_component_port_input_message_iterator *`
+        * `struct bt_message_iterator *`
         * (weak).
         *
         * This is an array of upstream message iterators on which this
@@ -118,21 +118,21 @@ struct bt_self_component_port_input_message_iterator {
         * 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_message_iterator *downstream_msg_iter;
 
        struct {
-               bt_self_component_port_input_message_iterator_next_method next;
+               bt_message_iterator_next_method next;
 
                /* These two are always both set or both unset. */
-               bt_self_component_port_input_message_iterator_seek_ns_from_origin_method seek_ns_from_origin;
-               bt_self_component_port_input_message_iterator_can_seek_ns_from_origin_method can_seek_ns_from_origin;
+               bt_message_iterator_seek_ns_from_origin_method seek_ns_from_origin;
+               bt_message_iterator_can_seek_ns_from_origin_method can_seek_ns_from_origin;
 
                /* These two are always both set or both unset. */
-               bt_self_component_port_input_message_iterator_seek_beginning_method seek_beginning;
-               bt_self_component_port_input_message_iterator_can_seek_beginning_method can_seek_beginning;
+               bt_message_iterator_seek_beginning_method seek_beginning;
+               bt_message_iterator_can_seek_beginning_method can_seek_beginning;
        } methods;
 
-       enum bt_self_component_port_input_message_iterator_state state;
+       enum bt_message_iterator_state state;
 
        /*
         * Timestamp of the last received message (or INT64_MIN in the
@@ -200,32 +200,32 @@ struct bt_self_component_port_input_message_iterator {
 };
 
 BT_HIDDEN
-void bt_self_component_port_input_message_iterator_try_finalize(
-               struct bt_self_component_port_input_message_iterator *iterator);
+void bt_message_iterator_try_finalize(
+               struct bt_message_iterator *iterator);
 
 BT_HIDDEN
-void bt_self_component_port_input_message_iterator_set_connection(
-               struct bt_self_component_port_input_message_iterator *iterator,
+void bt_message_iterator_set_connection(
+               struct bt_message_iterator *iterator,
                struct bt_connection *connection);
 
 static inline
-const char *bt_self_component_port_input_message_iterator_state_string(
-               enum bt_self_component_port_input_message_iterator_state state)
+const char *bt_message_iterator_state_string(
+               enum bt_message_iterator_state state)
 {
        switch (state) {
-       case BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ACTIVE:
+       case BT_MESSAGE_ITERATOR_STATE_ACTIVE:
                return "ACTIVE";
-       case BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_ENDED:
+       case BT_MESSAGE_ITERATOR_STATE_ENDED:
                return "ENDED";
-       case BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_FINALIZING:
+       case BT_MESSAGE_ITERATOR_STATE_FINALIZING:
                return "FINALIZING";
-       case BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_FINALIZED:
+       case BT_MESSAGE_ITERATOR_STATE_FINALIZED:
                return "FINALIZED";
-       case BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_SEEKING:
+       case BT_MESSAGE_ITERATOR_STATE_SEEKING:
                return "SEEKING";
-       case BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_AGAIN:
+       case BT_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:
+       case BT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_ERROR:
                return "LAST_SEEKING_RETURNED_ERROR";
        default:
                return "(unknown)";
index e5776ae0490fdd982b7c5ab0e296a0a8e8c3bbfe..94964019fd86f2056402a05f56c0960430708d97 100644 (file)
@@ -56,7 +56,7 @@ struct bt_message *bt_message_message_iterator_inactivity_create(
                const struct bt_clock_class *default_clock_class,
                uint64_t value_cycles)
 {
-       struct bt_self_component_port_input_message_iterator *msg_iter =
+       struct bt_message_iterator *msg_iter =
                (void *) self_msg_iter;
        struct bt_message_message_iterator_inactivity *message;
        struct bt_message *ret_msg = NULL;
index 25c1abf49555b2c9a935d483a596294abbb35124..125e49f6c92e420a504102f32d3a90c8e1ab64fd 100644 (file)
@@ -85,7 +85,7 @@ struct bt_message *bt_message_packet_end_new(struct bt_graph *graph)
 
 static inline
 struct bt_message *create_packet_message(
-               struct bt_self_component_port_input_message_iterator *msg_iter,
+               struct bt_message_iterator *msg_iter,
                struct bt_packet *packet, struct bt_object_pool *pool,
                bool with_cs, uint64_t raw_value)
 {
@@ -171,7 +171,7 @@ struct bt_message *bt_message_packet_beginning_create(
                struct bt_self_message_iterator *self_msg_iter,
                const struct bt_packet *packet)
 {
-       struct bt_self_component_port_input_message_iterator *msg_iter =
+       struct bt_message_iterator *msg_iter =
                (void *) self_msg_iter;
 
        BT_ASSERT_PRE_DEV_NO_ERROR();
@@ -184,7 +184,7 @@ struct bt_message *bt_message_packet_beginning_create_with_default_clock_snapsho
                struct bt_self_message_iterator *self_msg_iter,
                const struct bt_packet *packet, uint64_t raw_value)
 {
-       struct bt_self_component_port_input_message_iterator *msg_iter =
+       struct bt_message_iterator *msg_iter =
                (void *) self_msg_iter;
 
        BT_ASSERT_PRE_DEV_NO_ERROR();
@@ -197,7 +197,7 @@ struct bt_message *bt_message_packet_end_create(
                struct bt_self_message_iterator *self_msg_iter,
                const struct bt_packet *packet)
 {
-       struct bt_self_component_port_input_message_iterator *msg_iter =
+       struct bt_message_iterator *msg_iter =
                (void *) self_msg_iter;
 
        BT_ASSERT_PRE_DEV_NO_ERROR();
@@ -210,7 +210,7 @@ struct bt_message *bt_message_packet_end_create_with_default_clock_snapshot(
                struct bt_self_message_iterator *self_msg_iter,
                const struct bt_packet *packet, uint64_t raw_value)
 {
-       struct bt_self_component_port_input_message_iterator *msg_iter =
+       struct bt_message_iterator *msg_iter =
                (void *) self_msg_iter;
 
        BT_ASSERT_PRE_DEV_NO_ERROR();
index 02f18ed5a9d94e500f522dbe22492af10160f72f..2a10c68dc05306aaaa42c696860e74e5e63b6fa0 100644 (file)
@@ -1210,7 +1210,7 @@ static inline void format_message_iterator(char **buf_ch,
                const struct bt_message_iterator *iterator)
 {
        char tmp_prefix[TMP_PREFIX_LEN];
-       const struct bt_self_component_port_input_message_iterator *
+       const struct bt_message_iterator *
                port_in_iter = (const void *) iterator;
 
        if (port_in_iter->upstream_component) {
index 9f1ef423b84684ca0403454a9a37fc5458c43e14..2cfc2048cc590bd0e46be4827a459dedcd35fc81 100644 (file)
@@ -147,7 +147,7 @@ void destroy_fs_sink_comp(struct fs_sink_comp *fs_sink)
                fs_sink->traces = NULL;
        }
 
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_PUT_REF_AND_RESET(
+       BT_MESSAGE_ITERATOR_PUT_REF_AND_RESET(
                fs_sink->upstream_iter);
        g_free(fs_sink);
 
@@ -991,7 +991,7 @@ bt_component_class_sink_consume_method_status ctf_fs_sink_consume(
        BT_ASSERT_DBG(fs_sink->upstream_iter);
 
        /* Consume messages */
-       next_status = bt_self_component_port_input_message_iterator_next(
+       next_status = bt_message_iterator_next(
                fs_sink->upstream_iter, &msgs, &msg_count);
        if (next_status < 0) {
                status = (int) next_status;
@@ -1090,17 +1090,17 @@ ctf_fs_sink_graph_is_configured(
                bt_self_component_sink *self_comp)
 {
        bt_component_class_sink_graph_is_configured_method_status status;
-       bt_self_component_port_input_message_iterator_create_from_sink_component_status
+       bt_message_iterator_create_from_sink_component_status
                msg_iter_status;
        struct fs_sink_comp *fs_sink = bt_self_component_get_data(
                        bt_self_component_sink_as_self_component(self_comp));
 
        msg_iter_status =
-               bt_self_component_port_input_message_iterator_create_from_sink_component(
+               bt_message_iterator_create_from_sink_component(
                        self_comp,
                        bt_self_component_sink_borrow_input_port_by_name(
                                self_comp, in_port_name), &fs_sink->upstream_iter);
-       if (msg_iter_status != BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_OK) {
+       if (msg_iter_status != BT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_OK) {
                status = (int) msg_iter_status;
                goto end;
        }
index 95d624de59f3b06f0ddf9cc3d2b53d39c1feab8c..f4861cdf75145d8cd660eaf49d7a3062d375785d 100644 (file)
@@ -33,7 +33,7 @@ struct fs_sink_comp {
        bt_self_component *self_comp;
 
        /* Owned by this */
-       bt_self_component_port_input_message_iterator *upstream_iter;
+       bt_message_iterator *upstream_iter;
 
        /* Base output directory path */
        GString *output_dir_path;
index fe3424146fe3b719a79ac7d2247d77c560cdb465..7b6ea383548b2e8296cfe2fd844bdf5988d27fe9 100644 (file)
@@ -74,7 +74,7 @@ struct debug_info_msg_iter {
        struct debug_info_component *debug_info_component;
        bt_self_message_iterator *input_iterator;
        bt_self_component *self_comp;
-       bt_self_component_port_input_message_iterator *msg_iter;
+       bt_message_iterator *msg_iter;
 
        struct trace_ir_maps *ir_maps;
        /* in_trace -> debug_info_mapping. */
@@ -1869,7 +1869,7 @@ bt_message_iterator_class_next_method_status debug_info_msg_iter_next(
                const bt_message_array_const msgs, uint64_t capacity,
                uint64_t *count)
 {
-       bt_self_component_port_input_message_iterator *upstream_iterator = NULL;
+       bt_message_iterator *upstream_iterator = NULL;
        bt_message_iterator_next_status upstream_iterator_ret_status;
        struct debug_info_msg_iter *debug_info_msg_iter;
        struct debug_info_component *debug_info = NULL;
@@ -1894,7 +1894,7 @@ bt_message_iterator_class_next_method_status debug_info_msg_iter_next(
        BT_ASSERT_DBG(upstream_iterator);
 
        upstream_iterator_ret_status =
-               bt_self_component_port_input_message_iterator_next(
+               bt_message_iterator_next(
                        upstream_iterator, &input_msgs, count);
        if (upstream_iterator_ret_status !=
                        BT_MESSAGE_ITERATOR_NEXT_STATUS_OK) {
@@ -1961,7 +1961,7 @@ void debug_info_msg_iter_destroy(struct debug_info_msg_iter *debug_info_msg_iter
        }
 
        if (debug_info_msg_iter->msg_iter) {
-               bt_self_component_port_input_message_iterator_put_ref(
+               bt_message_iterator_put_ref(
                        debug_info_msg_iter->msg_iter);
        }
 
@@ -1988,10 +1988,10 @@ bt_message_iterator_class_initialize_method_status debug_info_msg_iter_init(
                bt_self_component_port_output *self_port)
 {
        bt_message_iterator_class_initialize_method_status status;
-       bt_self_component_port_input_message_iterator_create_from_message_iterator_status
+       bt_message_iterator_create_from_message_iterator_status
                msg_iter_status;
        struct bt_self_component_port_input *input_port = NULL;
-       bt_self_component_port_input_message_iterator *upstream_iterator = NULL;
+       bt_message_iterator *upstream_iterator = NULL;
        struct debug_info_msg_iter *debug_info_msg_iter = NULL;
        gchar *debug_info_field_name;
        int ret;
@@ -2020,14 +2020,14 @@ bt_message_iterator_class_initialize_method_status debug_info_msg_iter_init(
        }
 
        /* Create an iterator on the upstream component. */
-       msg_iter_status = bt_self_component_port_input_message_iterator_create_from_message_iterator(
+       msg_iter_status = bt_message_iterator_create_from_message_iterator(
                self_msg_iter, input_port, &upstream_iterator);
-       if (msg_iter_status != BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_MESSAGE_ITERATOR_STATUS_OK) {
+       if (msg_iter_status != BT_MESSAGE_ITERATOR_CREATE_FROM_MESSAGE_ITERATOR_STATUS_OK) {
                status = (int) msg_iter_status;
                goto error;
        }
 
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_MOVE_REF(
+       BT_MESSAGE_ITERATOR_MOVE_REF(
                debug_info_msg_iter->msg_iter, upstream_iterator);
 
        /* Create hashtable that will contain debug info mapping. */
@@ -2056,7 +2056,7 @@ bt_message_iterator_class_initialize_method_status debug_info_msg_iter_init(
        }
 
        bt_self_message_iterator_configuration_set_can_seek_forward(config,
-               bt_self_component_port_input_message_iterator_can_seek_forward(
+               bt_message_iterator_can_seek_forward(
                        debug_info_msg_iter->msg_iter));
 
        bt_self_message_iterator_set_data(self_msg_iter, debug_info_msg_iter);
@@ -2081,7 +2081,7 @@ debug_info_msg_iter_can_seek_beginning(bt_self_message_iterator *self_msg_iter,
                bt_self_message_iterator_get_data(self_msg_iter);
        BT_ASSERT(debug_info_msg_iter);
 
-       return (int) bt_self_component_port_input_message_iterator_can_seek_beginning(
+       return (int) bt_message_iterator_can_seek_beginning(
                debug_info_msg_iter->msg_iter, can_seek);
 }
 
@@ -2098,7 +2098,7 @@ debug_info_msg_iter_seek_beginning(bt_self_message_iterator *self_msg_iter)
        BT_ASSERT(debug_info_msg_iter);
 
        /* Ask the upstream component to seek to the beginning. */
-       seek_beg_status = bt_self_component_port_input_message_iterator_seek_beginning(
+       seek_beg_status = bt_message_iterator_seek_beginning(
                debug_info_msg_iter->msg_iter);
        if (seek_beg_status != BT_MESSAGE_ITERATOR_SEEK_BEGINNING_STATUS_OK) {
                status = (int) seek_beg_status;
index c29a02f3d63185743f2ea577cb3c18babf001f7b..4f304f7320f05554c83d7728dceb4613e2d19f36 100644 (file)
@@ -162,7 +162,7 @@ void destroy_details_comp(struct details_comp *details_comp)
                details_comp->str = NULL;
        }
 
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_PUT_REF_AND_RESET(
+       BT_MESSAGE_ITERATOR_PUT_REF_AND_RESET(
                details_comp->msg_iter);
        g_free(details_comp);
 
@@ -419,9 +419,9 @@ bt_component_class_sink_graph_is_configured_method_status
 details_graph_is_configured(bt_self_component_sink *comp)
 {
        bt_component_class_sink_graph_is_configured_method_status status;
-       bt_self_component_port_input_message_iterator_create_from_sink_component_status
+       bt_message_iterator_create_from_sink_component_status
                msg_iter_status;
-       bt_self_component_port_input_message_iterator *iterator;
+       bt_message_iterator *iterator;
        struct details_comp *details_comp;
        bt_self_component_port_input *in_port;
 
@@ -438,15 +438,15 @@ details_graph_is_configured(bt_self_component_sink *comp)
                goto end;
        }
 
-       msg_iter_status = bt_self_component_port_input_message_iterator_create_from_sink_component(
+       msg_iter_status = bt_message_iterator_create_from_sink_component(
                comp, bt_self_component_sink_borrow_input_port_by_name(comp,
                        IN_PORT_NAME), &iterator);
-       if (msg_iter_status != BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_OK) {
+       if (msg_iter_status != BT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_OK) {
                status = (int) msg_iter_status;
                goto end;
        }
 
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_MOVE_REF(
+       BT_MESSAGE_ITERATOR_MOVE_REF(
                details_comp->msg_iter, iterator);
 
        status = BT_COMPONENT_CLASS_SINK_GRAPH_IS_CONFIGURED_METHOD_STATUS_OK;
@@ -473,7 +473,7 @@ details_consume(bt_self_component_sink *comp)
        BT_ASSERT_DBG(details_comp->msg_iter);
 
        /* Consume messages */
-       next_status = bt_self_component_port_input_message_iterator_next(
+       next_status = bt_message_iterator_next(
                details_comp->msg_iter, &msgs, &count);
        switch (next_status) {
        case BT_MESSAGE_ITERATOR_NEXT_STATUS_OK:
index 7902eabe562904eecfad27ac633146a403cf1e1f..379a8c3fbe7f3c08e4ea8e4bab36b69bc76d45bb 100644 (file)
@@ -146,7 +146,7 @@ struct details_comp {
        uint32_t next_unique_trace_id;
 
        /* Upstream message iterator */
-       bt_self_component_port_input_message_iterator *msg_iter;
+       bt_message_iterator *msg_iter;
 
        /*
         * True if this component printed something. This is used to
index 1e248644398022c43b59e94173a15235ef0d25f6..401cfd701ef5650241ac3352e9618db95719dcd4 100644 (file)
@@ -50,7 +50,7 @@ void destroy_pretty_data(struct pretty_component *pretty)
                goto end;
        }
 
-       bt_self_component_port_input_message_iterator_put_ref(pretty->iterator);
+       bt_message_iterator_put_ref(pretty->iterator);
 
        if (pretty->string) {
                (void) g_string_free(pretty->string, TRUE);
@@ -142,7 +142,7 @@ bt_component_class_sink_graph_is_configured_method_status
 pretty_graph_is_configured(bt_self_component_sink *comp)
 {
        bt_component_class_sink_graph_is_configured_method_status status;
-       bt_self_component_port_input_message_iterator_create_from_sink_component_status
+       bt_message_iterator_create_from_sink_component_status
                msg_iter_status;
        struct pretty_component *pretty;
 
@@ -150,10 +150,10 @@ pretty_graph_is_configured(bt_self_component_sink *comp)
                        bt_self_component_sink_as_self_component(comp));
        BT_ASSERT(pretty);
        BT_ASSERT(!pretty->iterator);
-       msg_iter_status = bt_self_component_port_input_message_iterator_create_from_sink_component(
+       msg_iter_status = bt_message_iterator_create_from_sink_component(
                comp, bt_self_component_sink_borrow_input_port_by_name(comp,
                        in_port_name), &pretty->iterator);
-       if (msg_iter_status != BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_OK) {
+       if (msg_iter_status != BT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_OK) {
                status = (int) msg_iter_status;
                goto end;
        }
@@ -171,7 +171,7 @@ bt_component_class_sink_consume_method_status pretty_consume(
        bt_component_class_sink_consume_method_status ret =
                BT_COMPONENT_CLASS_SINK_CONSUME_METHOD_STATUS_OK;
        bt_message_array_const msgs;
-       bt_self_component_port_input_message_iterator *it;
+       bt_message_iterator *it;
        struct pretty_component *pretty = bt_self_component_get_data(
                bt_self_component_sink_as_self_component(comp));
        bt_message_iterator_next_status next_status;
@@ -179,7 +179,7 @@ bt_component_class_sink_consume_method_status pretty_consume(
        uint64_t i = 0;
 
        it = pretty->iterator;
-       next_status = bt_self_component_port_input_message_iterator_next(it,
+       next_status = bt_message_iterator_next(it,
                &msgs, &count);
 
        switch (next_status) {
@@ -191,7 +191,7 @@ bt_component_class_sink_consume_method_status pretty_consume(
                goto end;
        case BT_MESSAGE_ITERATOR_NEXT_STATUS_END:
                ret = (int) next_status;
-               BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_PUT_REF_AND_RESET(
+               BT_MESSAGE_ITERATOR_PUT_REF_AND_RESET(
                        pretty->iterator);
                goto end;
        default:
index eb099efeb2c7eb27bc0070feb82391b0d16997d3..cb79db505b0b60cd844994d8c7cf54090dab5621 100644 (file)
@@ -74,7 +74,7 @@ struct pretty_options {
 
 struct pretty_component {
        struct pretty_options options;
-       bt_self_component_port_input_message_iterator *iterator;
+       bt_message_iterator *iterator;
        FILE *out, *err;
        int depth;      /* nesting, used for tabulation alignment. */
        bool start_line;
index 9fe62a349096b603732eccf40fbc53161ca14b40..25fcec7a693c95c262316985b8d73b20b8911114 100644 (file)
@@ -118,7 +118,7 @@ static
 void destroy_private_counter_data(struct counter *counter)
 {
        if (counter) {
-               bt_self_component_port_input_message_iterator_put_ref(
+               bt_message_iterator_put_ref(
                        counter->msg_iter);
                g_free(counter);
        }
@@ -134,7 +134,7 @@ void counter_finalize(bt_self_component_sink *comp)
                        bt_self_component_sink_as_self_component(comp));
        BT_ASSERT(counter);
        try_print_last(counter);
-       bt_self_component_port_input_message_iterator_put_ref(counter->msg_iter);
+       bt_message_iterator_put_ref(counter->msg_iter);
        g_free(counter);
 }
 
@@ -221,24 +221,24 @@ counter_graph_is_configured(
                bt_self_component_sink *comp)
 {
        bt_component_class_sink_graph_is_configured_method_status status;
-       bt_self_component_port_input_message_iterator_create_from_sink_component_status
+       bt_message_iterator_create_from_sink_component_status
                msg_iter_status;
        struct counter *counter;
-       bt_self_component_port_input_message_iterator *iterator;
+       bt_message_iterator *iterator;
 
        counter = bt_self_component_get_data(
                bt_self_component_sink_as_self_component(comp));
        BT_ASSERT(counter);
 
-       msg_iter_status = bt_self_component_port_input_message_iterator_create_from_sink_component(
+       msg_iter_status = bt_message_iterator_create_from_sink_component(
                comp, bt_self_component_sink_borrow_input_port_by_name(comp,
                        in_port_name), &iterator);
-       if (msg_iter_status != BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_OK) {
+       if (msg_iter_status != BT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_OK) {
                status = (int) msg_iter_status;
                goto end;
        }
 
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_MOVE_REF(
+       BT_MESSAGE_ITERATOR_MOVE_REF(
                counter->msg_iter, iterator);
 
        status = BT_COMPONENT_CLASS_SINK_GRAPH_IS_CONFIGURED_METHOD_STATUS_OK;
@@ -268,7 +268,7 @@ bt_component_class_sink_consume_method_status counter_consume(
        }
 
        /* Consume messages */
-       next_status = bt_self_component_port_input_message_iterator_next(
+       next_status = bt_message_iterator_next(
                counter->msg_iter, &msgs, &msg_count);
        if (next_status < 0) {
                status = (int) next_status;
index 437c5272ae9884698a8e0edb388f8a0d52b5c6f3..26a19f7a034dd21d6f99452ff066a059140e9209 100644 (file)
@@ -30,7 +30,7 @@
 #include "common/macros.h"
 
 struct counter {
-       bt_self_component_port_input_message_iterator *msg_iter;
+       bt_message_iterator *msg_iter;
        struct {
                uint64_t event;
                uint64_t stream_begin;
index 224b0696687a7bc77077f5b79e2674a510b28a80..9d2779bc7b7d0d5cfa835060a341f2da7abe04bd 100644 (file)
@@ -37,7 +37,7 @@ const char * const in_port_name = "in";
 static
 void destroy_private_dummy_data(struct dummy *dummy)
 {
-       bt_self_component_port_input_message_iterator_put_ref(dummy->msg_iter);
+       bt_message_iterator_put_ref(dummy->msg_iter);
        g_free(dummy);
 
 }
@@ -118,23 +118,23 @@ bt_component_class_sink_graph_is_configured_method_status dummy_graph_is_configu
                bt_self_component_sink *comp)
 {
        bt_component_class_sink_graph_is_configured_method_status status;
-       bt_self_component_port_input_message_iterator_create_from_sink_component_status
+       bt_message_iterator_create_from_sink_component_status
                msg_iter_status;
        struct dummy *dummy;
-       bt_self_component_port_input_message_iterator *iterator;
+       bt_message_iterator *iterator;
 
        dummy = bt_self_component_get_data(
                bt_self_component_sink_as_self_component(comp));
        BT_ASSERT(dummy);
-       msg_iter_status = bt_self_component_port_input_message_iterator_create_from_sink_component(
+       msg_iter_status = bt_message_iterator_create_from_sink_component(
                comp, bt_self_component_sink_borrow_input_port_by_name(comp,
                        in_port_name), &iterator);
-       if (msg_iter_status != BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_OK) {
+       if (msg_iter_status != BT_MESSAGE_ITERATOR_CREATE_FROM_SINK_COMPONENT_STATUS_OK) {
                status = (int) msg_iter_status;
                goto end;
        }
 
-       BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_MOVE_REF(
+       BT_MESSAGE_ITERATOR_MOVE_REF(
                dummy->msg_iter, iterator);
 
        status = BT_COMPONENT_CLASS_SINK_GRAPH_IS_CONFIGURED_METHOD_STATUS_OK;
@@ -165,7 +165,7 @@ bt_component_class_sink_consume_method_status dummy_consume(
        }
 
        /* Consume one message  */
-       next_status = bt_self_component_port_input_message_iterator_next(
+       next_status = bt_message_iterator_next(
                dummy->msg_iter, &msgs, &count);
        switch (next_status) {
        case BT_MESSAGE_ITERATOR_NEXT_STATUS_OK:
index f5985b1220f5421dafdfb0e6f0fd4566b98d35c1..5bc09fde707311a9737fa79e38a8c95170753103 100644 (file)
@@ -28,7 +28,7 @@
 #include "common/macros.h"
 
 struct dummy {
-       bt_self_component_port_input_message_iterator *msg_iter;
+       bt_message_iterator *msg_iter;
 };
 
 BT_HIDDEN
index 0c08f8289a298091542117c1aa33f137d4e2e292..db8b86bd817c94c7d5a6dd9a56dc433c0554421a 100644 (file)
@@ -56,7 +56,7 @@ struct muxer_upstream_msg_iter {
        struct muxer_comp *muxer_comp;
 
        /* Owned by this, NULL if ended */
-       bt_self_component_port_input_message_iterator *msg_iter;
+       bt_message_iterator *msg_iter;
 
        /* Contains `const bt_message *`, owned by this */
        GQueue *msgs;
@@ -143,7 +143,7 @@ void destroy_muxer_upstream_msg_iter(
                muxer_upstream_msg_iter,
                muxer_upstream_msg_iter->msg_iter,
                muxer_upstream_msg_iter->msgs->length);
-       bt_self_component_port_input_message_iterator_put_ref(
+       bt_message_iterator_put_ref(
                muxer_upstream_msg_iter->msg_iter);
 
        if (muxer_upstream_msg_iter->msgs) {
@@ -156,7 +156,7 @@ void destroy_muxer_upstream_msg_iter(
 
 static
 int muxer_msg_iter_add_upstream_msg_iter(struct muxer_msg_iter *muxer_msg_iter,
-               bt_self_component_port_input_message_iterator *self_msg_iter)
+               bt_message_iterator *self_msg_iter)
 {
        int ret = 0;
        struct muxer_upstream_msg_iter *muxer_upstream_msg_iter =
@@ -170,7 +170,7 @@ int muxer_msg_iter_add_upstream_msg_iter(struct muxer_msg_iter *muxer_msg_iter,
 
        muxer_upstream_msg_iter->muxer_comp = muxer_comp;
        muxer_upstream_msg_iter->msg_iter = self_msg_iter;
-       bt_self_component_port_input_message_iterator_get_ref(muxer_upstream_msg_iter->msg_iter);
+       bt_message_iterator_get_ref(muxer_upstream_msg_iter->msg_iter);
        muxer_upstream_msg_iter->msgs = g_queue_new();
        if (!muxer_upstream_msg_iter->msgs) {
                BT_COMP_LOGE_STR("Failed to allocate a GQueue.");
@@ -351,16 +351,16 @@ void muxer_finalize(bt_self_component_filter *self_comp)
 }
 
 static
-bt_self_component_port_input_message_iterator_create_from_message_iterator_status
+bt_message_iterator_create_from_message_iterator_status
 create_msg_iter_on_input_port(struct muxer_comp *muxer_comp,
                struct muxer_msg_iter *muxer_msg_iter,
                bt_self_component_port_input *self_port,
-               bt_self_component_port_input_message_iterator **msg_iter)
+               bt_message_iterator **msg_iter)
 {
        const bt_port *port = bt_self_component_port_as_port(
                bt_self_component_port_input_as_self_component_port(
                        self_port));
-       bt_self_component_port_input_message_iterator_create_from_message_iterator_status
+       bt_message_iterator_create_from_message_iterator_status
                status;
 
        BT_ASSERT(port);
@@ -369,9 +369,9 @@ create_msg_iter_on_input_port(struct muxer_comp *muxer_comp,
        // TODO: Advance the iterator to >= the time of the latest
        //       returned message by the muxer message
        //       iterator which creates it.
-       status = bt_self_component_port_input_message_iterator_create_from_message_iterator(
+       status = bt_message_iterator_create_from_message_iterator(
                muxer_msg_iter->self_msg_iter, self_port, msg_iter);
-       if (status != BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_MESSAGE_ITERATOR_STATUS_OK) {
+       if (status != BT_MESSAGE_ITERATOR_CREATE_FROM_MESSAGE_ITERATOR_STATUS_OK) {
                BT_COMP_LOGE("Cannot create upstream message iterator on input port: "
                        "port-addr=%p, port-name=\"%s\"",
                        port, bt_port_get_name(port));
@@ -402,7 +402,7 @@ bt_message_iterator_class_next_method_status muxer_upstream_msg_iter_next(
                "muxer-upstream-msg-iter-wrap-addr=%p, msg-iter-addr=%p",
                muxer_upstream_msg_iter,
                muxer_upstream_msg_iter->msg_iter);
-       input_port_iter_status = bt_self_component_port_input_message_iterator_next(
+       input_port_iter_status = bt_message_iterator_next(
                muxer_upstream_msg_iter->msg_iter, &msgs, &count);
        BT_COMP_LOGD("Upstream message iterator's \"next\" method returned: "
                "status=%s",
@@ -1216,12 +1216,12 @@ muxer_msg_iter_init_upstream_iterators(struct muxer_comp *muxer_comp,
        }
 
        for (i = 0; i < count; i++) {
-               bt_self_component_port_input_message_iterator *upstream_msg_iter;
+               bt_message_iterator *upstream_msg_iter;
                bt_self_component_port_input *self_port =
                        bt_self_component_filter_borrow_input_port_by_index(
                                muxer_comp->self_comp_flt, i);
                const bt_port *port;
-               bt_self_component_port_input_message_iterator_create_from_message_iterator_status
+               bt_message_iterator_create_from_message_iterator_status
                        msg_iter_status;
                int int_status;
 
@@ -1238,7 +1238,7 @@ muxer_msg_iter_init_upstream_iterators(struct muxer_comp *muxer_comp,
 
                msg_iter_status = create_msg_iter_on_input_port(muxer_comp,
                        muxer_msg_iter, self_port, &upstream_msg_iter);
-               if (msg_iter_status != BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_MESSAGE_ITERATOR_STATUS_OK) {
+               if (msg_iter_status != BT_MESSAGE_ITERATOR_CREATE_FROM_MESSAGE_ITERATOR_STATUS_OK) {
                        /* create_msg_iter_on_input_port() logs errors */
                        status = (int) msg_iter_status;
                        goto end;
@@ -1246,7 +1246,7 @@ muxer_msg_iter_init_upstream_iterators(struct muxer_comp *muxer_comp,
 
                int_status = muxer_msg_iter_add_upstream_msg_iter(muxer_msg_iter,
                        upstream_msg_iter);
-               bt_self_component_port_input_message_iterator_put_ref(
+               bt_message_iterator_put_ref(
                        upstream_msg_iter);
                if (int_status) {
                        status = BT_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD_STATUS_ERROR;
@@ -1255,7 +1255,7 @@ muxer_msg_iter_init_upstream_iterators(struct muxer_comp *muxer_comp,
                }
 
                can_seek_forward = can_seek_forward &&
-                       bt_self_component_port_input_message_iterator_can_seek_forward(
+                       bt_message_iterator_can_seek_forward(
                                upstream_msg_iter);
        }
 
@@ -1464,7 +1464,7 @@ muxer_upstream_msg_iters_can_all_seek_beginning(
        for (i = 0; i < muxer_upstream_msg_iters->len; i++) {
                struct muxer_upstream_msg_iter *upstream_msg_iter =
                        muxer_upstream_msg_iters->pdata[i];
-               status = (int) bt_self_component_port_input_message_iterator_can_seek_beginning(
+               status = (int) bt_message_iterator_can_seek_beginning(
                        upstream_msg_iter->msg_iter, can_seek);
                if (status != BT_MESSAGE_ITERATOR_CLASS_CAN_SEEK_BEGINNING_METHOD_STATUS_OK) {
                        goto end;
@@ -1524,7 +1524,7 @@ bt_message_iterator_class_seek_beginning_method_status muxer_msg_iter_seek_begin
                struct muxer_upstream_msg_iter *upstream_msg_iter =
                        muxer_msg_iter->ended_muxer_upstream_msg_iters->pdata[i];
 
-               seek_beg_status = bt_self_component_port_input_message_iterator_seek_beginning(
+               seek_beg_status = bt_message_iterator_seek_beginning(
                        upstream_msg_iter->msg_iter);
                if (seek_beg_status != BT_MESSAGE_ITERATOR_SEEK_BEGINNING_STATUS_OK) {
                        status = (int) seek_beg_status;
@@ -1540,7 +1540,7 @@ bt_message_iterator_class_seek_beginning_method_status muxer_msg_iter_seek_begin
                struct muxer_upstream_msg_iter *upstream_msg_iter =
                        muxer_msg_iter->active_muxer_upstream_msg_iters->pdata[i];
 
-               seek_beg_status = bt_self_component_port_input_message_iterator_seek_beginning(
+               seek_beg_status = bt_message_iterator_seek_beginning(
                        upstream_msg_iter->msg_iter);
                if (seek_beg_status != BT_MESSAGE_ITERATOR_SEEK_BEGINNING_STATUS_OK) {
                        status = (int) seek_beg_status;
index d7f5576bdd6bb7719f2255d749095f881e49d338..2fc365c9650d82ca320acfb6a342fd2ee59de236 100644 (file)
@@ -114,7 +114,7 @@ struct trimmer_iterator {
        enum trimmer_iterator_state state;
 
        /* Owned by this */
-       bt_self_component_port_input_message_iterator *upstream_iter;
+       bt_message_iterator *upstream_iter;
        struct trimmer_bound begin, end;
 
        /*
@@ -670,7 +670,7 @@ void destroy_trimmer_iterator(struct trimmer_iterator *trimmer_it)
                goto end;
        }
 
-       bt_self_component_port_input_message_iterator_put_ref(
+       bt_message_iterator_put_ref(
                trimmer_it->upstream_iter);
 
        if (trimmer_it->output_messages) {
@@ -703,7 +703,7 @@ bt_message_iterator_class_initialize_method_status trimmer_msg_iter_init(
                bt_self_component_port_output *port)
 {
        bt_message_iterator_class_initialize_method_status status;
-       bt_self_component_port_input_message_iterator_create_from_message_iterator_status
+       bt_message_iterator_create_from_message_iterator_status
                msg_iter_status;
        struct trimmer_iterator *trimmer_it;
 
@@ -730,12 +730,12 @@ bt_message_iterator_class_initialize_method_status trimmer_msg_iter_init(
        trimmer_it->begin = trimmer_it->trimmer_comp->begin;
        trimmer_it->end = trimmer_it->trimmer_comp->end;
        msg_iter_status =
-               bt_self_component_port_input_message_iterator_create_from_message_iterator(
+               bt_message_iterator_create_from_message_iterator(
                        self_msg_iter,
                        bt_self_component_filter_borrow_input_port_by_name(
                                trimmer_it->trimmer_comp->self_comp_filter, in_port_name),
                        &trimmer_it->upstream_iter);
-       if (msg_iter_status != BT_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_CREATE_FROM_MESSAGE_ITERATOR_STATUS_OK) {
+       if (msg_iter_status != BT_MESSAGE_ITERATOR_CREATE_FROM_MESSAGE_ITERATOR_STATUS_OK) {
                status = (int) msg_iter_status;
                goto error;
        }
@@ -971,7 +971,7 @@ state_set_trimmer_iterator_bounds(
 
        while (true) {
                upstream_iter_status =
-                       bt_self_component_port_input_message_iterator_next(
+                       bt_message_iterator_next(
                                trimmer_it->upstream_iter, &msgs, &count);
                if (upstream_iter_status != BT_MESSAGE_ITERATOR_NEXT_STATUS_OK) {
                        goto end;
@@ -1046,7 +1046,7 @@ bt_message_iterator_class_next_method_status state_seek_initially(
        if (trimmer_it->begin.is_infinite) {
                bt_bool can_seek;
 
-               status = (int) bt_self_component_port_input_message_iterator_can_seek_beginning(
+               status = (int) bt_message_iterator_can_seek_beginning(
                        trimmer_it->upstream_iter, &can_seek);
                if (status != BT_MESSAGE_ITERATOR_CLASS_NEXT_METHOD_STATUS_OK) {
                        if (status < 0) {
@@ -1064,12 +1064,12 @@ bt_message_iterator_class_next_method_status state_seek_initially(
                        goto end;
                }
 
-               status = (int) bt_self_component_port_input_message_iterator_seek_beginning(
+               status = (int) bt_message_iterator_seek_beginning(
                        trimmer_it->upstream_iter);
        } else {
                bt_bool can_seek;
 
-               status = (int) bt_self_component_port_input_message_iterator_can_seek_ns_from_origin(
+               status = (int) bt_message_iterator_can_seek_ns_from_origin(
                        trimmer_it->upstream_iter, trimmer_it->begin.ns_from_origin,
                        &can_seek);
 
@@ -1091,7 +1091,7 @@ bt_message_iterator_class_next_method_status state_seek_initially(
                        goto end;
                }
 
-               status = (int) bt_self_component_port_input_message_iterator_seek_ns_from_origin(
+               status = (int) bt_message_iterator_seek_ns_from_origin(
                        trimmer_it->upstream_iter, trimmer_it->begin.ns_from_origin);
        }
 
@@ -1809,7 +1809,7 @@ state_trim(struct trimmer_iterator *trimmer_it,
        bool reached_end = false;
 
        while (g_queue_is_empty(trimmer_it->output_messages)) {
-               status = (int) bt_self_component_port_input_message_iterator_next(
+               status = (int) bt_message_iterator_next(
                        trimmer_it->upstream_iter, &my_msgs, &my_count);
                if (G_UNLIKELY(status != BT_MESSAGE_ITERATOR_CLASS_NEXT_METHOD_STATUS_OK)) {
                        if (status == BT_MESSAGE_ITERATOR_CLASS_NEXT_METHOD_STATUS_END) {
index f11cb2c2e92cf912d7ca5cd06a76136a06521514..ef2a41eae5ac5f79d99913f82a7db4a80010c334 100644 (file)
@@ -45,7 +45,7 @@ class WorkingSink(bt2._UserSinkComponent):
         self._in = self._add_input_port('in')
 
     def _user_graph_is_configured(self):
-        self._iter = self._create_input_port_message_iterator(self._in)
+        self._iter = self._create_message_iterator(self._in)
 
     def _user_consume(self):
         next(self._iter)
@@ -56,7 +56,7 @@ class SinkWithExceptionChaining(bt2._UserSinkComponent):
         self._in = self._add_input_port('in')
 
     def _user_graph_is_configured(self):
-        self._iter = self._create_input_port_message_iterator(self._in)
+        self._iter = self._create_message_iterator(self._in)
 
     def _user_consume(self):
         try:
index 7c18e8a79256a98afde305af9300614a906db708..5eb83f4097c6079178c4a039245082c10e50d2e0 100644 (file)
@@ -277,9 +277,7 @@ class GraphTestCase(unittest.TestCase):
                 next(self._msg_iter)
 
             def _user_graph_is_configured(self):
-                self._msg_iter = self._create_input_port_message_iterator(
-                    self._input_ports['in']
-                )
+                self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
         # add two interrupters, set one of them
         interrupter1 = bt2.Interrupter()
@@ -325,9 +323,7 @@ class GraphTestCase(unittest.TestCase):
                 return next(self._msg_iter)
 
             def _user_graph_is_configured(self):
-                self._msg_iter = self._create_input_port_message_iterator(
-                    self._input_ports['in']
-                )
+                self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
         graph = self._graph
         up = self._graph.add_component(MySource, 'down')
@@ -384,9 +380,7 @@ class GraphTestCase(unittest.TestCase):
                 comp_self._at += 1
 
             def _user_graph_is_configured(self):
-                self._msg_iter = self._create_input_port_message_iterator(
-                    self._input_port
-                )
+                self._msg_iter = self._create_message_iterator(self._input_port)
 
         src = self._graph.add_component(MySource, 'src')
         sink = self._graph.add_component(MySink, 'sink')
@@ -482,9 +476,7 @@ class GraphTestCase(unittest.TestCase):
                 comp_self._at += 1
 
             def _user_graph_is_configured(self):
-                self._msg_iter = self._create_input_port_message_iterator(
-                    self._input_port
-                )
+                self._msg_iter = self._create_message_iterator(self._input_port)
 
         src = self._graph.add_component(MySource, 'src')
         sink = self._graph.add_component(MySink, 'sink')
@@ -539,9 +531,7 @@ class GraphTestCase(unittest.TestCase):
                 comp_self._at += 1
 
             def _user_graph_is_configured(self):
-                self._msg_iter = self._create_input_port_message_iterator(
-                    self._input_port
-                )
+                self._msg_iter = self._create_message_iterator(self._input_port)
 
         src = self._graph.add_component(MySource, 'src')
         sink = self._graph.add_component(MySink, 'sink')
index bc8078a6922242798ac770ebc9b30b29dc36ef3a..3cbe26f2568894698d0a3a0538ebf60a324ff36b 100644 (file)
@@ -35,9 +35,7 @@ class SimpleSink(bt2._UserSinkComponent):
         next(self._msg_iter)
 
     def _user_graph_is_configured(self):
-        self._msg_iter = self._create_input_port_message_iterator(
-            self._input_ports['in']
-        )
+        self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
 
 def _create_graph(src_comp_cls, sink_comp_cls, flt_comp_cls=None):
@@ -96,7 +94,7 @@ class UserMessageIteratorTestCase(unittest.TestCase):
             def __init__(self, config, self_port_output):
                 nonlocal flt_iter_initialized
                 flt_iter_initialized = True
-                self._up_iter = self._create_input_port_message_iterator(
+                self._up_iter = self._create_message_iterator(
                     self._component._input_ports['in']
                 )
 
@@ -117,8 +115,8 @@ class UserMessageIteratorTestCase(unittest.TestCase):
 
     def test_create_user_error(self):
         # This tests both error handling by
-        # _UserSinkComponent._create_input_port_message_iterator
-        # and _UserMessageIterator._create_input_port_message_iterator, as they
+        # _UserSinkComponent._create_message_iterator
+        # and _UserMessageIterator._create_message_iterator, as they
         # are both used in the graph.
         class MySourceIter(bt2._UserMessageIterator):
             def __init__(self, config, self_port_output):
@@ -132,9 +130,7 @@ class UserMessageIteratorTestCase(unittest.TestCase):
             def __init__(self, config, self_port_output):
                 # This is expected to raise because of the error in
                 # MySourceIter.__init__.
-                self._create_input_port_message_iterator(
-                    self._component._input_ports['in']
-                )
+                self._create_message_iterator(self._component._input_ports['in'])
 
         class MyFilter(bt2._UserFilterComponent, message_iterator_class=MyFilterIter):
             def __init__(self, config, params, obj):
@@ -200,9 +196,7 @@ class UserMessageIteratorTestCase(unittest.TestCase):
                 self._add_input_port('in')
 
             def _user_graph_is_configured(self):
-                self._msg_iter = self._create_input_port_message_iterator(
-                    self._input_ports['in']
-                )
+                self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
             def _user_consume(self):
                 nonlocal can_seek_forward
@@ -348,9 +342,7 @@ class UserMessageIteratorTestCase(unittest.TestCase):
         class MyFilterIter(bt2._UserMessageIterator):
             def __init__(self, port):
                 input_port = port.user_data
-                self._upstream_iter = self._create_input_port_message_iterator(
-                    input_port
-                )
+                self._upstream_iter = self._create_message_iterator(input_port)
 
             def __next__(self):
                 return next(self._upstream_iter)
@@ -396,7 +388,7 @@ class UserMessageIteratorTestCase(unittest.TestCase):
         class MyFilterIter(bt2._UserMessageIterator):
             def __init__(self, config, port):
                 # First, create an upstream iterator.
-                self._upstream_iter = self._create_input_port_message_iterator(
+                self._upstream_iter = self._create_message_iterator(
                     self._component._input_ports['in']
                 )
 
@@ -418,9 +410,7 @@ class UserMessageIteratorTestCase(unittest.TestCase):
                 self._input_port = self._add_input_port('in')
 
             def _user_graph_is_configured(self):
-                self._upstream_iter = self._create_input_port_message_iterator(
-                    self._input_port
-                )
+                self._upstream_iter = self._create_message_iterator(self._input_port)
 
             def _user_consume(self):
                 # We should not reach this.
@@ -493,7 +483,7 @@ def _setup_seek_test(
 
     class MyFilterIter(bt2._UserMessageIterator):
         def __init__(self, config, port):
-            self._upstream_iter = self._create_input_port_message_iterator(
+            self._upstream_iter = self._create_message_iterator(
                 self._component._input_ports['in']
             )
             config.can_seek_forward = self._upstream_iter.can_seek_forward
@@ -535,9 +525,7 @@ class UserMessageIteratorSeekBeginningTestCase(unittest.TestCase):
                 self._add_input_port('in')
 
             def _user_graph_is_configured(self):
-                self._msg_iter = self._create_input_port_message_iterator(
-                    self._input_ports['in']
-                )
+                self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
             def _user_consume(self):
                 nonlocal can_seek_beginning
@@ -571,9 +559,7 @@ class UserMessageIteratorSeekBeginningTestCase(unittest.TestCase):
                 self._add_input_port('in')
 
             def _user_graph_is_configured(self):
-                self._msg_iter = self._create_input_port_message_iterator(
-                    self._input_ports['in']
-                )
+                self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
             def _user_consume(self):
                 nonlocal can_seek_beginning
@@ -595,9 +581,7 @@ class UserMessageIteratorSeekBeginningTestCase(unittest.TestCase):
                 self._add_input_port('in')
 
             def _user_graph_is_configured(self):
-                self._msg_iter = self._create_input_port_message_iterator(
-                    self._input_ports['in']
-                )
+                self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
             def _user_consume(self):
                 nonlocal can_seek_beginning
@@ -614,9 +598,7 @@ class UserMessageIteratorSeekBeginningTestCase(unittest.TestCase):
                 self._add_input_port('in')
 
             def _user_graph_is_configured(self):
-                self._msg_iter = self._create_input_port_message_iterator(
-                    self._input_ports['in']
-                )
+                self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
             def _user_consume(self):
                 # This is expected to raise.
@@ -643,9 +625,7 @@ class UserMessageIteratorSeekBeginningTestCase(unittest.TestCase):
                 self._add_input_port('in')
 
             def _user_graph_is_configured(self):
-                self._msg_iter = self._create_input_port_message_iterator(
-                    self._input_ports['in']
-                )
+                self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
             def _user_consume(self):
                 # This is expected to raise.
@@ -672,9 +652,7 @@ class UserMessageIteratorSeekBeginningTestCase(unittest.TestCase):
                 self._add_input_port('in')
 
             def _user_graph_is_configured(self):
-                self._msg_iter = self._create_input_port_message_iterator(
-                    self._input_ports['in']
-                )
+                self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
             def _user_consume(self):
                 nonlocal do_seek_beginning
@@ -716,9 +694,7 @@ class UserMessageIteratorSeekBeginningTestCase(unittest.TestCase):
                 self._add_input_port('in')
 
             def _user_graph_is_configured(self):
-                self._msg_iter = self._create_input_port_message_iterator(
-                    self._input_ports['in']
-                )
+                self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
             def _user_consume(self):
                 self._msg_iter.seek_beginning()
@@ -959,9 +935,7 @@ class UserMessageIteratorSeekNsFromOriginTestCase(unittest.TestCase):
                 self._add_input_port('in')
 
             def _user_graph_is_configured(self):
-                self._msg_iter = self._create_input_port_message_iterator(
-                    self._input_ports['in']
-                )
+                self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
             def _user_consume(self):
                 nonlocal can_seek_ns_from_origin
@@ -1018,9 +992,7 @@ class UserMessageIteratorSeekNsFromOriginTestCase(unittest.TestCase):
                 self._add_input_port('in')
 
             def _user_graph_is_configured(self):
-                self._msg_iter = self._create_input_port_message_iterator(
-                    self._input_ports['in']
-                )
+                self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
             def _user_consume(self):
                 # This is expected to raise.
@@ -1047,9 +1019,7 @@ class UserMessageIteratorSeekNsFromOriginTestCase(unittest.TestCase):
                 self._add_input_port('in')
 
             def _user_graph_is_configured(self):
-                self._msg_iter = self._create_input_port_message_iterator(
-                    self._input_ports['in']
-                )
+                self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
             def _user_consume(self):
                 # This is expected to raise.
@@ -1076,9 +1046,7 @@ class UserMessageIteratorSeekNsFromOriginTestCase(unittest.TestCase):
                 self._add_input_port('in')
 
             def _user_graph_is_configured(self):
-                self._msg_iter = self._create_input_port_message_iterator(
-                    self._input_ports['in']
-                )
+                self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
             def _user_consume(self):
                 self._msg_iter.seek_ns_from_origin(17)
index 8602142072a7884e5acb77c627d54a590330c516..ec8b51e87c3aea1b5f415f2c95b968abef97c118 100644 (file)
@@ -257,9 +257,7 @@ class TestProxySink(bt2._UserSinkComponent):
         self._add_input_port('in')
 
     def _user_graph_is_configured(self):
-        self._msg_iter = self._create_input_port_message_iterator(
-            self._input_ports['in']
-        )
+        self._msg_iter = self._create_message_iterator(self._input_ports['in'])
 
     def _user_consume(self):
         assert self._msg_list[0] is None
index 641aaed13ae2420d057c8632eb8160824ad9eca9..b12ab35a6a41aa9caaac0b913f248d1d36b39346 100644 (file)
@@ -29,7 +29,7 @@ struct test_data {
 
 static
 bt_graph_simple_sink_component_initialize_func_status simple_INITIALIZE_func(
-               bt_self_component_port_input_message_iterator *iterator,
+               bt_message_iterator *iterator,
                void *data)
 {
        struct test_data *test_data = data;
@@ -41,7 +41,7 @@ bt_graph_simple_sink_component_initialize_func_status simple_INITIALIZE_func(
 
 static
 bt_graph_simple_sink_component_consume_func_status simple_consume_func(
-               bt_self_component_port_input_message_iterator *iterator,
+               bt_message_iterator *iterator,
                void *data)
 {
        struct test_data *test_data = data;
This page took 0.080417 seconds and 4 git commands to generate.