2 * SPDX-License-Identifier: MIT
4 * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
7 #ifndef BABELTRACE2_CTF_WRITER_STREAM_CLASS_H
8 #define BABELTRACE2_CTF_WRITER_STREAM_CLASS_H
10 #include <babeltrace2-ctf-writer/object.h>
16 struct bt_ctf_stream_class
;
18 struct bt_ctf_event_class
;
19 struct bt_ctf_field_type
;
22 extern struct bt_ctf_stream_class
*bt_ctf_stream_class_create(
25 extern struct bt_ctf_trace
*bt_ctf_stream_class_get_trace(
26 struct bt_ctf_stream_class
*stream_class
);
28 extern const char *bt_ctf_stream_class_get_name(
29 struct bt_ctf_stream_class
*stream_class
);
31 extern int bt_ctf_stream_class_set_name(
32 struct bt_ctf_stream_class
*stream_class
, const char *name
);
34 extern int64_t bt_ctf_stream_class_get_id(
35 struct bt_ctf_stream_class
*stream_class
);
37 extern int bt_ctf_stream_class_set_id(
38 struct bt_ctf_stream_class
*stream_class
, uint64_t id
);
40 extern struct bt_ctf_field_type
*bt_ctf_stream_class_get_packet_context_type(
41 struct bt_ctf_stream_class
*stream_class
);
43 extern 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
);
47 extern struct bt_ctf_field_type
*
48 bt_ctf_stream_class_get_event_header_type(
49 struct bt_ctf_stream_class
*stream_class
);
51 extern 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
);
55 extern struct bt_ctf_field_type
*
56 bt_ctf_stream_class_get_event_context_type(
57 struct bt_ctf_stream_class
*stream_class
);
59 extern 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
);
63 extern int64_t bt_ctf_stream_class_get_event_class_count(
64 struct bt_ctf_stream_class
*stream_class
);
66 extern 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
);
69 extern 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
);
72 extern int bt_ctf_stream_class_add_event_class(
73 struct bt_ctf_stream_class
*stream_class
,
74 struct bt_ctf_event_class
*event_class
);
76 extern int bt_ctf_stream_class_set_clock(
77 struct bt_ctf_stream_class
*ctf_stream_class
,
78 struct bt_ctf_clock
*clock
);
80 extern struct bt_ctf_clock
*bt_ctf_stream_class_get_clock(
81 struct bt_ctf_stream_class
*stream_class
);
83 /* Pre-2.0 CTF writer compatibility */
85 void bt_ctf_stream_class_get(struct bt_ctf_stream_class
*stream_class
)
87 bt_ctf_object_get_ref(stream_class
);
90 /* Pre-2.0 CTF writer compatibility */
92 void bt_ctf_stream_class_put(struct bt_ctf_stream_class
*stream_class
)
94 bt_ctf_object_put_ref(stream_class
);
101 #endif /* BABELTRACE2_CTF_WRITER_STREAM_CLASS_H */
This page took 0.034058 seconds and 4 git commands to generate.