lib: rename bt_plugin_create_all_*() -> bt_plugin_find_all_*()
[babeltrace.git] / lib / graph / iterator.c
index 56b688046c5a746c4a33d663dc4b7b5af0f7de16..db774dfd298a6b13d7a6f79ad1807906b2be3e0e 100644 (file)
@@ -1,6 +1,6 @@
 /*
+ * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- * Copyright 2017 Philippe Proulx <pproulx@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
@@ -25,8 +25,7 @@
 #include <babeltrace/lib-logging-internal.h>
 
 #include <babeltrace/compiler-internal.h>
-#include <babeltrace/object.h>
-#include <babeltrace/trace-ir/fields.h>
+#include <babeltrace/trace-ir/field.h>
 #include <babeltrace/trace-ir/event-const.h>
 #include <babeltrace/trace-ir/event-internal.h>
 #include <babeltrace/trace-ir/packet-const.h>
@@ -471,14 +470,14 @@ void bt_notification_borrow_packet_stream(const struct bt_notification *notif,
                        bt_notification_event_borrow_event_const(notif));
                *stream = bt_packet_borrow_stream_const(*packet);
                break;
-       case BT_NOTIFICATION_TYPE_STREAM_BEGIN:
-               *stream = bt_notification_stream_begin_borrow_stream_const(notif);
+       case BT_NOTIFICATION_TYPE_STREAM_BEGINNING:
+               *stream = bt_notification_stream_beginning_borrow_stream_const(notif);
                break;
        case BT_NOTIFICATION_TYPE_STREAM_END:
                *stream = bt_notification_stream_end_borrow_stream_const(notif);
                break;
-       case BT_NOTIFICATION_TYPE_PACKET_BEGIN:
-               *packet = bt_notification_packet_begin_borrow_packet_const(notif);
+       case BT_NOTIFICATION_TYPE_PACKET_BEGINNING:
+               *packet = bt_notification_packet_beginning_borrow_packet_const(notif);
                *stream = bt_packet_borrow_stream_const(*packet);
                break;
        case BT_NOTIFICATION_TYPE_PACKET_END:
@@ -514,12 +513,12 @@ bool validate_notification(
        if (!stream_state) {
                /*
                 * No stream state for this stream: this notification
-                * MUST be a BT_NOTIFICATION_TYPE_STREAM_BEGIN notification
+                * MUST be a BT_NOTIFICATION_TYPE_STREAM_BEGINNING notification
                 * and its sequence number must be 0.
                 */
-               if (c_notif->type != BT_NOTIFICATION_TYPE_STREAM_BEGIN) {
+               if (c_notif->type != BT_NOTIFICATION_TYPE_STREAM_BEGINNING) {
                        BT_ASSERT_PRE_MSG("Unexpected notification: missing a "
-                               "BT_NOTIFICATION_TYPE_STREAM_BEGIN "
+                               "BT_NOTIFICATION_TYPE_STREAM_BEGINNING "
                                "notification prior to this notification: "
                                "%![stream-]+s", stream);
                        is_valid = false;
@@ -582,8 +581,8 @@ bool validate_notification(
        }
 
        switch (c_notif->type) {
-       case BT_NOTIFICATION_TYPE_STREAM_BEGIN:
-               BT_ASSERT_PRE_MSG("Unexpected BT_NOTIFICATION_TYPE_STREAM_BEGIN "
+       case BT_NOTIFICATION_TYPE_STREAM_BEGINNING:
+               BT_ASSERT_PRE_MSG("Unexpected BT_NOTIFICATION_TYPE_STREAM_BEGINNING "
                        "notification at this point: notif-seq-num=%" PRIu64 ", "
                        "%![stream-]+s", c_notif->seq_num, stream);
                is_valid = false;
@@ -602,9 +601,9 @@ bool validate_notification(
                stream_state->expected_notif_seq_num++;
                stream_state->is_ended = true;
                goto end;
-       case BT_NOTIFICATION_TYPE_PACKET_BEGIN:
+       case BT_NOTIFICATION_TYPE_PACKET_BEGINNING:
                if (stream_state->cur_packet) {
-                       BT_ASSERT_PRE_MSG("Unexpected BT_NOTIFICATION_TYPE_PACKET_BEGIN "
+                       BT_ASSERT_PRE_MSG("Unexpected BT_NOTIFICATION_TYPE_PACKET_BEGINNING "
                                "notification at this point: missing a "
                                "BT_NOTIFICATION_TYPE_PACKET_END notification "
                                "prior to this notification: "
@@ -622,7 +621,7 @@ bool validate_notification(
                if (!stream_state->cur_packet) {
                        BT_ASSERT_PRE_MSG("Unexpected BT_NOTIFICATION_TYPE_PACKET_END "
                                "notification at this point: missing a "
-                               "BT_NOTIFICATION_TYPE_PACKET_BEGIN notification "
+                               "BT_NOTIFICATION_TYPE_PACKET_BEGINNING notification "
                                "prior to this notification: "
                                "notif-seq-num=%" PRIu64 ", %![stream-]+s, "
                                "%![packet-]+a", c_notif->seq_num, stream,
@@ -1041,3 +1040,27 @@ end:
        bt_object_put_ref(colander_comp_cls);
        return (void *) iterator;
 }
+
+void bt_port_output_notification_iterator_get_ref(
+               const struct bt_port_output_notification_iterator *iterator)
+{
+       bt_object_get_ref(iterator);
+}
+
+void bt_port_output_notification_iterator_put_ref(
+               const struct bt_port_output_notification_iterator *iterator)
+{
+       bt_object_put_ref(iterator);
+}
+
+void bt_self_component_port_input_notification_iterator_get_ref(
+               const struct bt_self_component_port_input_notification_iterator *iterator)
+{
+       bt_object_get_ref(iterator);
+}
+
+void bt_self_component_port_input_notification_iterator_put_ref(
+               const struct bt_self_component_port_input_notification_iterator *iterator)
+{
+       bt_object_put_ref(iterator);
+}
This page took 0.025634 seconds and 4 git commands to generate.