*/
#include <babeltrace/ctf-ir/packet.h>
-#include <babeltrace/plugin/plugin-macros.h>
-#include <babeltrace/plugin/component.h>
-#include <babeltrace/plugin/sink.h>
-#include <babeltrace/plugin/notification/notification.h>
-#include <babeltrace/plugin/notification/iterator.h>
-#include <babeltrace/plugin/notification/event.h>
-#include <babeltrace/plugin/notification/packet.h>
+#include <babeltrace/plugin/plugin-dev.h>
+#include <babeltrace/component/component.h>
+#include <babeltrace/component/sink.h>
+#include <babeltrace/component/notification/notification.h>
+#include <babeltrace/component/notification/iterator.h>
+#include <babeltrace/component/notification/event.h>
+#include <babeltrace/component/notification/packet.h>
#include <stdio.h>
#include <stdbool.h>
#include <glib.h>
}
switch (bt_notification_get_type(notification)) {
- case BT_NOTIFICATION_TYPE_PACKET_START:
+ case BT_NOTIFICATION_TYPE_PACKET_BEGIN:
{
struct bt_ctf_packet *packet =
- bt_notification_packet_start_get_packet(notification);
+ bt_notification_packet_begin_get_packet(notification);
if (!packet) {
ret = BT_COMPONENT_STATUS_ERROR;
case BT_NOTIFICATION_TYPE_PACKET_END:
{
struct bt_ctf_packet *packet =
- bt_notification_packet_start_get_packet(notification);
+ bt_notification_packet_end_get_packet(notification);
if (!packet) {
ret = BT_COMPONENT_STATUS_ERROR;
}
/* Initialize plug-in entry points. */
-BT_PLUGIN_NAME("writer");
+BT_PLUGIN(writer);
BT_PLUGIN_DESCRIPTION("Babeltrace CTF-Writer output plug-in.");
BT_PLUGIN_AUTHOR("Jérémie Galarneau");
BT_PLUGIN_LICENSE("MIT");
-
-BT_PLUGIN_COMPONENT_CLASSES_BEGIN
-BT_PLUGIN_SINK_COMPONENT_CLASS_ENTRY("writer",
- "Formats CTF-IR to CTF.",
- writer_component_init)
-BT_PLUGIN_COMPONENT_CLASSES_END
+BT_PLUGIN_COMPONENT_CLASS(BT_COMPONENT_TYPE_SINK, writer,
+ writer_component_init);
+BT_PLUGIN_COMPONENT_CLASS_DESCRIPTION(BT_COMPONENT_TYPE_SINK, writer,
+ "Formats CTF-IR to CTF.");