Commit | Line | Data |
---|---|---|
55478183 | 1 | /* |
0235b0db | 2 | * SPDX-License-Identifier: MIT |
55478183 | 3 | * |
0235b0db | 4 | * Copyright 2019 Philippe Proulx <pproulx@efficios.com> |
55478183 PP |
5 | */ |
6 | ||
0235b0db MJ |
7 | #ifndef BABELTRACE_PLUGINS_TEXT_DETAILS_OBJ_LIFETIME_MGMT_H |
8 | #define BABELTRACE_PLUGINS_TEXT_DETAILS_OBJ_LIFETIME_MGMT_H | |
9 | ||
55478183 PP |
10 | #include <glib.h> |
11 | #include <babeltrace2/babeltrace.h> | |
12 | #include <stdbool.h> | |
13 | ||
14 | #include "details.h" | |
15 | #include "write.h" | |
16 | ||
17 | /* | |
18 | * Returns whether or not stream class or event class `obj`, which | |
19 | * belongs to `tc`, needs to be written. | |
20 | */ | |
55478183 PP |
21 | bool details_need_to_write_meta_object(struct details_write_ctx *ctx, |
22 | const bt_trace_class *tc, const void *obj); | |
23 | ||
24 | /* | |
25 | * Marks stream class or event class `obj`, which belongs to `tc`, as | |
26 | * written. | |
27 | */ | |
55478183 PP |
28 | void details_did_write_meta_object(struct details_write_ctx *ctx, |
29 | const bt_trace_class *tc, const void *obj); | |
30 | ||
31 | /* | |
32 | * Returns whether or not trace class `tc` needs to be written. | |
33 | */ | |
55478183 PP |
34 | bool details_need_to_write_trace_class(struct details_write_ctx *ctx, |
35 | const bt_trace_class *tc); | |
36 | ||
37 | /* | |
38 | * Marks trace class `tc` as written. | |
39 | */ | |
55478183 PP |
40 | int details_did_write_trace_class(struct details_write_ctx *ctx, |
41 | const bt_trace_class *tc); | |
42 | ||
43 | /* | |
44 | * Writes the unique trace ID of `trace` to `*unique_id`, allocating a | |
45 | * new unique ID if none exists. | |
46 | */ | |
55478183 PP |
47 | int details_trace_unique_id(struct details_write_ctx *ctx, |
48 | const bt_trace *trace, uint64_t *unique_id); | |
49 | ||
50 | #endif /* BABELTRACE_PLUGINS_TEXT_DETAILS_OBJ_LIFETIME_MGMT_H */ |