b4487e00c1784baab24e26b16bb0b72db36dd18c
[babeltrace.git] / src / lib / trace-ir / attributes.h
1 /*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (c) 2015-2018 Philippe Proulx <pproulx@efficios.com>
5 * Copyright (c) 2015 EfficiOS Inc. and Linux Foundation
6 */
7
8 #ifndef BABELTRACE_TRACE_IR_ATTRIBUTES_H
9 #define BABELTRACE_TRACE_IR_ATTRIBUTES_H
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 #include <stdint.h>
16 #include "common/macros.h"
17 #include <babeltrace2/value.h>
18
19 BT_HIDDEN
20 struct bt_value *bt_attributes_create(void);
21
22 BT_HIDDEN
23 void bt_attributes_destroy(struct bt_value *attr_obj);
24
25 BT_HIDDEN
26 uint64_t bt_attributes_get_count(const struct bt_value *attr_obj);
27
28 BT_HIDDEN
29 const char *bt_attributes_get_field_name(const struct bt_value *attr_obj,
30 uint64_t index);
31
32 BT_HIDDEN
33 struct bt_value *bt_attributes_borrow_field_value(
34 struct bt_value *attr_obj,
35 uint64_t index);
36
37 BT_HIDDEN
38 int bt_attributes_set_field_value(struct bt_value *attr_obj,
39 const char *name, struct bt_value *value_obj);
40
41 BT_HIDDEN
42 struct bt_value *bt_attributes_borrow_field_value_by_name(
43 struct bt_value *attr_obj, const char *name);
44
45 BT_HIDDEN
46 int bt_attributes_freeze(const struct bt_value *attr_obj);
47
48 #ifdef __cplusplus
49 }
50 #endif
51
52 #endif /* BABELTRACE_TRACE_IR_ATTRIBUTES_H */
This page took 0.029377 seconds and 4 git commands to generate.