/*
- * Copyright 2019 Efficios, Inc.
+ * SPDX-License-Identifier: GPL-2.0-only
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; under version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Copyright (C) 2019 Efficios, Inc.
*/
/*
}
static
-bt_component_class_message_iterator_next_method_status hello_iter_next(
+bt_message_iterator_class_next_method_status hello_iter_next(
bt_self_message_iterator *message_iterator,
bt_message_array_const msgs, uint64_t capacity,
uint64_t *count)
{
BT_ASSERT(false);
- return BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_OK;
+ return BT_MESSAGE_ITERATOR_CLASS_NEXT_METHOD_STATUS_OK;
}
int main(int argc, char **argv)
{
bt_graph *graph;
+ bt_message_iterator_class *msg_iter_cls;
bt_component_class_source *source_cc;
bt_component_class_set_method_status set_method_status;
bt_graph_add_component_status add_component_status;
plan_tests(NR_TESTS);
- source_cc = bt_component_class_source_create("Hello", hello_iter_next);
+ msg_iter_cls = bt_message_iterator_class_create(hello_iter_next);
+ BT_ASSERT(msg_iter_cls);
+
+ source_cc = bt_component_class_source_create("Hello", msg_iter_cls);
BT_ASSERT(source_cc);
set_method_status = bt_component_class_source_set_initialize_method(
BT_LOGGING_LEVEL_WARNING, &source);
BT_ASSERT(add_component_status == BT_GRAPH_ADD_COMPONENT_STATUS_OK);
- bt_component_source_put_ref(source);
bt_component_class_source_put_ref(source_cc);
+ bt_message_iterator_class_put_ref(msg_iter_cls);
bt_graph_put_ref(graph);
return exit_status();