X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace2%2Fplugin%2Fplugin-dev.h;h=85c3ef7f52a6e7f3ac7cb9ae01a63ad5ef7ca421;hb=2e1b56154a3032b52687751ed2e5c1a8a5134f7c;hp=5f7d2826917ac49ffcc0b4f45cd4c7fe6c6171ad;hpb=3fadfbc0c91f82c46bd36e6e0657ea93570c9db1;p=babeltrace.git diff --git a/include/babeltrace2/plugin/plugin-dev.h b/include/babeltrace2/plugin/plugin-dev.h index 5f7d2826..85c3ef7f 100644 --- a/include/babeltrace2/plugin/plugin-dev.h +++ b/include/babeltrace2/plugin/plugin-dev.h @@ -1,12 +1,8 @@ -#ifndef BABELTRACE_PLUGIN_PLUGIN_DEV_H -#define BABELTRACE_PLUGIN_PLUGIN_DEV_H +#ifndef BABELTRACE2_PLUGIN_PLUGIN_DEV_H +#define BABELTRACE2_PLUGIN_PLUGIN_DEV_H /* - * This is the header that you need to include for the development of - * a Babeltrace plug-in. - * - * Copyright 2017-2018 Philippe Proulx - * Copyright 2015 Jérémie Galarneau + * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -27,18 +23,17 @@ * SOFTWARE. */ -#include +#ifndef __BT_IN_BABELTRACE_H +# error "Please include instead." +#endif -/* For enum bt_plugin_status */ -#include +#include -/* For bt_component_class_type */ #include - -/* For component class method type definitions */ #include #include #include +#include /* * _BT_HIDDEN: set the hidden attribute for internal functions @@ -63,19 +58,17 @@ extern "C" { #define __BT_PLUGIN_VERSION_MINOR 0 /* Plugin initialization function type */ -typedef enum bt_self_plugin_status { - BT_SELF_PLUGIN_STATUS_OK = 0, - BT_SELF_PLUGIN_STATUS_NOMEM = -12, - BT_SELF_PLUGIN_STATUS_ERROR = -1, -} bt_self_plugin_status; - -typedef struct bt_self_plugin bt_self_plugin; +typedef enum bt_plugin_initialize_func_status { + BT_PLUGIN_INITIALIZE_FUNC_STATUS_OK = __BT_FUNC_STATUS_OK, + BT_PLUGIN_INITIALIZE_FUNC_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR, + BT_PLUGIN_INITIALIZE_FUNC_STATUS_ERROR = __BT_FUNC_STATUS_ERROR, +} bt_plugin_initialize_func_status; -typedef bt_self_plugin_status (*bt_plugin_init_func)( +typedef bt_plugin_initialize_func_status (*bt_plugin_initialize_func)( bt_self_plugin *plugin); /* Plugin exit function type */ -typedef void (*bt_plugin_exit_func)(void); +typedef void (*bt_plugin_finalize_func)(void); /* Plugin descriptor: describes a single plugin (internal use) */ struct __bt_plugin_descriptor { @@ -121,10 +114,10 @@ struct __bt_plugin_descriptor_attribute { /* Attribute's value (depends on attribute's type) */ union { /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT */ - bt_plugin_init_func init; + bt_plugin_initialize_func init; /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT */ - bt_plugin_exit_func exit; + bt_plugin_finalize_func exit; /* BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_AUTHOR */ const char *author; @@ -177,20 +170,19 @@ struct __bt_plugin_component_class_descriptor { enum __bt_plugin_component_class_descriptor_attribute_type { BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_DESCRIPTION = 0, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP = 1, - BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD = 2, - BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD = 3, - BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD = 4, - BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD = 5, - BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD = 6, - BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD = 7, - BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD = 8, - BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD = 9, - BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD = 10, - BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD = 11, - BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD = 12, - BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD = 13, - BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD = 14, - BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD = 15, + BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD = 2, + BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD = 3, + BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD = 4, + BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD = 5, + BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD = 6, + BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_OUTPUT_PORT_CONNECTED_METHOD = 7, + BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD = 8, + BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD = 9, + BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD = 10, + BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD = 11, + BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD = 12, + BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD = 13, + BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD = 14, }; /* Component class attribute (internal use) */ @@ -215,10 +207,15 @@ struct __bt_plugin_component_class_descriptor_attribute { /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_HELP */ const char *help; - /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD */ - bt_component_class_source_init_method source_init_method; - bt_component_class_filter_init_method filter_init_method; - bt_component_class_sink_init_method sink_init_method; + /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS_METHOD */ + bt_component_class_source_get_supported_mip_versions_method source_get_supported_mip_versions_method; + bt_component_class_filter_get_supported_mip_versions_method filter_get_supported_mip_versions_method; + bt_component_class_sink_get_supported_mip_versions_method sink_get_supported_mip_versions_method; + + /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD */ + bt_component_class_source_initialize_method source_initialize_method; + bt_component_class_filter_initialize_method filter_initialize_method; + bt_component_class_sink_initialize_method sink_initialize_method; /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD */ bt_component_class_source_finalize_method source_finalize_method; @@ -230,14 +227,6 @@ struct __bt_plugin_component_class_descriptor_attribute { bt_component_class_filter_query_method filter_query_method; bt_component_class_sink_query_method sink_query_method; - /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD */ - bt_component_class_filter_accept_input_port_connection_method filter_accept_input_port_connection_method; - bt_component_class_sink_accept_input_port_connection_method sink_accept_input_port_connection_method; - - /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD */ - bt_component_class_source_accept_output_port_connection_method source_accept_output_port_connection_method; - bt_component_class_filter_accept_output_port_connection_method filter_accept_output_port_connection_method; - /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INPUT_PORT_CONNECTED_METHOD */ bt_component_class_filter_input_port_connected_method filter_input_port_connected_method; bt_component_class_sink_input_port_connected_method sink_input_port_connected_method; @@ -249,9 +238,9 @@ struct __bt_plugin_component_class_descriptor_attribute { /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GRAPH_IS_CONFIGURED_METHOD */ bt_component_class_sink_graph_is_configured_method sink_graph_is_configured_method; - /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD */ - bt_component_class_source_message_iterator_init_method source_msg_iter_init_method; - bt_component_class_filter_message_iterator_init_method filter_msg_iter_init_method; + /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD */ + bt_component_class_source_message_iterator_initialize_method source_msg_iter_initialize_method; + bt_component_class_filter_message_iterator_initialize_method filter_msg_iter_initialize_method; /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD */ bt_component_class_source_message_iterator_finalize_method source_msg_iter_finalize_method; @@ -463,7 +452,7 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ .type_name = #_attr_name, \ .type = _attr_type, \ - .value._attr_name = _x, \ + .value = { ._attr_name = _x }, \ }; \ static struct __bt_plugin_descriptor_attribute const * const __bt_plugin_descriptor_attribute_##_id##_##_attr_name##_ptr __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS = &__bt_plugin_descriptor_attribute_##_id##_##_attr_name @@ -472,9 +461,9 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ * specific plugin descriptor. * * _id: Plugin descriptor ID (C identifier). - * _x: Initialization function (bt_plugin_init_func). + * _x: Initialization function (bt_plugin_initialize_func). */ -#define BT_PLUGIN_INIT_WITH_ID(_id, _x) \ +#define BT_PLUGIN_INITIALIZE_WITH_ID(_id, _x) \ __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(init, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_INIT, _id, _x) /* @@ -482,9 +471,9 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ * plugin descriptor. * * _id: Plugin descriptor ID (C identifier). - * _x: Exit function (bt_plugin_exit_func). + * _x: Exit function (bt_plugin_finalize_func). */ -#define BT_PLUGIN_EXIT_WITH_ID(_id, _x) \ +#define BT_PLUGIN_FINALIZE_WITH_ID(_id, _x) \ __BT_PLUGIN_DESCRIPTOR_ATTRIBUTE(exit, BT_PLUGIN_DESCRIPTOR_ATTRIBUTE_TYPE_EXIT, _id, _x) /* @@ -541,13 +530,11 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ */ #define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \ static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \ - .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ - .name = _name, \ - .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \ - .methods.source = { \ - .msg_iter_next = _msg_iter_next_method, \ - }, \ - }; \ + .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ + .name = _name, \ + .type = BT_COMPONENT_CLASS_TYPE_SOURCE, \ + .methods = { .source = { .msg_iter_next = _msg_iter_next_method } }, \ + }; \ static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = &__bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id /* @@ -561,13 +548,11 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ */ #define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _msg_iter_next_method) \ static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \ - .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ - .name = _name, \ - .type = BT_COMPONENT_CLASS_TYPE_FILTER, \ - .methods.filter = { \ - .msg_iter_next = _msg_iter_next_method, \ - }, \ - }; \ + .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ + .name = _name, \ + .type = BT_COMPONENT_CLASS_TYPE_FILTER, \ + .methods = { .filter = { .msg_iter_next = _msg_iter_next_method } }, \ + }; \ static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = &__bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id /* @@ -584,9 +569,7 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ .plugin_descriptor = &__bt_plugin_descriptor_##_id, \ .name = _name, \ .type = BT_COMPONENT_CLASS_TYPE_SINK, \ - .methods.sink = { \ - .consume = _consume_method, \ - }, \ + .methods = { .sink = { .consume = _consume_method } }, \ }; \ static struct __bt_plugin_component_class_descriptor const * const __bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS = &__bt_plugin_sink_component_class_descriptor_##_id##_##_comp_class_id @@ -607,7 +590,7 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ .comp_class_descriptor = &__bt_plugin_##_type##_component_class_descriptor_##_id##_##_comp_class_id, \ .type_name = #_attr_name, \ .type = _attr_type, \ - .value._attr_name = _x, \ + .value = { ._attr_name = _x }, \ }; \ static struct __bt_plugin_component_class_descriptor_attribute const * const __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS = &__bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_comp_class_id##_##_attr_name @@ -683,10 +666,10 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ * * _id: Plugin descriptor ID (C identifier). * _comp_class_id: Component class descriptor ID (C identifier). - * _x: Initialization method (bt_component_class_source_init_method). + * _x: Initialization method (bt_component_class_source_initialize_method). */ -#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ - __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, source, _x) +#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ + __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_initialize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD, _id, _comp_class_id, source, _x) /* * Defines an initialization method attribute attached to a specific @@ -694,10 +677,10 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ * * _id: Plugin descriptor ID (C identifier). * _comp_class_id: Component class descriptor ID (C identifier). - * _x: Initialization method (bt_component_class_filter_init_method). + * _x: Initialization method (bt_component_class_filter_initialize_method). */ -#define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ - __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, filter, _x) +#define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ + __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_initialize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD, _id, _comp_class_id, filter, _x) /* * Defines an initialization method attribute attached to a specific @@ -705,10 +688,43 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ * * _id: Plugin descriptor ID (C identifier). * _comp_class_id: Component class descriptor ID (C identifier). - * _x: Initialization method (bt_component_class_sink_init_method). + * _x: Initialization method (bt_component_class_sink_initialize_method). + */ +#define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ + __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_initialize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INITIALIZE_METHOD, _id, _comp_class_id, sink, _x) + +/* + * Defines a "get supported MIP versions" attribute attached to a + * specific source component class descriptor. + * + * _id: Plugin descriptor ID (C identifier). + * _comp_class_id: Component class descriptor ID (C identifier). + * _x: "Get supported MIP versions" method (bt_component_class_source_get_supported_mip_versions_method). */ -#define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ - __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_INIT_METHOD, _id, _comp_class_id, sink, _x) +#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_WITH_ID(_id, _comp_class_id, _x) \ + __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS, _id, _comp_class_id, source, _x) + +/* + * Defines a "get supported MIP versions" attribute attached to a + * specific filter component class descriptor. + * + * _id: Plugin descriptor ID (C identifier). + * _comp_class_id: Component class descriptor ID (C identifier). + * _x: "Get supported MIP versions" method (bt_component_class_filter_get_supported_mip_versions_method). + */ +#define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_WITH_ID(_id, _comp_class_id, _x) \ + __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS, _id, _comp_class_id, filter, _x) + +/* + * Defines a "get supported MIP versions" attribute attached to a + * specific sink component class descriptor. + * + * _id: Plugin descriptor ID (C identifier). + * _comp_class_id: Component class descriptor ID (C identifier). + * _x: "Get supported MIP versions" method (bt_component_class_sink_get_supported_mip_versions_method). + */ +#define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_WITH_ID(_id, _comp_class_id, _x) \ + __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_get_supported_mip_versions_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_GET_SUPPORTED_MIP_VERSIONS, _id, _comp_class_id, sink, _x) /* * Defines a finalization method attribute attached to a specific source @@ -776,54 +792,6 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(_id, _comp_class_id, _x) \ __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_query_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD, _id, _comp_class_id, sink, _x) -/* - * Defines an accept input port connection method attribute attached to - * a specific filter component class descriptor. - * - * _id: Plugin descriptor ID (C identifier). - * _comp_class_id: Component class descriptor ID (C identifier). - * _x: Accept port connection method - * (bt_component_class_filter_accept_input_port_connection_method). - */ -#define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \ - __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_accept_input_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD, _id, _comp_class_id, filter, _x) - -/* - * Defines an accept input port connection method attribute attached to - * a specific sink component class descriptor. - * - * _id: Plugin descriptor ID (C identifier). - * _comp_class_id: Component class descriptor ID (C identifier). - * _x: Accept port connection method - * (bt_component_class_sink_accept_input_port_connection_method). - */ -#define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \ - __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(sink_accept_input_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_INPUT_PORT_CONNECTION_METHOD, _id, _comp_class_id, sink, _x) - -/* - * Defines an accept output port connection method attribute attached to - * a specific source component class descriptor. - * - * _id: Plugin descriptor ID (C identifier). - * _comp_class_id: Component class descriptor ID (C identifier). - * _x: Accept port connection method - * (bt_component_class_source_accept_output_port_connection_method). - */ -#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \ - __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_accept_output_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD, _id, _comp_class_id, source, _x) - -/* - * Defines an accept output port connection method attribute attached to - * a specific filter component class descriptor. - * - * _id: Plugin descriptor ID (C identifier). - * _comp_class_id: Component class descriptor ID (C identifier). - * _x: Accept port connection method - * (bt_component_class_filter_accept_output_port_connection_method). - */ -#define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \ - __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_accept_output_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD, _id, _comp_class_id, filter, _x) - /* * Defines an input port connected method attribute attached to a * specific filter component class descriptor. @@ -891,10 +859,10 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ * _id: Plugin descriptor ID (C identifier). * _comp_class_id: Component class descriptor ID (C identifier). * _x: Iterator initialization method - * (bt_component_class_source_message_iterator_init_method). + * (bt_component_class_source_message_iterator_initialize_method). */ -#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ - __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD, _id, _comp_class_id, source, _x) +#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INITIALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ + __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_initialize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD, _id, _comp_class_id, source, _x) /* * Defines an iterator finalize method attribute attached to a specific @@ -909,52 +877,35 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD, _id, _comp_class_id, source, _x) /* - * Defines an iterator "seek nanoseconds from origin" method attribute - * attached to a specific source component class descriptor. - * - * _id: Plugin descriptor ID (C identifier). - * _comp_class_id: Component class descriptor ID (C identifier). - * _x: Iterator "seek nanoseconds from origin" method - * (bt_component_class_source_message_iterator_seek_ns_from_origin_method). - */ -#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \ - __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, source, _x) - -/* - * Defines an iterator "seek beginning" method attribute attached to a - * specific source component class descriptor. + * Defines an iterator "seek nanoseconds from origin" and "can seek nanoseconds + * from origin" method attributes attached to a specific source component class + * descriptor. * - * _id: Plugin descriptor ID (C identifier). - * _comp_class_id: Component class descriptor ID (C identifier). - * _x: Iterator "seek beginning" method - * (bt_component_class_source_message_iterator_seek_beginning_method). + * _id: Plugin descriptor ID (C identifier). + * _comp_class_id: Component class descriptor ID (C identifier). + * _seek_method: Iterator "seek nanoseconds from origin" method + * (bt_component_class_source_message_iterator_seek_ns_from_origin_method). + * _can_seek_method: Iterator "can seek nanoseconds from origin" method + * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method). */ -#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \ - __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD, _id, _comp_class_id, source, _x) +#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(_id, _comp_class_id, _seek_method, _can_seek_method) \ + __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, source, _seek_method); \ + __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_can_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, source, _can_seek_method) /* - * Defines an iterator "can seek nanoseconds from origin" method - * attribute attached to a specific source component class descriptor. + * Defines an iterator "seek beginning" and "can seek beginning" method + * attributes attached to a specific source component class descriptor. * - * _id: Plugin descriptor ID (C identifier). - * _comp_class_id: Component class descriptor ID (C identifier). - * _x: Iterator "can seek nanoseconds from origin" method - * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method). + * _id: Plugin descriptor ID (C identifier). + * _comp_class_id: Component class descriptor ID (C identifier). + * _seek_method: Iterator "seek beginning" method + * (bt_component_class_source_message_iterator_seek_beginning_method). + * _can_seek_method: Iterator "can seek beginning" method + * (bt_component_class_source_message_iterator_can_seek_beginning_method). */ -#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \ - __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_can_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, source, _x) - -/* - * Defines an iterator "can seek beginning" method attribute attached to a - * specific source component class descriptor. - * - * _id: Plugin descriptor ID (C identifier). - * _comp_class_id: Component class descriptor ID (C identifier). - * _x: Iterator "can seek beginning" method - * (bt_component_class_source_message_iterator_can_seek_beginning_method). - */ -#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \ - __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_can_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD, _id, _comp_class_id, source, _x) +#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHODS_WITH_ID(_id, _comp_class_id, _seek_method, _can_seek_method) \ + __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD, _id, _comp_class_id, source, _seek_method); \ + __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(source_msg_iter_can_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD, _id, _comp_class_id, source, _can_seek_method) /* * Defines an iterator initialization method attribute attached to a @@ -963,10 +914,10 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ * _id: Plugin descriptor ID (C identifier). * _comp_class_id: Component class descriptor ID (C identifier). * _x: Iterator initialization method - * (bt_component_class_filter_message_iterator_init_method). + * (bt_component_class_filter_message_iterator_initialize_method). */ -#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(_id, _comp_class_id, _x) \ - __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_init_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INIT_METHOD, _id, _comp_class_id, filter, _x) +#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INITIALIZE_METHOD_WITH_ID(_id, _comp_class_id, _x) \ + __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_initialize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_INITIALIZE_METHOD, _id, _comp_class_id, filter, _x) /* * Defines an iterator finalize method attribute attached to a specific @@ -981,52 +932,34 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_finalize_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_FINALIZE_METHOD, _id, _comp_class_id, filter, _x) /* - * Defines an iterator "seek nanoseconds from origin" method attribute - * attached to a specific filter component class descriptor. + * Defines an iterator "seek nanoseconds" and "can seek nanoseconds from origin" + * method attributes attached to a specific filter component class descriptor. * - * _id: Plugin descriptor ID (C identifier). - * _comp_class_id: Component class descriptor ID (C identifier). - * _x: Iterator "seek nanoseconds from origin" method - * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method). + * _id: Plugin descriptor ID (C identifier). + * _comp_class_id: Component class descriptor ID (C identifier). + * _seek_method: Iterator "seek nanoseconds from origin" method + * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method). + * _can_seek_method: Iterator "can seek nanoseconds from origin" method + * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method). */ -#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \ - __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, filter, _x) +#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(_id, _comp_class_id, _seek_method, _can_seek_method) \ + __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, filter, _seek_method); \ + __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_can_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, filter, _can_seek_method) /* - * Defines an iterator "seek beginning" method attribute attached to a - * specific filter component class descriptor. + * Defines an iterator "seek beginning" and "can seek beginning" method + * attributes attached to a specific filter component class descriptor. * - * _id: Plugin descriptor ID (C identifier). - * _comp_class_id: Component class descriptor ID (C identifier). - * _x: Iterator "seek beginning" method - * (bt_component_class_filter_message_iterator_seek_beginning_method). + * _id: Plugin descriptor ID (C identifier). + * _comp_class_id: Component class descriptor ID (C identifier). + * _seek_method: Iterator "seek beginning" method + * (bt_component_class_filter_message_iterator_seek_beginning_method). + * _can_seek_method: Iterator "can seek beginning" method + * (bt_component_class_filter_message_iterator_can_seek_beginning_method). */ -#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \ - __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD, _id, _comp_class_id, filter, _x) - -/* - * Defines an iterator "can seek nanoseconds from origin" method - * attribute attached to a specific filter component class descriptor. - * - * _id: Plugin descriptor ID (C identifier). - * _comp_class_id: Component class descriptor ID (C identifier). - * _x: Iterator "can seek nanoseconds from origin" method - * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method). - */ -#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(_id, _comp_class_id, _x) \ - __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_can_seek_ns_from_origin_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_NS_FROM_ORIGIN_METHOD, _id, _comp_class_id, filter, _x) - -/* - * Defines an iterator "can seek beginning" method attribute attached to a - * specific filter component class descriptor. - * - * _id: Plugin descriptor ID (C identifier). - * _comp_class_id: Component class descriptor ID (C identifier). - * _x: Iterator "can seek beginning" method - * (bt_component_class_filter_message_iterator_can_seek_beginning_method). - */ -#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(_id, _comp_class_id, _x) \ - __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_can_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD, _id, _comp_class_id, filter, _x) +#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHODS_WITH_ID(_id, _comp_class_id, _seek_method, _can_seek_method) \ + __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_SEEK_BEGINNING_METHOD, _id, _comp_class_id, filter, _seek_method); \ + __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(filter_msg_iter_can_seek_beginning_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_MSG_ITER_CAN_SEEK_BEGINNING_METHOD, _id, _comp_class_id, filter, _can_seek_method); /* * Defines a plugin descriptor with an automatic ID. @@ -1039,17 +972,17 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ * Defines a plugin initialization function attribute attached to the * automatic plugin descriptor. * - * _x: Initialization function (bt_plugin_init_func). + * _x: Initialization function (bt_plugin_initialize_func). */ -#define BT_PLUGIN_INIT(_x) BT_PLUGIN_INIT_WITH_ID(auto, _x) +#define BT_PLUGIN_INITIALIZE(_x) BT_PLUGIN_INITIALIZE_WITH_ID(auto, _x) /* * Defines a plugin exit function attribute attached to the automatic * plugin descriptor. * - * _x: Exit function (bt_plugin_exit_func). + * _x: Exit function (bt_plugin_finalize_func). */ -#define BT_PLUGIN_EXIT(_x) BT_PLUGIN_EXIT_WITH_ID(auto, _x) +#define BT_PLUGIN_FINALIZE(_x) BT_PLUGIN_FINALIZE_WITH_ID(auto, _x) /* * Defines an author attribute attached to the automatic plugin @@ -1188,10 +1121,10 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ * descriptor. * * _name: Component class name (C identifier). - * _x: Initialization method (bt_component_class_source_init_method). + * _x: Initialization method (bt_component_class_source_initialize_method). */ -#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD(_name, _x) \ - BT_PLUGIN_SOURCE_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x) +#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _x) \ + BT_PLUGIN_SOURCE_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _x) /* * Defines an initialization method attribute attached to a filter @@ -1199,10 +1132,10 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ * descriptor. * * _name: Component class name (C identifier). - * _x: Initialization method (bt_component_class_filter_init_method). + * _x: Initialization method (bt_component_class_filter_initialize_method). */ -#define BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD(_name, _x) \ - BT_PLUGIN_FILTER_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x) +#define BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _x) \ + BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _x) /* * Defines an initialization method attribute attached to a sink @@ -1210,10 +1143,43 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ * descriptor. * * _name: Component class name (C identifier). - * _x: Initialization method (bt_component_class_sink_init_method). + * _x: Initialization method (bt_component_class_sink_initialize_method). + */ +#define BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD(_name, _x) \ + BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD_WITH_ID(auto, _name, _x) + +/* + * Defines a "get supported MIP versions" method attribute attached to a + * source component class descriptor which is attached to the automatic + * plugin descriptor. + * + * _name: Component class name (C identifier). + * _x: Initialization method (bt_component_class_source_get_supported_mip_versions_method). + */ +#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _x) \ + BT_PLUGIN_SOURCE_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _x) + +/* + * Defines a "get supported MIP versions" method attribute attached to a + * filter component class descriptor which is attached to the automatic + * plugin descriptor. + * + * _name: Component class name (C identifier). + * _x: Initialization method (bt_component_class_filter_get_supported_mip_versions_method). */ -#define BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD(_name, _x) \ - BT_PLUGIN_SINK_COMPONENT_CLASS_INIT_METHOD_WITH_ID(auto, _name, _x) +#define BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _x) \ + BT_PLUGIN_FILTER_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _x) + +/* + * Defines a "get supported MIP versions" method attribute attached to a + * sink component class descriptor which is attached to the automatic + * plugin descriptor. + * + * _name: Component class name (C identifier). + * _x: Initialization method (bt_component_class_sink_get_supported_mip_versions_method). + */ +#define BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD(_name, _x) \ + BT_PLUGIN_SINK_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_WITH_ID(auto, _name, _x) /* * Defines a finalization method attribute attached to a source component @@ -1280,54 +1246,6 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ #define BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD(_name, _x) \ BT_PLUGIN_SINK_COMPONENT_CLASS_QUERY_METHOD_WITH_ID(auto, _name, _x) -/* - * Defines an accept input port connection method attribute attached to - * a filter component class descriptor which is attached to the - * automatic plugin descriptor. - * - * _name: Component class name (C identifier). - * _x: Accept port connection method - * (bt_component_class_filter_accept_input_port_connection_method). - */ -#define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \ - BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x) - -/* - * Defines an accept input port connection method attribute attached to - * a sink component class descriptor which is attached to the automatic - * plugin descriptor. - * - * _name: Component class name (C identifier). - * _x: Accept port connection method - * (bt_component_class_sink_accept_input_port_connection_method). - */ -#define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD(_name, _x) \ - BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_INPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x) - -/* - * Defines an accept output port connection method attribute attached to - * a source component class descriptor which is attached to the - * automatic plugin descriptor. - * - * _name: Component class name (C identifier). - * _x: Accept port connection method - * (bt_component_class_source_accept_output_port_connection_method). - */ -#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \ - BT_PLUGIN_SOURCE_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x) - -/* - * Defines an accept output port connection method attribute attached to - * a filter component class descriptor which is attached to the - * automatic plugin descriptor. - * - * _name: Component class name (C identifier). - * _x: Accept port connection method - * (bt_component_class_filter_accept_output_port_connection_method). - */ -#define BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD(_name, _x) \ - BT_PLUGIN_FILTER_COMPONENT_CLASS_ACCEPT_OUTPUT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x) - /* * Defines an input port connected method attribute attached to a filter * component class descriptor which is attached to the automatic plugin @@ -1391,10 +1309,10 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ * * _name: Component class name (C identifier). * _x: Iterator initialization method - * (bt_component_class_source_message_iterator_init_method). + * (bt_component_class_source_message_iterator_initialize_method). */ -#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \ - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x) +#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INITIALIZE_METHOD(_name, _x) \ + BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_INITIALIZE_METHOD_WITH_ID(auto, _name, _x) /* * Defines an iterator finalize method attribute attached to a source @@ -1409,52 +1327,32 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x) /* - * Defines an iterator "seek nanoseconds from origin" method attribute - * attached to a source component class descriptor which is attached to - * the automatic plugin descriptor. - * - * _name: Component class name (C identifier). - * _x: Iterator "seek nanoseconds from origin" method - * (bt_component_class_source_message_iterator_seek_ns_from_origin_method). - */ -#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \ - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x) - -/* - * Defines an iterator "seek beginning" method attribute - * attached to a source component class descriptor which is attached to - * the automatic plugin descriptor. - * - * _name: Component class name (C identifier). - * _x: Iterator "seek beginning" method - * (bt_component_class_source_message_iterator_seek_beginning_method). - */ -#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \ - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x) - -/* - * Defines an iterator "can seek nanoseconds from origin" method - * attribute attached to a source component class descriptor which is - * attached to the automatic plugin descriptor. + * Defines an iterator "seek nanoseconds from origin" and "can seek nanoseconds + * from origin" method attributes attached to a source component class + * descriptor which is attached to the automatic plugin descriptor. * - * _name: Component class name (C identifier). - * _x: Iterator "can seek nanoseconds from origin" method - * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method). + * _name: Component class name (C identifier). + * _seek_method: Iterator "seek nanoseconds from origin" method + * (bt_component_class_source_message_iterator_seek_ns_from_origin_method). + * _can_seek_method: Iterator "can seek nanoseconds from origin" method + * (bt_component_class_source_message_iterator_can_seek_ns_from_origin_method). */ -#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \ - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x) +#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \ + BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method) /* - * Defines an iterator "can seek beginning" method attribute - * attached to a source component class descriptor which is attached to - * the automatic plugin descriptor. + * Defines an iterator "seek beginning" and "can seek beginning" method + * attributes attached to a source component class descriptor which is attached + * to the automatic plugin descriptor. * - * _name: Component class name (C identifier). - * _x: Iterator "can seek beginning" method - * (bt_component_class_source_message_iterator_can_seek_beginning_method). + * _name: Component class name (C identifier). + * _seek_method: Iterator "can seek beginning" method + * (bt_component_class_source_message_iterator_can_seek_beginning_method). + * _can_seek_method: Iterator "can seek beginning" method + * (bt_component_class_source_message_iterator_seek_beginning_method). */ -#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \ - BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x) +#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \ + BT_PLUGIN_SOURCE_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method) /* * Defines an iterator initialization method attribute attached to a @@ -1463,10 +1361,10 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ * * _name: Component class name (C identifier). * _x: Iterator initialization method - * (bt_component_class_filter_message_iterator_init_method). + * (bt_component_class_filter_message_iterator_initialize_method). */ -#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD(_name, _x) \ - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_WITH_ID(auto, _name, _x) +#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INITIALIZE_METHOD(_name, _x) \ + BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_INITIALIZE_METHOD_WITH_ID(auto, _name, _x) /* * Defines an iterator finalize method attribute attached to a filter @@ -1481,52 +1379,32 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_FINALIZE_METHOD_WITH_ID(auto, _name, _x) /* - * Defines an iterator "seek nanoseconds from origin" method attribute - * attached to a filter component class descriptor which is attached to - * the automatic plugin descriptor. - * - * _name: Component class name (C identifier). - * _x: Iterator "seek nanoseconds from origin" method - * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method). - */ -#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \ - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x) - -/* - * Defines an iterator "seek beginning" method attribute - * attached to a filter component class descriptor which is attached to - * the automatic plugin descriptor. - * - * _name: Component class name (C identifier). - * _x: Iterator "seek beginning" method - * (bt_component_class_filter_message_iterator_seek_beginning_method). - */ -#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD(_name, _x) \ - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x) - -/* - * Defines an iterator "can seek nanoseconds from origin" method - * attribute attached to a filter component class descriptor which is - * attached to the automatic plugin descriptor. + * Defines an iterator "seek nanosecconds from origin" and "can seek + * nanoseconds from origin" method attributes attached to a filter component + * class descriptor which is attached to the automatic plugin descriptor. * - * _name: Component class name (C identifier). - * _x: Iterator "can seek nanoseconds from origin" method - * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method). + * _name: Component class name (C identifier). + * _seek_method: Iterator "seek nanoseconds from origin" method + * (bt_component_class_filter_message_iterator_seek_ns_from_origin_method). + * _can_seek_method: Iterator "can seek nanoseconds from origin" method + * (bt_component_class_filter_message_iterator_can_seek_ns_from_origin_method). */ -#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD(_name, _x) \ - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_NS_FROM_ORIGIN_METHOD_WITH_ID(auto, _name, _x) +#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHODS(_name, _seek_method, _can_seek_method) \ + BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_NS_FROM_ORIGIN_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method) /* - * Defines an iterator "can seek beginning" method attribute - * attached to a filter component class descriptor which is attached to - * the automatic plugin descriptor. + * Defines an iterator "seek beginning" and "can seek beginning" method + * attributes attached to a filter component class descriptor which is attached + * to the automatic plugin descriptor. * - * _name: Component class name (C identifier). - * _x: Iterator "can seek beginning" method - * (bt_component_class_filter_message_iterator_can_seek_beginning_method). + * _name: Component class name (C identifier). + * _seek_method: Iterator "seek beginning" method + * (bt_component_class_filter_message_iterator_seek_beginning_method). + * _can_seek_method: Iterator "can seek beginning" method + * (bt_component_class_filter_message_iterator_can_seek_beginning_method). */ -#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD(_name, _x) \ - BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CAN_SEEK_BEGINNING_METHOD_WITH_ID(auto, _name, _x) +#define BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHODS(_name, _seek_method, _can_seek_method) \ + BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_SEEK_BEGINNING_METHODS_WITH_ID(auto, _name, _seek_method, _can_seek_method) #define BT_PLUGIN_MODULE() \ static struct __bt_plugin_descriptor const * const __bt_plugin_descriptor_dummy __BT_PLUGIN_DESCRIPTOR_ATTRS = NULL; \ @@ -1582,4 +1460,4 @@ struct __bt_plugin_component_class_descriptor_attribute const * const *__bt_get_ } #endif -#endif /* BABELTRACE_PLUGIN_PLUGIN_DEV_H */ +#endif /* BABELTRACE2_PLUGIN_PLUGIN_DEV_H */