lib: notification iterator: transfer a batch of notifications
[babeltrace.git] / tests / lib / test-plugin-plugins / sfs.c
index f3f4e1929bb01124fc6cdf606bc372f017963dd2..4d0357c604a76f81beae6108e4a9bb7c2f023e35 100644 (file)
@@ -19,7 +19,8 @@
 #include <babeltrace/graph/component-class.h>
 #include <babeltrace/values.h>
 #include <babeltrace/ref.h>
-#include <assert.h>
+#include <babeltrace/assert-internal.h>
+#include <babeltrace/assert-internal.h>
 
 static enum bt_component_status sink_consume(
                struct bt_private_component *private_component)
@@ -39,15 +40,12 @@ static void dummy_iterator_finalize_method(
 {
 }
 
-static struct bt_notification_iterator_next_method_return dummy_iterator_next_method(
-               struct bt_private_connection_private_notification_iterator *private_iterator)
+static enum bt_notification_iterator_status dummy_iterator_next_method(
+               struct bt_private_connection_private_notification_iterator *private_iterator,
+               bt_notification_array notifs, uint64_t capacity,
+               uint64_t *count)
 {
-       struct bt_notification_iterator_next_method_return next_return = {
-               .notification = NULL,
-               .status = BT_NOTIFICATION_ITERATOR_STATUS_OK,
-       };
-
-       return next_return;
+       return BT_NOTIFICATION_ITERATOR_STATUS_ERROR;
 }
 
 static struct bt_component_class_query_method_return query_method(
@@ -61,11 +59,11 @@ static struct bt_component_class_query_method_return query_method(
        };
        int iret;
 
-       assert(ret.result);
+       BT_ASSERT(ret.result);
        iret = bt_value_array_append_string(ret.result, object);
-       assert(iret == 0);
+       BT_ASSERT(iret == 0);
        iret = bt_value_array_append(ret.result, params);
-       assert(iret == 0);
+       BT_ASSERT(iret == 0);
        return ret;
 }
 
This page took 0.02528 seconds and 4 git commands to generate.