Move to kernel style SPDX license identifiers
[babeltrace.git] / src / plugins / lttng-utils / debug-info / trace-ir-mapping.h
index 514cc2d6231c218fa734f986072cb2b43a33077f..500201c1ef7ab6fb6b24afd77873079c235641b9 100644 (file)
@@ -1,27 +1,12 @@
-#ifndef BABELTRACE_PLUGIN_DEBUG_INFO_TRACE_IR_MAPPING_H
-#define BABELTRACE_PLUGIN_DEBUG_INFO_TRACE_IR_MAPPING_H
 /*
- * Copyright 2019 Francis Deslauriers francis.deslauriers@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
+ * SPDX-License-Identifier: MIT
  *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * Copyright 2019 Francis Deslauriers francis.deslauriers@efficios.com>
  */
 
+#ifndef BABELTRACE_PLUGIN_DEBUG_INFO_TRACE_IR_MAPPING_H
+#define BABELTRACE_PLUGIN_DEBUG_INFO_TRACE_IR_MAPPING_H
+
 #include <glib.h>
 
 #include "common/assert.h"
 
 #include "debug-info.h"
 
+enum debug_info_trace_ir_mapping_status {
+       DEBUG_INFO_TRACE_IR_MAPPING_STATUS_OK = 0,
+       DEBUG_INFO_TRACE_IR_MAPPING_STATUS_MEMORY_ERROR = -12,
+};
+
 /* Used to resolve field paths for dynamic arrays and variant field classes. */
 struct field_class_resolving_context {
        /* Weak reference. Owned by input stream class. */
@@ -44,6 +34,7 @@ struct field_class_resolving_context {
 
 struct trace_ir_metadata_maps {
        bt_logging_level log_level;
+       bt_self_component *self_comp;
        const bt_trace_class *input_trace_class;
        bt_trace_class *output_trace_class;
 
@@ -82,11 +73,12 @@ struct trace_ir_metadata_maps {
 
        struct field_class_resolving_context *fc_resolving_ctx;
 
-       uint64_t destruction_listener_id;
+       bt_listener_id destruction_listener_id;
 };
 
 struct trace_ir_data_maps {
        bt_logging_level log_level;
+       bt_self_component *self_comp;
        const bt_trace *input_trace;
        bt_trace *output_trace;
 
@@ -104,7 +96,7 @@ struct trace_ir_data_maps {
         */
        GHashTable *packet_map;
 
-       uint64_t destruction_listener_id;
+       bt_listener_id destruction_listener_id;
 };
 
 struct trace_ir_maps {
@@ -155,6 +147,16 @@ struct trace_ir_metadata_maps *trace_ir_metadata_maps_create(
 BT_HIDDEN
 void trace_ir_metadata_maps_destroy(struct trace_ir_metadata_maps *md_maps);
 
+BT_HIDDEN
+bt_stream_class *trace_ir_mapping_create_new_mapped_stream_class(
+               struct trace_ir_maps *ir_maps,
+               const bt_stream_class *in_stream_class);
+
+BT_HIDDEN
+bt_stream_class *trace_ir_mapping_borrow_mapped_stream_class(
+               struct trace_ir_maps *ir_maps,
+               const bt_stream_class *in_stream_class);
+
 BT_HIDDEN
 bt_stream *trace_ir_mapping_create_new_mapped_stream(
                struct trace_ir_maps *ir_maps,
This page took 0.024069 seconds and 4 git commands to generate.