Move to kernel style SPDX license identifiers
[babeltrace.git] / src / plugins / text / details / obj-lifetime-mgmt.h
CommitLineData
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 */
21BT_HIDDEN
22bool details_need_to_write_meta_object(struct details_write_ctx *ctx,
23 const bt_trace_class *tc, const void *obj);
24
25/*
26 * Marks stream class or event class `obj`, which belongs to `tc`, as
27 * written.
28 */
29BT_HIDDEN
30void details_did_write_meta_object(struct details_write_ctx *ctx,
31 const bt_trace_class *tc, const void *obj);
32
33/*
34 * Returns whether or not trace class `tc` needs to be written.
35 */
36BT_HIDDEN
37bool details_need_to_write_trace_class(struct details_write_ctx *ctx,
38 const bt_trace_class *tc);
39
40/*
41 * Marks trace class `tc` as written.
42 */
43BT_HIDDEN
44int details_did_write_trace_class(struct details_write_ctx *ctx,
45 const bt_trace_class *tc);
46
47/*
48 * Writes the unique trace ID of `trace` to `*unique_id`, allocating a
49 * new unique ID if none exists.
50 */
51BT_HIDDEN
52int details_trace_unique_id(struct details_write_ctx *ctx,
53 const bt_trace *trace, uint64_t *unique_id);
54
55#endif /* BABELTRACE_PLUGINS_TEXT_DETAILS_OBJ_LIFETIME_MGMT_H */
This page took 0.047947 seconds and 4 git commands to generate.