Commit | Line | Data |
---|---|---|
3dca2276 | 1 | /* |
0235b0db | 2 | * SPDX-License-Identifier: MIT |
3dca2276 | 3 | * |
0235b0db | 4 | * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation |
3dca2276 PP |
5 | */ |
6 | ||
0235b0db MJ |
7 | #ifndef BABELTRACE2_CTF_WRITER_TRACE_H |
8 | #define BABELTRACE2_CTF_WRITER_TRACE_H | |
9 | ||
3dca2276 PP |
10 | #ifdef __cplusplus |
11 | extern "C" { | |
12 | #endif | |
13 | ||
14 | struct bt_ctf_trace; | |
15 | struct bt_ctf_stream_class; | |
16 | struct bt_ctf_stream; | |
3dca2276 PP |
17 | |
18 | extern enum bt_ctf_byte_order bt_ctf_trace_get_native_byte_order( | |
19 | struct bt_ctf_trace *trace); | |
20 | ||
21 | extern int bt_ctf_trace_set_native_byte_order(struct bt_ctf_trace *trace, | |
22 | enum bt_ctf_byte_order native_byte_order); | |
23 | ||
6162e6b7 | 24 | extern const uint8_t *bt_ctf_trace_get_uuid( |
3dca2276 PP |
25 | struct bt_ctf_trace *trace); |
26 | ||
27 | extern int bt_ctf_trace_set_uuid(struct bt_ctf_trace *trace, | |
6162e6b7 | 28 | const uint8_t *uuid); |
3dca2276 | 29 | |
3dca2276 PP |
30 | extern int bt_ctf_trace_set_environment_field_integer( |
31 | struct bt_ctf_trace *trace, const char *name, | |
32 | int64_t value); | |
33 | ||
34 | extern int bt_ctf_trace_set_environment_field_string( | |
35 | struct bt_ctf_trace *trace, const char *name, | |
36 | const char *value); | |
37 | ||
38 | extern struct bt_ctf_field_type *bt_ctf_trace_get_packet_header_field_type( | |
39 | struct bt_ctf_trace *trace); | |
40 | ||
41 | extern int bt_ctf_trace_set_packet_header_field_type(struct bt_ctf_trace *trace, | |
42 | struct bt_ctf_field_type *packet_header_type); | |
43 | ||
3dca2276 PP |
44 | extern int64_t bt_ctf_trace_get_stream_class_count( |
45 | struct bt_ctf_trace *trace); | |
46 | ||
47 | extern struct bt_ctf_stream_class *bt_ctf_trace_get_stream_class_by_index( | |
48 | struct bt_ctf_trace *trace, uint64_t index); | |
49 | ||
50 | extern struct bt_ctf_stream_class *bt_ctf_trace_get_stream_class_by_id( | |
51 | struct bt_ctf_trace *trace, uint64_t id); | |
52 | ||
53 | extern int bt_ctf_trace_add_stream_class(struct bt_ctf_trace *trace, | |
54 | struct bt_ctf_stream_class *stream_class); | |
55 | ||
56 | extern int64_t bt_ctf_trace_get_stream_count(struct bt_ctf_trace *trace); | |
57 | ||
58 | extern struct bt_ctf_stream *bt_ctf_trace_get_stream_by_index( | |
59 | struct bt_ctf_trace *trace, uint64_t index); | |
60 | ||
61 | extern const char *bt_ctf_trace_get_name(struct bt_ctf_trace *trace); | |
62 | ||
63 | #ifdef __cplusplus | |
64 | } | |
65 | #endif | |
66 | ||
924dc299 | 67 | #endif /* BABELTRACE2_CTF_WRITER_TRACE_H */ |