lib: add user attributes property to metadata, stream, and trace objects
[babeltrace.git] / include / babeltrace2 / trace-ir / event-class.h
CommitLineData
924dc299
PP
1#ifndef BABELTRACE2_TRACE_IR_EVENT_CLASS_H
2#define BABELTRACE2_TRACE_IR_EVENT_CLASS_H
56e18c4c
PP
3
4/*
bbb7b5f0 5 * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
56e18c4c 6 *
56e18c4c
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.
56e18c4c
PP
24 */
25
4fa90f32
PP
26#ifndef __BT_IN_BABELTRACE_H
27# error "Please include <babeltrace2/babeltrace.h> instead."
28#endif
29
d24d5663
PP
30#include <stdint.h>
31
3fadfbc0 32#include <babeltrace2/trace-ir/event-class-const.h>
3fadfbc0 33#include <babeltrace2/types.h>
b19ff26f 34
56e18c4c
PP
35#ifdef __cplusplus
36extern "C" {
37#endif
38
b19ff26f
PP
39extern bt_event_class *bt_event_class_create(
40 bt_stream_class *stream_class);
40f4ba76 41
b19ff26f
PP
42extern bt_event_class *bt_event_class_create_with_id(
43 bt_stream_class *stream_class, uint64_t id);
56e18c4c 44
c6962c96
PP
45extern bt_value *bt_event_class_borrow_user_attributes(
46 bt_event_class *event_class);
47
48extern void bt_event_class_set_user_attributes(
49 bt_event_class *event_class, const bt_value *user_attributes);
50
b19ff26f
PP
51extern bt_stream_class *bt_event_class_borrow_stream_class(
52 bt_event_class *event_class);
56e18c4c 53
d24d5663
PP
54typedef enum bt_event_class_set_name_status {
55 BT_EVENT_CLASS_SET_NAME_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
56 BT_EVENT_CLASS_SET_NAME_STATUS_OK = __BT_FUNC_STATUS_OK,
57} bt_event_class_set_name_status;
58
59extern bt_event_class_set_name_status bt_event_class_set_name(
d08300f5 60 bt_event_class *event_class, const char *name);
56e18c4c 61
4cdfc5e8
PP
62extern void bt_event_class_set_log_level(bt_event_class *event_class,
63 bt_event_class_log_level log_level);
56e18c4c 64
d24d5663
PP
65typedef enum bt_event_class_set_emf_uri_status {
66 BT_EVENT_CLASS_SET_EMF_URI_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
67 BT_EVENT_CLASS_SET_EMF_URI_STATUS_OK = __BT_FUNC_STATUS_OK,
68} bt_event_class_set_emf_uri_status;
69
70extern bt_event_class_set_emf_uri_status bt_event_class_set_emf_uri(
4cdfc5e8 71 bt_event_class *event_class, const char *emf_uri);
56e18c4c 72
d24d5663
PP
73typedef enum bt_event_class_set_field_class_status {
74 BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
75 BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_OK = __BT_FUNC_STATUS_OK,
76} bt_event_class_set_field_class_status;
77
78extern bt_event_class_set_field_class_status
d08300f5 79bt_event_class_set_specific_context_field_class(bt_event_class *event_class,
b19ff26f 80 bt_field_class *field_class);
56e18c4c 81
740faaf4
PP
82extern bt_field_class *
83bt_event_class_borrow_specific_context_field_class(bt_event_class *event_class);
84
d24d5663
PP
85extern bt_event_class_set_field_class_status
86bt_event_class_set_payload_field_class(
b19ff26f
PP
87 bt_event_class *event_class,
88 bt_field_class *field_class);
56e18c4c 89
740faaf4
PP
90extern bt_field_class *bt_event_class_borrow_payload_field_class(
91 bt_event_class *event_class);
92
56e18c4c
PP
93#ifdef __cplusplus
94}
95#endif
96
924dc299 97#endif /* BABELTRACE2_TRACE_IR_EVENT_CLASS_H */
This page took 0.042053 seconds and 4 git commands to generate.