Move to kernel style SPDX license identifiers
[babeltrace.git] / include / babeltrace2-ctf-writer / stream-class.h
CommitLineData
cf6f1e34 1/*
0235b0db 2 * SPDX-License-Identifier: MIT
cf6f1e34 3 *
0235b0db 4 * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
cf6f1e34
JG
5 */
6
0235b0db
MJ
7#ifndef BABELTRACE2_CTF_WRITER_STREAM_CLASS_H
8#define BABELTRACE2_CTF_WRITER_STREAM_CLASS_H
9
217cf9d3 10#include <babeltrace2-ctf-writer/object.h>
8c18d80b
PP
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
3dca2276
PP
16struct bt_ctf_stream_class;
17struct bt_ctf_trace;
18struct bt_ctf_event_class;
19struct bt_ctf_field_type;
20struct bt_ctf_clock;
21
22extern struct bt_ctf_stream_class *bt_ctf_stream_class_create(
23 const char *name);
24
25extern struct bt_ctf_trace *bt_ctf_stream_class_get_trace(
26 struct bt_ctf_stream_class *stream_class);
27
28extern const char *bt_ctf_stream_class_get_name(
29 struct bt_ctf_stream_class *stream_class);
30
31extern int bt_ctf_stream_class_set_name(
32 struct bt_ctf_stream_class *stream_class, const char *name);
33
34extern int64_t bt_ctf_stream_class_get_id(
35 struct bt_ctf_stream_class *stream_class);
36
37extern int bt_ctf_stream_class_set_id(
38 struct bt_ctf_stream_class *stream_class, uint64_t id);
39
40extern struct bt_ctf_field_type *bt_ctf_stream_class_get_packet_context_type(
41 struct bt_ctf_stream_class *stream_class);
42
43extern int bt_ctf_stream_class_set_packet_context_type(
44 struct bt_ctf_stream_class *stream_class,
45 struct bt_ctf_field_type *packet_context_type);
46
47extern struct bt_ctf_field_type *
48bt_ctf_stream_class_get_event_header_type(
49 struct bt_ctf_stream_class *stream_class);
50
51extern int bt_ctf_stream_class_set_event_header_type(
52 struct bt_ctf_stream_class *stream_class,
53 struct bt_ctf_field_type *event_header_type);
54
55extern struct bt_ctf_field_type *
56bt_ctf_stream_class_get_event_context_type(
57 struct bt_ctf_stream_class *stream_class);
58
59extern int bt_ctf_stream_class_set_event_context_type(
60 struct bt_ctf_stream_class *stream_class,
61 struct bt_ctf_field_type *event_context_type);
62
63extern int64_t bt_ctf_stream_class_get_event_class_count(
64 struct bt_ctf_stream_class *stream_class);
65
66extern struct bt_ctf_event_class *bt_ctf_stream_class_get_event_class_by_index(
67 struct bt_ctf_stream_class *stream_class, uint64_t index);
68
69extern struct bt_ctf_event_class *bt_ctf_stream_class_get_event_class_by_id(
70 struct bt_ctf_stream_class *stream_class, uint64_t id);
71
72extern int bt_ctf_stream_class_add_event_class(
73 struct bt_ctf_stream_class *stream_class,
74 struct bt_ctf_event_class *event_class);
75
76extern int bt_ctf_stream_class_set_clock(
77 struct bt_ctf_stream_class *ctf_stream_class,
72bd645e
PP
78 struct bt_ctf_clock *clock);
79
3dca2276
PP
80extern struct bt_ctf_clock *bt_ctf_stream_class_get_clock(
81 struct bt_ctf_stream_class *stream_class);
50842bdc
PP
82
83/* Pre-2.0 CTF writer compatibility */
3dca2276
PP
84static inline
85void bt_ctf_stream_class_get(struct bt_ctf_stream_class *stream_class)
86{
e1e02a22 87 bt_ctf_object_get_ref(stream_class);
3dca2276 88}
ac0c6bdd 89
3dca2276
PP
90/* Pre-2.0 CTF writer compatibility */
91static inline
92void bt_ctf_stream_class_put(struct bt_ctf_stream_class *stream_class)
93{
e1e02a22 94 bt_ctf_object_put_ref(stream_class);
3dca2276 95}
8c18d80b
PP
96
97#ifdef __cplusplus
98}
99#endif
100
924dc299 101#endif /* BABELTRACE2_CTF_WRITER_STREAM_CLASS_H */
This page took 0.08187 seconds and 4 git commands to generate.