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 | ||
ae2be88d SM |
8 | #ifndef BABELTRACE_LIB_TRACE_IR_ATTRIBUTES_H |
9 | #define BABELTRACE_LIB_TRACE_IR_ATTRIBUTES_H | |
0235b0db | 10 | |
44e0a4f5 JG |
11 | #ifdef __cplusplus |
12 | extern "C" { | |
13 | #endif | |
14 | ||
dcf0cc71 | 15 | #include <stdint.h> |
3fadfbc0 | 16 | #include <babeltrace2/value.h> |
44e0a4f5 | 17 | |
05e21286 | 18 | struct bt_value *bt_attributes_create(void); |
44e0a4f5 | 19 | |
05e21286 | 20 | void bt_attributes_destroy(struct bt_value *attr_obj); |
44e0a4f5 | 21 | |
99b4b64b | 22 | uint64_t bt_attributes_get_count(const struct bt_value *attr_obj); |
44e0a4f5 | 23 | |
05e21286 | 24 | const char *bt_attributes_get_field_name(const struct bt_value *attr_obj, |
dcf0cc71 | 25 | uint64_t index); |
44e0a4f5 | 26 | |
05e21286 PP |
27 | struct bt_value *bt_attributes_borrow_field_value( |
28 | struct bt_value *attr_obj, | |
dcf0cc71 | 29 | uint64_t index); |
44e0a4f5 | 30 | |
05e21286 PP |
31 | int bt_attributes_set_field_value(struct bt_value *attr_obj, |
32 | const char *name, struct bt_value *value_obj); | |
44e0a4f5 | 33 | |
05e21286 PP |
34 | struct bt_value *bt_attributes_borrow_field_value_by_name( |
35 | struct bt_value *attr_obj, const char *name); | |
44e0a4f5 | 36 | |
05e21286 | 37 | int bt_attributes_freeze(const struct bt_value *attr_obj); |
44e0a4f5 JG |
38 | |
39 | #ifdef __cplusplus | |
40 | } | |
41 | #endif | |
42 | ||
ae2be88d | 43 | #endif /* BABELTRACE_LIB_TRACE_IR_ATTRIBUTES_H */ |