| 1 | /* |
| 2 | * Copyright (c) 2023 Philippe Proulx <pproulx@efficios.com> |
| 3 | * |
| 4 | * SPDX-License-Identifier: MIT |
| 5 | */ |
| 6 | |
| 7 | #ifndef BABELTRACE_CPP_COMMON_BT2_SELF_MESSAGE_ITERATOR_CONFIGURATION_HPP |
| 8 | #define BABELTRACE_CPP_COMMON_BT2_SELF_MESSAGE_ITERATOR_CONFIGURATION_HPP |
| 9 | |
| 10 | #include <babeltrace2/babeltrace.h> |
| 11 | |
| 12 | #include "borrowed-object.hpp" |
| 13 | |
| 14 | namespace bt2 { |
| 15 | |
| 16 | class SelfMessageIteratorConfiguration final : |
| 17 | public BorrowedObject<bt_self_message_iterator_configuration> |
| 18 | { |
| 19 | public: |
| 20 | explicit SelfMessageIteratorConfiguration(const LibObjPtr libObjPtr) noexcept : |
| 21 | _ThisBorrowedObject {libObjPtr} |
| 22 | { |
| 23 | } |
| 24 | |
| 25 | SelfMessageIteratorConfiguration canSeekForward(const bool canSeekForward) const noexcept |
| 26 | { |
| 27 | bt_self_message_iterator_configuration_set_can_seek_forward( |
| 28 | this->libObjPtr(), static_cast<bt_bool>(canSeekForward)); |
| 29 | return *this; |
| 30 | } |
| 31 | }; |
| 32 | |
| 33 | } /* namespace bt2 */ |
| 34 | |
| 35 | #endif /* BABELTRACE_CPP_COMMON_BT2_SELF_MESSAGE_ITERATOR_CONFIGURATION_HPP */ |