tap-driver.sh: flush stdout after each test result
[babeltrace.git] / include / babeltrace2 / ctf-writer / writer-internal.h
1 #ifndef BABELTRACE_CTF_WRITER_WRITER_INTERNAL_H
2 #define BABELTRACE_CTF_WRITER_WRITER_INTERNAL_H
3
4 /*
5 * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
6 *
7 * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 *
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:
15 *
16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software.
18 *
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
25 * SOFTWARE.
26 */
27
28 #include <babeltrace2/ctf-writer/writer.h>
29 #include <babeltrace2/babeltrace-internal.h>
30 #include <glib.h>
31 #include <dirent.h>
32 #include <sys/types.h>
33 #include <babeltrace2/ctf-writer/trace.h>
34 #include <babeltrace2/ctf-writer/object-internal.h>
35
36 struct metadata_context {
37 GString *string;
38 GString *field_name;
39 unsigned int current_indentation_level;
40 };
41
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;
46 GString *path;
47 int metadata_fd;
48 };
49
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,
57 NR_FIELD_TYPE_ALIAS,
58 };
59
60 BT_HIDDEN
61 struct bt_ctf_field_type *get_field_type(enum field_type_alias alias);
62
63 BT_HIDDEN
64 const char *bt_ctf_get_byte_order_string(enum bt_ctf_byte_order byte_order);
65
66 BT_HIDDEN
67 void bt_ctf_writer_freeze(struct bt_ctf_writer *writer);
68
69 #endif /* BABELTRACE_CTF_WRITER_WRITER_INTERNAL_H */
This page took 0.029929 seconds and 4 git commands to generate.