2 * SPDX-License-Identifier: MIT
4 * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 #ifndef BABELTRACE_CTF_WRITER_WRITER_INTERNAL_H
8 #define BABELTRACE_CTF_WRITER_WRITER_INTERNAL_H
12 #include <sys/types.h>
14 #include <babeltrace2-ctf-writer/trace.h>
15 #include <babeltrace2-ctf-writer/writer.h>
17 #include "common/macros.h"
21 struct metadata_context
{
24 unsigned int current_indentation_level
;
27 struct bt_ctf_writer
{
28 struct bt_ctf_object base
;
29 int frozen
; /* Protects attributes that can't be changed mid-trace */
30 struct bt_ctf_trace
*trace
;
35 enum field_type_alias
{
36 FIELD_TYPE_ALIAS_UINT5_T
= 0,
37 FIELD_TYPE_ALIAS_UINT8_T
,
38 FIELD_TYPE_ALIAS_UINT16_T
,
39 FIELD_TYPE_ALIAS_UINT27_T
,
40 FIELD_TYPE_ALIAS_UINT32_T
,
41 FIELD_TYPE_ALIAS_UINT64_T
,
45 struct bt_ctf_field_type
*get_field_type(enum field_type_alias alias
);
47 const char *bt_ctf_get_byte_order_string(enum bt_ctf_byte_order byte_order
);
49 void bt_ctf_writer_freeze(struct bt_ctf_writer
*writer
);
51 #endif /* BABELTRACE_CTF_WRITER_WRITER_INTERNAL_H */