Commit | Line | Data |
---|---|---|
44e0a4f5 | 1 | /* |
0235b0db MJ |
2 | * SPDX-License-Identifier: MIT |
3 | * | |
e2f7325d | 4 | * Copyright (c) 2015-2018 Philippe Proulx <pproulx@efficios.com> |
44e0a4f5 | 5 | * Copyright (c) 2015 EfficiOS Inc. and Linux Foundation |
44e0a4f5 JG |
6 | */ |
7 | ||
0235b0db MJ |
8 | #ifndef BABELTRACE_TRACE_IR_ATTRIBUTES_H |
9 | #define BABELTRACE_TRACE_IR_ATTRIBUTES_H | |
10 | ||
44e0a4f5 JG |
11 | #ifdef __cplusplus |
12 | extern "C" { | |
13 | #endif | |
14 | ||
dcf0cc71 | 15 | #include <stdint.h> |
91d81473 | 16 | #include "common/macros.h" |
3fadfbc0 | 17 | #include <babeltrace2/value.h> |
44e0a4f5 JG |
18 | |
19 | BT_HIDDEN | |
05e21286 | 20 | struct bt_value *bt_attributes_create(void); |
44e0a4f5 JG |
21 | |
22 | BT_HIDDEN | |
05e21286 | 23 | void bt_attributes_destroy(struct bt_value *attr_obj); |
44e0a4f5 JG |
24 | |
25 | BT_HIDDEN | |
99b4b64b | 26 | uint64_t bt_attributes_get_count(const struct bt_value *attr_obj); |
44e0a4f5 JG |
27 | |
28 | BT_HIDDEN | |
05e21286 | 29 | const char *bt_attributes_get_field_name(const struct bt_value *attr_obj, |
dcf0cc71 | 30 | uint64_t index); |
44e0a4f5 JG |
31 | |
32 | BT_HIDDEN | |
05e21286 PP |
33 | struct bt_value *bt_attributes_borrow_field_value( |
34 | struct bt_value *attr_obj, | |
dcf0cc71 | 35 | uint64_t index); |
44e0a4f5 JG |
36 | |
37 | BT_HIDDEN | |
05e21286 PP |
38 | int bt_attributes_set_field_value(struct bt_value *attr_obj, |
39 | const char *name, struct bt_value *value_obj); | |
44e0a4f5 JG |
40 | |
41 | BT_HIDDEN | |
05e21286 PP |
42 | struct bt_value *bt_attributes_borrow_field_value_by_name( |
43 | struct bt_value *attr_obj, const char *name); | |
44e0a4f5 JG |
44 | |
45 | BT_HIDDEN | |
05e21286 | 46 | int bt_attributes_freeze(const struct bt_value *attr_obj); |
44e0a4f5 JG |
47 | |
48 | #ifdef __cplusplus | |
49 | } | |
50 | #endif | |
51 | ||
56e18c4c | 52 | #endif /* BABELTRACE_TRACE_IR_ATTRIBUTES_H */ |