| 1 | /* |
| 2 | * SPDX-License-Identifier: MIT |
| 3 | * |
| 4 | * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com> |
| 5 | * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com> |
| 6 | */ |
| 7 | |
| 8 | #ifndef BABELTRACE_GRAPH_MESSAGE_ITERATOR_CLASS_INTERNAL_H |
| 9 | #define BABELTRACE_GRAPH_MESSAGE_ITERATOR_CLASS_INTERNAL_H |
| 10 | |
| 11 | #include <babeltrace2/graph/message-iterator-class.h> |
| 12 | #include <babeltrace2/types.h> |
| 13 | #include "common/macros.h" |
| 14 | #include "lib/object.h" |
| 15 | #include <stdbool.h> |
| 16 | #include <glib.h> |
| 17 | |
| 18 | struct bt_message_iterator_class { |
| 19 | struct bt_object base; |
| 20 | bool frozen; |
| 21 | |
| 22 | struct { |
| 23 | bt_message_iterator_class_initialize_method initialize; |
| 24 | bt_message_iterator_class_finalize_method finalize; |
| 25 | bt_message_iterator_class_next_method next; |
| 26 | bt_message_iterator_class_seek_ns_from_origin_method seek_ns_from_origin; |
| 27 | bt_message_iterator_class_seek_beginning_method seek_beginning; |
| 28 | bt_message_iterator_class_can_seek_ns_from_origin_method can_seek_ns_from_origin; |
| 29 | bt_message_iterator_class_can_seek_beginning_method can_seek_beginning; |
| 30 | } methods; |
| 31 | }; |
| 32 | |
| 33 | BT_HIDDEN |
| 34 | void _bt_message_iterator_class_freeze( |
| 35 | const struct bt_message_iterator_class *message_iterator_class); |
| 36 | |
| 37 | #ifdef BT_DEV_MODE |
| 38 | # define bt_message_iterator_class_freeze _bt_message_iterator_class_freeze |
| 39 | #else |
| 40 | # define bt_message_iterator_class_freeze(_cls) |
| 41 | #endif |
| 42 | |
| 43 | #endif /* BABELTRACE_GRAPH_MESSAGE_ITERATOR_CLASS_INTERNAL_H */ |