Cleanup: remove private babeltrace.h
[babeltrace.git] / src / ctf-writer / writer.h
CommitLineData
273b65be
JG
1#ifndef BABELTRACE_CTF_WRITER_WRITER_INTERNAL_H
2#define BABELTRACE_CTF_WRITER_WRITER_INTERNAL_H
3
4/*
de9dd397 5 * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
273b65be
JG
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
273b65be 28#include <dirent.h>
578e048b 29#include <glib.h>
273b65be 30#include <sys/types.h>
578e048b 31
3fadfbc0 32#include <babeltrace2/ctf-writer/trace.h>
578e048b
MJ
33#include <babeltrace2/ctf-writer/writer.h>
34
91d81473 35#include "common/macros.h"
578e048b
MJ
36
37#include "object.h"
273b65be 38
3dca2276
PP
39struct metadata_context {
40 GString *string;
41 GString *field_name;
42 unsigned int current_indentation_level;
43};
44
273b65be 45struct bt_ctf_writer {
e1e02a22 46 struct bt_ctf_object base;
273b65be 47 int frozen; /* Protects attributes that can't be changed mid-trace */
3dca2276 48 struct bt_ctf_trace *trace;
273b65be 49 GString *path;
273b65be 50 int metadata_fd;
273b65be
JG
51};
52
3dca2276
PP
53enum field_type_alias {
54 FIELD_TYPE_ALIAS_UINT5_T = 0,
55 FIELD_TYPE_ALIAS_UINT8_T,
56 FIELD_TYPE_ALIAS_UINT16_T,
57 FIELD_TYPE_ALIAS_UINT27_T,
58 FIELD_TYPE_ALIAS_UINT32_T,
59 FIELD_TYPE_ALIAS_UINT64_T,
60 NR_FIELD_TYPE_ALIAS,
61};
62
63BT_HIDDEN
64struct bt_ctf_field_type *get_field_type(enum field_type_alias alias);
65
66BT_HIDDEN
16ca5ff0 67const char *bt_ctf_get_byte_order_string(enum bt_ctf_byte_order byte_order);
3dca2276 68
319fd969
PP
69BT_HIDDEN
70void bt_ctf_writer_freeze(struct bt_ctf_writer *writer);
71
273b65be 72#endif /* BABELTRACE_CTF_WRITER_WRITER_INTERNAL_H */
This page took 0.060736 seconds and 4 git commands to generate.