tests/lib/test_trace_ir_ref.c: rename user structure
[babeltrace.git] / tests / lib / test_trace_ir_ref.c
index 1d565ebdef1c26b1f592d03bfd00863224786db9..3f31c6ac6a62d967e42cce096ddb95dc8587769c 100644 (file)
@@ -38,7 +38,7 @@
 
 #define NR_TESTS 37
 
-struct user {
+struct bt_user {
        bt_trace_class *tc;
        bt_stream_class *sc;
        bt_event_class *ec;
@@ -278,7 +278,7 @@ static void test_example_scenario(bt_self_component_source *self_comp)
        bt_stream_class *weak_sc1 = NULL, *weak_sc2 = NULL;
        bt_event_class *weak_ec1 = NULL, *weak_ec2 = NULL,
                        *weak_ec3 = NULL;
-       struct user user_a = { 0 }, user_b = { 0 }, user_c = { 0 };
+       struct bt_user user_a = { 0 }, user_b = { 0 }, user_c = { 0 };
 
        /* The only reference which exists at this point is on TC1. */
        tc1 = create_tc1(self_comp);
@@ -409,33 +409,37 @@ static void test_example_scenario(bt_self_component_source *self_comp)
 }
 
 static
-bt_component_class_init_method_status src_init(
+bt_component_class_initialize_method_status src_init(
        bt_self_component_source *self_comp,
        bt_self_component_source_configuration *config,
        const bt_value *params, void *init_method_data)
 {
        test_example_scenario(self_comp);
-       return BT_COMPONENT_CLASS_INIT_METHOD_STATUS_OK;
+       return BT_COMPONENT_CLASS_INITIALIZE_METHOD_STATUS_OK;
 }
 
 static
-bt_component_class_message_iterator_next_method_status src_iter_next(
+bt_message_iterator_class_next_method_status src_iter_next(
                bt_self_message_iterator *self_iterator,
                bt_message_array_const msgs, uint64_t capacity,
                uint64_t *count)
 {
-       return BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_ERROR;
+       return BT_MESSAGE_ITERATOR_CLASS_NEXT_METHOD_STATUS_ERROR;
 }
 
 static void test_example_scenario_in_graph(void)
 {
+       bt_message_iterator_class *msg_iter_cls;
        bt_component_class_source *comp_cls;
        bt_graph *graph;
        int ret;
 
-       comp_cls = bt_component_class_source_create("src", src_iter_next);
+       msg_iter_cls = bt_message_iterator_class_create(src_iter_next);
+       BT_ASSERT(msg_iter_cls);
+
+       comp_cls = bt_component_class_source_create("src", msg_iter_cls);
        BT_ASSERT(comp_cls);
-       ret = bt_component_class_source_set_init_method(comp_cls, src_init);
+       ret = bt_component_class_source_set_initialize_method(comp_cls, src_init);
        BT_ASSERT(ret == 0);
        graph = bt_graph_create(0);
        ret = bt_graph_add_source_component(graph, comp_cls, "src-comp",
@@ -443,6 +447,7 @@ static void test_example_scenario_in_graph(void)
        BT_ASSERT(ret == 0);
        bt_graph_put_ref(graph);
        bt_component_class_source_put_ref(comp_cls);
+       bt_message_iterator_class_put_ref(msg_iter_cls);
 }
 
 static void create_writer_user_full(struct writer_user *user)
This page took 0.027447 seconds and 4 git commands to generate.