Move to kernel style SPDX license identifiers
[babeltrace.git] / src / ctf-writer / resolve.h
CommitLineData
16ca5ff0 1/*
0235b0db
MJ
2 * SPDX-License-Identifier: MIT
3 *
16ca5ff0
PP
4 * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
5 * Copyright 2016 Philippe Proulx <pproulx@efficios.com>
16ca5ff0
PP
6 */
7
0235b0db
MJ
8#ifndef BABELTRACE_CTF_WRITER_RESOLVE_INTERNAL_H
9#define BABELTRACE_CTF_WRITER_RESOLVE_INTERNAL_H
10
217cf9d3 11#include <babeltrace2-ctf-writer/field-types.h>
91d81473 12#include "common/macros.h"
16ca5ff0
PP
13#include <glib.h>
14
578e048b
MJ
15#include "field-types.h"
16#include "values.h"
17
16ca5ff0
PP
18enum bt_ctf_resolve_flag {
19 BT_CTF_RESOLVE_FLAG_PACKET_HEADER = 0x01,
20 BT_CTF_RESOLVE_FLAG_PACKET_CONTEXT = 0x02,
21 BT_CTF_RESOLVE_FLAG_EVENT_HEADER = 0x04,
22 BT_CTF_RESOLVE_FLAG_STREAM_EVENT_CTX = 0x08,
23 BT_CTF_RESOLVE_FLAG_EVENT_CONTEXT = 0x10,
24 BT_CTF_RESOLVE_FLAG_EVENT_PAYLOAD = 0x20,
25};
26
27/*
28 * Resolves CTF IR field types: recursively locates the tag and length
29 * field types of resp. variant and sequence field types.
30 *
31 * All `*_type` parameters may be resolved, and may as well serve as
32 * resolving targets.
33 *
34 * Resolving is performed based on the flags in `flags`.
35 *
36 * It is expected that, amongst all the provided types, no common
37 * references to sequence variant field types exist. In other words,
38 * this function does not copy field types.
39 *
40 * All parameters are owned by the caller.
41 */
42BT_HIDDEN
e1e02a22 43int bt_ctf_resolve_types(struct bt_ctf_private_value *environment,
16ca5ff0
PP
44 struct bt_ctf_field_type_common *packet_header_type,
45 struct bt_ctf_field_type_common *packet_context_type,
46 struct bt_ctf_field_type_common *event_header_type,
47 struct bt_ctf_field_type_common *stream_event_ctx_type,
48 struct bt_ctf_field_type_common *event_context_type,
49 struct bt_ctf_field_type_common *event_payload_type,
50 enum bt_ctf_resolve_flag flags);
51
52#endif /* BABELTRACE_CTF_WRITER_RESOLVE_INTERNAL_H */
This page took 0.059799 seconds and 4 git commands to generate.