Move to kernel style SPDX license identifiers
[babeltrace.git] / src / lib / graph / message / event.c
index 576257900dc62e3dd9db693c2b4508148d87817a..302d4b5a8e9748aa65de0e52500a114dbdb084ce 100644 (file)
@@ -1,24 +1,8 @@
 /*
+ * SPDX-License-Identifier: MIT
+ *
  * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@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.
- *
- * 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.
  */
 
 #define BT_LOG_TAG "LIB/MSG-EVENT"
@@ -36,8 +20,7 @@
 #include <babeltrace2/trace-ir/trace.h>
 #include "lib/trace-ir/clock-snapshot.h"
 #include "lib/graph/graph.h"
-#include <babeltrace2/graph/message-event-const.h>
-#include <babeltrace2/graph/message-event.h>
+#include <babeltrace2/graph/message.h>
 #include <babeltrace2/types.h>
 #include <stdbool.h>
 #include <inttypes.h>
@@ -85,7 +68,7 @@ struct bt_message *create_event_message(
                const struct bt_stream *c_stream, bool with_cs,
                uint64_t raw_value)
 {
-       struct bt_self_component_port_input_message_iterator *msg_iter =
+       struct bt_message_iterator *msg_iter =
                (void *) self_msg_iter;
        struct bt_message_event *message = NULL;
        struct bt_event_class *event_class = (void *) c_event_class;
@@ -177,6 +160,7 @@ struct bt_message *bt_message_event_create(
                const struct bt_event_class *event_class,
                const struct bt_stream *stream)
 {
+       BT_ASSERT_PRE_DEV_NO_ERROR();
        BT_ASSERT_PRE_NON_NULL(stream, "Stream");
        return create_event_message(msg_iter, event_class, NULL, stream, false, 0);
 }
@@ -186,6 +170,7 @@ struct bt_message *bt_message_event_create_with_packet(
                const struct bt_event_class *event_class,
                const struct bt_packet *packet)
 {
+       BT_ASSERT_PRE_DEV_NO_ERROR();
        BT_ASSERT_PRE_NON_NULL(packet, "Packet");
        return create_event_message(msg_iter, event_class, packet,
                packet->stream, false, 0);
@@ -197,6 +182,7 @@ struct bt_message *bt_message_event_create_with_default_clock_snapshot(
                const struct bt_stream *stream,
                uint64_t raw_value)
 {
+       BT_ASSERT_PRE_DEV_NO_ERROR();
        BT_ASSERT_PRE_NON_NULL(stream, "Stream");
        return create_event_message(msg_iter, event_class, NULL, stream,
                true, raw_value);
@@ -209,6 +195,7 @@ bt_message_event_create_with_packet_and_default_clock_snapshot(
                const struct bt_packet *packet,
                uint64_t raw_value)
 {
+       BT_ASSERT_PRE_DEV_NO_ERROR();
        BT_ASSERT_PRE_NON_NULL(packet, "Packet");
        return create_event_message(msg_iter, event_class, packet,
                packet->stream, true, raw_value);
This page took 0.024377 seconds and 4 git commands to generate.