1 #ifndef BABELTRACE_CTF_WRITER_WRITER_INTERNAL_H
2 #define BABELTRACE_CTF_WRITER_WRITER_INTERNAL_H
5 * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
7 * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions:
16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28 #include <babeltrace2/ctf-writer/writer.h>
29 #include <babeltrace2/babeltrace-internal.h>
32 #include <sys/types.h>
33 #include <babeltrace2/ctf-writer/trace.h>
34 #include <babeltrace2/ctf-writer/object-internal.h>
36 struct metadata_context
{
39 unsigned int current_indentation_level
;
42 struct bt_ctf_writer
{
43 struct bt_ctf_object base
;
44 int frozen
; /* Protects attributes that can't be changed mid-trace */
45 struct bt_ctf_trace
*trace
;
50 enum field_type_alias
{
51 FIELD_TYPE_ALIAS_UINT5_T
= 0,
52 FIELD_TYPE_ALIAS_UINT8_T
,
53 FIELD_TYPE_ALIAS_UINT16_T
,
54 FIELD_TYPE_ALIAS_UINT27_T
,
55 FIELD_TYPE_ALIAS_UINT32_T
,
56 FIELD_TYPE_ALIAS_UINT64_T
,
61 struct bt_ctf_field_type
*get_field_type(enum field_type_alias alias
);
64 const char *bt_ctf_get_byte_order_string(enum bt_ctf_byte_order byte_order
);
67 void bt_ctf_writer_freeze(struct bt_ctf_writer
*writer
);
69 #endif /* BABELTRACE_CTF_WRITER_WRITER_INTERNAL_H */