lib: make can_seek_beginning and can_seek_ns_from_origin methods return a status
[babeltrace.git] / include / babeltrace2 / graph / self-component-port-input-message-iterator.h
index 67d6d83290d32d60bca40248864979fb6c73ae28..c83bd8db60cfd42d560f4649619486cc7b917ce9 100644 (file)
 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(
@@ -44,9 +56,17 @@ bt_self_component_port_input_message_iterator_as_message_iterator(
        return __BT_UPCAST(bt_message_iterator, iterator);
 }
 
-extern bt_self_component_port_input_message_iterator *
-bt_self_component_port_input_message_iterator_create(
-               bt_self_component_port_input *input_port);
+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(
@@ -57,13 +77,15 @@ 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_bool
+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);
+               int64_t ns_from_origin, bt_bool *can_seek);
 
-extern bt_bool bt_self_component_port_input_message_iterator_can_seek_beginning(
-               bt_self_component_port_input_message_iterator *iterator);
+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(
This page took 0.024595 seconds and 4 git commands to generate.