lib: trace-class.c: use `LIB/TRACE-CLASS` logging tag
[babeltrace.git] / include / babeltrace2 / trace-ir / stream-class.h
CommitLineData
3fd40f46
PP
1#ifndef BABELTRACE2_TRACE_IR_STREAM_CLASS_H
2#define BABELTRACE2_TRACE_IR_STREAM_CLASS_H
108b91d0
PP
3
4/*
0dcb770f 5 * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
108b91d0 6 *
108b91d0
PP
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * SOFTWARE.
108b91d0
PP
24 */
25
9df34b44
PP
26#ifndef __BT_IN_BABELTRACE_H
27# error "Please include <babeltrace2/babeltrace.h> instead."
28#endif
29
108b91d0
PP
30#include <stdint.h>
31
71c5da58 32#include <babeltrace2/types.h>
108b91d0
PP
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
8eee8ea2
PP
38extern bt_stream_class *bt_stream_class_create(
39 bt_trace_class *trace_class);
108b91d0 40
8eee8ea2
PP
41extern bt_stream_class *bt_stream_class_create_with_id(
42 bt_trace_class *trace_class, uint64_t id);
108b91d0 43
8eee8ea2
PP
44extern bt_trace_class *bt_stream_class_borrow_trace_class(
45 bt_stream_class *stream_class);
108b91d0 46
fb25b9e3
PP
47typedef enum bt_stream_class_set_name_status {
48 BT_STREAM_CLASS_SET_NAME_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
49 BT_STREAM_CLASS_SET_NAME_STATUS_OK = __BT_FUNC_STATUS_OK,
50} bt_stream_class_set_name_status;
51
52extern bt_stream_class_set_name_status bt_stream_class_set_name(
36a28778 53 bt_stream_class *stream_class, const char *name);
108b91d0 54
78cf9df6 55extern void bt_stream_class_set_assigns_automatic_event_class_id(
8eee8ea2 56 bt_stream_class *stream_class, bt_bool value);
108b91d0 57
78cf9df6 58extern void bt_stream_class_set_assigns_automatic_stream_id(
8eee8ea2 59 bt_stream_class *stream_class, bt_bool value);
108b91d0 60
77037b2b
PP
61extern void bt_stream_class_set_supports_discarded_events(
62 bt_stream_class *stream_class,
63 bt_bool supports_discarded_events,
64 bt_bool with_default_clock_snapshots);
65
66extern void bt_stream_class_set_supports_discarded_packets(
67 bt_stream_class *stream_class,
68 bt_bool supports_discarded_packets,
69 bt_bool with_default_clock_snapshots);
70
fb25b9e3
PP
71typedef enum bt_stream_class_set_field_class_status {
72 BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
73 BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_OK = __BT_FUNC_STATUS_OK,
74} bt_stream_class_set_field_class_status;
75
37a93d41
PP
76extern void bt_stream_class_set_supports_packets(
77 bt_stream_class *stream_class, bt_bool supports_packets,
78 bt_bool with_beginning_default_clock_snapshot,
79 bt_bool with_end_default_clock_snapshot);
80
fb25b9e3 81extern bt_stream_class_set_field_class_status
36a28778 82bt_stream_class_set_packet_context_field_class(
8eee8ea2
PP
83 bt_stream_class *stream_class,
84 bt_field_class *field_class);
108b91d0 85
909d0a89
PP
86extern bt_field_class *
87bt_stream_class_borrow_packet_context_field_class(
88 bt_stream_class *stream_class);
89
fb25b9e3 90extern bt_stream_class_set_field_class_status
78cf9df6 91bt_stream_class_set_event_common_context_field_class(
8eee8ea2
PP
92 bt_stream_class *stream_class,
93 bt_field_class *field_class);
108b91d0 94
909d0a89
PP
95extern bt_field_class *
96bt_stream_class_borrow_event_common_context_field_class(
97 bt_stream_class *stream_class);
98
8eee8ea2 99extern bt_event_class *
78cf9df6 100bt_stream_class_borrow_event_class_by_index(
8eee8ea2 101 bt_stream_class *stream_class, uint64_t index);
108b91d0 102
8eee8ea2 103extern bt_event_class *
78cf9df6 104bt_stream_class_borrow_event_class_by_id(
8eee8ea2 105 bt_stream_class *stream_class, uint64_t id);
108b91d0 106
8eee8ea2
PP
107extern bt_clock_class *bt_stream_class_borrow_default_clock_class(
108 bt_stream_class *stream_class);
108b91d0 109
fb25b9e3
PP
110typedef enum bt_stream_class_set_default_clock_class_status {
111 BT_STREAM_CLASS_SET_DEFAULT_CLOCK_CLASS_STATUS_OK = __BT_FUNC_STATUS_OK,
112} bt_stream_class_set_default_clock_class_status;
113
114extern bt_stream_class_set_default_clock_class_status
115bt_stream_class_set_default_clock_class(
8eee8ea2
PP
116 bt_stream_class *stream_class,
117 bt_clock_class *clock_class);
108b91d0 118
108b91d0
PP
119#ifdef __cplusplus
120}
121#endif
122
3fd40f46 123#endif /* BABELTRACE2_TRACE_IR_STREAM_CLASS_H */
This page took 0.046055 seconds and 4 git commands to generate.