X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace2%2Fgraph%2Fself-component-port-input-message-iterator.h;h=a0c8c54e47412f84c68550fdd6255a9c71961cbc;hb=1906e012b741e9fea75e778ffaecffbf79ecc0fc;hp=22f7087631d38c508e47cf66880069261867c0a5;hpb=3fd40f46e5599429f763b955ded1fe5d1e043922;p=babeltrace.git diff --git a/include/babeltrace2/graph/self-component-port-input-message-iterator.h b/include/babeltrace2/graph/self-component-port-input-message-iterator.h index 22f70876..a0c8c54e 100644 --- a/include/babeltrace2/graph/self-component-port-input-message-iterator.h +++ b/include/babeltrace2/graph/self-component-port-input-message-iterator.h @@ -2,7 +2,7 @@ #define BABELTRACE2_GRAPH_SELF_COMPONENT_PORT_INPUT_MESSAGE_ITERATOR_H /* - * Copyright 2017-2018 Philippe Proulx + * 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 @@ -23,23 +23,31 @@ * SOFTWARE. */ +#ifndef __BT_IN_BABELTRACE_H +# error "Please include instead." +#endif + #include -/* For bt_message_iterator_*_status */ #include - -/* - * For bt_component, bt_message_iterator, - * bt_self_component_port_input_message_iterator, - * bt_self_component_port_input, bt_message_array_const, bt_bool, - * __BT_UPCAST - */ #include #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( @@ -48,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( @@ -61,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( @@ -78,6 +96,10 @@ 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);