Move to kernel style SPDX license identifiers
[babeltrace.git] / include / babeltrace2-ctf-writer / stream-class.h
... / ...
CommitLineData
1/*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
5 */
6
7#ifndef BABELTRACE2_CTF_WRITER_STREAM_CLASS_H
8#define BABELTRACE2_CTF_WRITER_STREAM_CLASS_H
9
10#include <babeltrace2-ctf-writer/object.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
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,
78 struct bt_ctf_clock *clock);
79
80extern struct bt_ctf_clock *bt_ctf_stream_class_get_clock(
81 struct bt_ctf_stream_class *stream_class);
82
83/* Pre-2.0 CTF writer compatibility */
84static inline
85void bt_ctf_stream_class_get(struct bt_ctf_stream_class *stream_class)
86{
87 bt_ctf_object_get_ref(stream_class);
88}
89
90/* Pre-2.0 CTF writer compatibility */
91static inline
92void bt_ctf_stream_class_put(struct bt_ctf_stream_class *stream_class)
93{
94 bt_ctf_object_put_ref(stream_class);
95}
96
97#ifdef __cplusplus
98}
99#endif
100
101#endif /* BABELTRACE2_CTF_WRITER_STREAM_CLASS_H */
This page took 0.0232 seconds and 4 git commands to generate.