From: Philippe Proulx Date: Thu, 26 Jan 2017 09:11:30 +0000 (-0500) Subject: Prefix {source,filter,sink}*.h file names with component- X-Git-Tag: v2.0.0-pre1~543 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=d71dcf2c09c27291afa19a40eb99cc3556842e99 Prefix {source,filter,sink}*.h file names with component- Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- diff --git a/converter/babeltrace.c b/converter/babeltrace.c index ca94cb82..02ac4853 100644 --- a/converter/babeltrace.c +++ b/converter/babeltrace.c @@ -29,9 +29,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/include/Makefile.am b/include/Makefile.am index 33ac2673..db5c6ffd 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -49,9 +49,9 @@ babeltracecomponentinclude_HEADERS = \ babeltrace/component/component-class-sink.h \ babeltrace/component/component-connection.h \ babeltrace/component/component-graph.h \ - babeltrace/component/source.h \ - babeltrace/component/sink.h \ - babeltrace/component/filter.h \ + babeltrace/component/component-source.h \ + babeltrace/component/component-sink.h \ + babeltrace/component/component-filter.h \ babeltrace/component/notification/eot.h \ babeltrace/component/notification/notification.h \ babeltrace/component/notification/event.h \ @@ -125,9 +125,9 @@ noinst_HEADERS = \ babeltrace/component/component-connection-internal.h \ babeltrace/component/component-internal.h \ babeltrace/component/component-graph-internal.h \ - babeltrace/component/filter-internal.h \ - babeltrace/component/sink-internal.h \ - babeltrace/component/source-internal.h \ + babeltrace/component/component-filter-internal.h \ + babeltrace/component/component-sink-internal.h \ + babeltrace/component/component-source-internal.h \ babeltrace/component/input.h \ babeltrace/component/notification/eot-internal.h \ babeltrace/component/notification/event-internal.h \ diff --git a/include/babeltrace/component/component-filter-internal.h b/include/babeltrace/component/component-filter-internal.h new file mode 100644 index 00000000..5ae007fa --- /dev/null +++ b/include/babeltrace/component/component-filter-internal.h @@ -0,0 +1,63 @@ +#ifndef BABELTRACE_COMPONENT_FILTER_INTERNAL_H +#define BABELTRACE_COMPONENT_FILTER_INTERNAL_H + +/* + * BabelTrace - Filter Component Internal + * + * Copyright 2016 Jérémie Galarneau + * + * Author: Jérémie Galarneau + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include +#include +#include + +struct bt_value; + +struct bt_component_filter { + struct bt_component parent; + struct component_input input; +}; + +/** + * Allocate a filter component. + * + * @param class Component class + * @param params A dictionary of component parameters + * @returns A filter component instance + */ +BT_HIDDEN +struct bt_component *bt_component_filter_create( + struct bt_component_class *class, struct bt_value *params); + +/** + * Validate a filter component. + * + * @param component Filter component instance to validate + * @returns One of #bt_component_status + */ +BT_HIDDEN +enum bt_component_status bt_component_filter_validate( + struct bt_component *component); + +#endif /* BABELTRACE_COMPONENT_FILTER_INTERNAL_H */ diff --git a/include/babeltrace/component/component-filter.h b/include/babeltrace/component/component-filter.h new file mode 100644 index 00000000..64e6ef96 --- /dev/null +++ b/include/babeltrace/component/component-filter.h @@ -0,0 +1,85 @@ +#ifndef BABELTRACE_COMPONENT_FILTER_H +#define BABELTRACE_COMPONENT_FILTER_H + +/* + * BabelTrace - Filter Plug-in Interface + * + * Copyright 2016 Jérémie Galarneau + * + * Author: Jérémie Galarneau + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct bt_component; +struct bt_notification_iterator; + +/** + * Add a notification iterator to a filter component. + * + * @param component Component instance + * @param iterator Notification iterator to add + * @returns One of #bt_component_status values + */ +extern +enum bt_component_status bt_component_filter_add_iterator( + struct bt_component *component, + struct bt_notification_iterator *iterator); + +/** + * Create an iterator on a component instance. + * + * @param component Component instance + * @returns Notification iterator instance + */ +extern +struct bt_notification_iterator *bt_component_filter_create_iterator( + struct bt_component *component); + +/* Defaults to 1. */ +extern enum bt_component_status +bt_component_filter_set_minimum_input_count(struct bt_component *filter, + unsigned int minimum); + +/* Defaults to 1. */ +extern enum bt_component_status +bt_component_filter_set_maximum_input_count(struct bt_component *filter, + unsigned int maximum); + +extern enum bt_component_status +bt_component_filter_get_input_count(struct bt_component *filter, + unsigned int *count); + +/* May return NULL after an interator has reached its end. */ +extern enum bt_component_status +bt_component_filter_get_input_iterator(struct bt_component *filter, + unsigned int input, struct bt_notification_iterator **iterator); + +#ifdef __cplusplus +} +#endif + +#endif /* BABELTRACE_COMPONENT_FILTER_H */ diff --git a/include/babeltrace/component/component-sink-internal.h b/include/babeltrace/component/component-sink-internal.h new file mode 100644 index 00000000..30b066c6 --- /dev/null +++ b/include/babeltrace/component/component-sink-internal.h @@ -0,0 +1,66 @@ +#ifndef BABELTRACE_COMPONENT_SINK_INTERNAL_H +#define BABELTRACE_COMPONENT_SINK_INTERNAL_H + +/* + * BabelTrace - Sink Component internal + * + * Copyright 2015 Jérémie Galarneau + * + * Author: Jérémie Galarneau + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include +#include +#include + +struct bt_value; + +//typedef uint32_t notification_mask_t; + +struct bt_component_sink { + struct bt_component parent; + struct component_input input; +/* notification_mask_t registered_notifications_mask;*/ +}; + +/** + * Allocate a sink component. + * + * @param class Component class + * @param params A dictionary of component parameters + * @returns A sink component instance + */ +BT_HIDDEN +struct bt_component *bt_component_sink_create( + struct bt_component_class *class, struct bt_value *params); + +/** + * Validate a sink component. + * + * @param component Sink component instance to validate + * @returns One of #bt_component_status + */ +BT_HIDDEN +enum bt_component_status bt_component_sink_validate( + struct bt_component *component); + +#endif /* BABELTRACE_COMPONENT_SINK_INTERNAL_H */ diff --git a/include/babeltrace/component/component-sink.h b/include/babeltrace/component/component-sink.h new file mode 100644 index 00000000..a37221d5 --- /dev/null +++ b/include/babeltrace/component/component-sink.h @@ -0,0 +1,84 @@ +#ifndef BABELTRACE_COMPONENT_SINK_H +#define BABELTRACE_COMPONENT_SINK_H + +/* + * BabelTrace - Sink Component Interface + * + * Copyright 2015 Jérémie Galarneau + * + * Author: Jérémie Galarneau + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct bt_component; +struct bt_notification; + +/** + * Add a notification iterator to a sink component. + * + * @param component Component instance + * @param iterator Notification iterator to add + * @returns One of #bt_component_status values + */ +extern +enum bt_component_status bt_component_sink_add_iterator( + struct bt_component *component, + struct bt_notification_iterator *iterator); + +/** + * Process one event, consuming from sources as needed. + * + * @param component Component instance + * @returns One of #bt_component_status values + */ +extern +enum bt_component_status bt_component_sink_consume( + struct bt_component *component); + +/* Defaults to 1. */ +extern enum bt_component_status +bt_component_sink_set_minimum_input_count(struct bt_component *sink, + unsigned int minimum); + +/* Defaults to 1. */ +extern enum bt_component_status +bt_component_sink_set_maximum_input_count(struct bt_component *sink, + unsigned int maximum); + +extern enum bt_component_status +bt_component_sink_get_input_count(struct bt_component *sink, + unsigned int *count); + +/* May return NULL after an interator has reached its end. */ +extern enum bt_component_status +bt_component_sink_get_input_iterator(struct bt_component *sink, + unsigned int input, struct bt_notification_iterator **iterator); + +#ifdef __cplusplus +} +#endif + +#endif /* BABELTRACE_COMPONENT_SINK_H */ diff --git a/include/babeltrace/component/component-source-internal.h b/include/babeltrace/component/component-source-internal.h new file mode 100644 index 00000000..fcf646de --- /dev/null +++ b/include/babeltrace/component/component-source-internal.h @@ -0,0 +1,61 @@ +#ifndef BABELTRACE_COMPONENT_SOURCE_INTERNAL_H +#define BABELTRACE_COMPONENT_SOURCE_INTERNAL_H + +/* + * BabelTrace - Source Component internal + * + * Copyright 2015 Jérémie Galarneau + * + * Author: Jérémie Galarneau + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include +#include + +struct bt_value; + +struct bt_component_source { + struct bt_component parent; +}; + +/** + * Allocate a source component. + * + * @param class Component class + * @param params A dictionary of component parameters + * @returns A source component instance + */ +BT_HIDDEN +struct bt_component *bt_component_source_create( + struct bt_component_class *class, struct bt_value *params); + +/** + * Validate a source component. + * + * @param component Source component instance to validate + * @returns One of #bt_component_status + */ +BT_HIDDEN +enum bt_component_status bt_component_source_validate( + struct bt_component *component); + +#endif /* BABELTRACE_COMPONENT_SOURCE_INTERNAL_H */ diff --git a/include/babeltrace/component/component-source.h b/include/babeltrace/component/component-source.h new file mode 100644 index 00000000..fdb3eb26 --- /dev/null +++ b/include/babeltrace/component/component-source.h @@ -0,0 +1,54 @@ +#ifndef BABELTRACE_COMPONENT_SOURCE_H +#define BABELTRACE_COMPONENT_SOURCE_H + +/* + * BabelTrace - Source Plug-in Interface + * + * Copyright 2016 Jérémie Galarneau + * + * Author: Jérémie Galarneau + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct bt_component; +struct bt_notification_iterator; + +/** + * Create an iterator on a component instance. + * + * @param component Component instance + * @returns Notification iterator instance + */ +extern +struct bt_notification_iterator *bt_component_source_create_iterator( + struct bt_component *component); + +#ifdef __cplusplus +} +#endif + +#endif /* BABELTRACE_COMPONENT_SOURCE_H */ diff --git a/include/babeltrace/component/filter-internal.h b/include/babeltrace/component/filter-internal.h deleted file mode 100644 index 5ae007fa..00000000 --- a/include/babeltrace/component/filter-internal.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef BABELTRACE_COMPONENT_FILTER_INTERNAL_H -#define BABELTRACE_COMPONENT_FILTER_INTERNAL_H - -/* - * BabelTrace - Filter Component Internal - * - * Copyright 2016 Jérémie Galarneau - * - * Author: Jérémie Galarneau - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#include -#include - -struct bt_value; - -struct bt_component_filter { - struct bt_component parent; - struct component_input input; -}; - -/** - * Allocate a filter component. - * - * @param class Component class - * @param params A dictionary of component parameters - * @returns A filter component instance - */ -BT_HIDDEN -struct bt_component *bt_component_filter_create( - struct bt_component_class *class, struct bt_value *params); - -/** - * Validate a filter component. - * - * @param component Filter component instance to validate - * @returns One of #bt_component_status - */ -BT_HIDDEN -enum bt_component_status bt_component_filter_validate( - struct bt_component *component); - -#endif /* BABELTRACE_COMPONENT_FILTER_INTERNAL_H */ diff --git a/include/babeltrace/component/filter.h b/include/babeltrace/component/filter.h deleted file mode 100644 index 64e6ef96..00000000 --- a/include/babeltrace/component/filter.h +++ /dev/null @@ -1,85 +0,0 @@ -#ifndef BABELTRACE_COMPONENT_FILTER_H -#define BABELTRACE_COMPONENT_FILTER_H - -/* - * BabelTrace - Filter Plug-in Interface - * - * Copyright 2016 Jérémie Galarneau - * - * Author: Jérémie Galarneau - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -struct bt_component; -struct bt_notification_iterator; - -/** - * Add a notification iterator to a filter component. - * - * @param component Component instance - * @param iterator Notification iterator to add - * @returns One of #bt_component_status values - */ -extern -enum bt_component_status bt_component_filter_add_iterator( - struct bt_component *component, - struct bt_notification_iterator *iterator); - -/** - * Create an iterator on a component instance. - * - * @param component Component instance - * @returns Notification iterator instance - */ -extern -struct bt_notification_iterator *bt_component_filter_create_iterator( - struct bt_component *component); - -/* Defaults to 1. */ -extern enum bt_component_status -bt_component_filter_set_minimum_input_count(struct bt_component *filter, - unsigned int minimum); - -/* Defaults to 1. */ -extern enum bt_component_status -bt_component_filter_set_maximum_input_count(struct bt_component *filter, - unsigned int maximum); - -extern enum bt_component_status -bt_component_filter_get_input_count(struct bt_component *filter, - unsigned int *count); - -/* May return NULL after an interator has reached its end. */ -extern enum bt_component_status -bt_component_filter_get_input_iterator(struct bt_component *filter, - unsigned int input, struct bt_notification_iterator **iterator); - -#ifdef __cplusplus -} -#endif - -#endif /* BABELTRACE_COMPONENT_FILTER_H */ diff --git a/include/babeltrace/component/sink-internal.h b/include/babeltrace/component/sink-internal.h deleted file mode 100644 index 30b066c6..00000000 --- a/include/babeltrace/component/sink-internal.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef BABELTRACE_COMPONENT_SINK_INTERNAL_H -#define BABELTRACE_COMPONENT_SINK_INTERNAL_H - -/* - * BabelTrace - Sink Component internal - * - * Copyright 2015 Jérémie Galarneau - * - * Author: Jérémie Galarneau - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#include -#include - -struct bt_value; - -//typedef uint32_t notification_mask_t; - -struct bt_component_sink { - struct bt_component parent; - struct component_input input; -/* notification_mask_t registered_notifications_mask;*/ -}; - -/** - * Allocate a sink component. - * - * @param class Component class - * @param params A dictionary of component parameters - * @returns A sink component instance - */ -BT_HIDDEN -struct bt_component *bt_component_sink_create( - struct bt_component_class *class, struct bt_value *params); - -/** - * Validate a sink component. - * - * @param component Sink component instance to validate - * @returns One of #bt_component_status - */ -BT_HIDDEN -enum bt_component_status bt_component_sink_validate( - struct bt_component *component); - -#endif /* BABELTRACE_COMPONENT_SINK_INTERNAL_H */ diff --git a/include/babeltrace/component/sink.h b/include/babeltrace/component/sink.h deleted file mode 100644 index a37221d5..00000000 --- a/include/babeltrace/component/sink.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef BABELTRACE_COMPONENT_SINK_H -#define BABELTRACE_COMPONENT_SINK_H - -/* - * BabelTrace - Sink Component Interface - * - * Copyright 2015 Jérémie Galarneau - * - * Author: Jérémie Galarneau - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -struct bt_component; -struct bt_notification; - -/** - * Add a notification iterator to a sink component. - * - * @param component Component instance - * @param iterator Notification iterator to add - * @returns One of #bt_component_status values - */ -extern -enum bt_component_status bt_component_sink_add_iterator( - struct bt_component *component, - struct bt_notification_iterator *iterator); - -/** - * Process one event, consuming from sources as needed. - * - * @param component Component instance - * @returns One of #bt_component_status values - */ -extern -enum bt_component_status bt_component_sink_consume( - struct bt_component *component); - -/* Defaults to 1. */ -extern enum bt_component_status -bt_component_sink_set_minimum_input_count(struct bt_component *sink, - unsigned int minimum); - -/* Defaults to 1. */ -extern enum bt_component_status -bt_component_sink_set_maximum_input_count(struct bt_component *sink, - unsigned int maximum); - -extern enum bt_component_status -bt_component_sink_get_input_count(struct bt_component *sink, - unsigned int *count); - -/* May return NULL after an interator has reached its end. */ -extern enum bt_component_status -bt_component_sink_get_input_iterator(struct bt_component *sink, - unsigned int input, struct bt_notification_iterator **iterator); - -#ifdef __cplusplus -} -#endif - -#endif /* BABELTRACE_COMPONENT_SINK_H */ diff --git a/include/babeltrace/component/source-internal.h b/include/babeltrace/component/source-internal.h deleted file mode 100644 index fcf646de..00000000 --- a/include/babeltrace/component/source-internal.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef BABELTRACE_COMPONENT_SOURCE_INTERNAL_H -#define BABELTRACE_COMPONENT_SOURCE_INTERNAL_H - -/* - * BabelTrace - Source Component internal - * - * Copyright 2015 Jérémie Galarneau - * - * Author: Jérémie Galarneau - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include -#include - -struct bt_value; - -struct bt_component_source { - struct bt_component parent; -}; - -/** - * Allocate a source component. - * - * @param class Component class - * @param params A dictionary of component parameters - * @returns A source component instance - */ -BT_HIDDEN -struct bt_component *bt_component_source_create( - struct bt_component_class *class, struct bt_value *params); - -/** - * Validate a source component. - * - * @param component Source component instance to validate - * @returns One of #bt_component_status - */ -BT_HIDDEN -enum bt_component_status bt_component_source_validate( - struct bt_component *component); - -#endif /* BABELTRACE_COMPONENT_SOURCE_INTERNAL_H */ diff --git a/include/babeltrace/component/source.h b/include/babeltrace/component/source.h deleted file mode 100644 index fdb3eb26..00000000 --- a/include/babeltrace/component/source.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef BABELTRACE_COMPONENT_SOURCE_H -#define BABELTRACE_COMPONENT_SOURCE_H - -/* - * BabelTrace - Source Plug-in Interface - * - * Copyright 2016 Jérémie Galarneau - * - * Author: Jérémie Galarneau - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -struct bt_component; -struct bt_notification_iterator; - -/** - * Create an iterator on a component instance. - * - * @param component Component instance - * @returns Notification iterator instance - */ -extern -struct bt_notification_iterator *bt_component_source_create_iterator( - struct bt_component *component); - -#ifdef __cplusplus -} -#endif - -#endif /* BABELTRACE_COMPONENT_SOURCE_H */ diff --git a/lib/component/component.c b/lib/component/component.c index d82ee0d8..fe1179c2 100644 --- a/lib/component/component.c +++ b/lib/component/component.c @@ -29,10 +29,10 @@ #include #include #include -#include -#include +#include +#include +#include #include -#include #include #include #include diff --git a/lib/component/filter.c b/lib/component/filter.c index 53c0091e..f99e5999 100644 --- a/lib/component/filter.c +++ b/lib/component/filter.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/lib/component/iterator.c b/lib/component/iterator.c index 98c4f355..c8c41a0b 100644 --- a/lib/component/iterator.c +++ b/lib/component/iterator.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/lib/component/sink.c b/lib/component/sink.c index 22ca5c99..954e758a 100644 --- a/lib/component/sink.c +++ b/lib/component/sink.c @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include diff --git a/lib/component/source.c b/lib/component/source.c index 7b51590c..c75c556d 100644 --- a/lib/component/source.c +++ b/lib/component/source.c @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/plugins/ctf/lttng-live/lttng-live.c b/plugins/ctf/lttng-live/lttng-live.c index 9bbf4b17..d797cbd1 100644 --- a/plugins/ctf/lttng-live/lttng-live.c +++ b/plugins/ctf/lttng-live/lttng-live.c @@ -27,7 +27,7 @@ */ #include "lttng-live-internal.h" -#include +#include BT_HIDDEN enum bt_component_status lttng_live_iterator_init(struct bt_component *source, diff --git a/plugins/muxer/muxer.c b/plugins/muxer/muxer.c index 04171d75..ba4e2c4e 100644 --- a/plugins/muxer/muxer.c +++ b/plugins/muxer/muxer.c @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/plugins/text/text.c b/plugins/text/text.c index 4ddca35c..109ac4af 100644 --- a/plugins/text/text.c +++ b/plugins/text/text.c @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include diff --git a/plugins/trimmer/iterator.c b/plugins/trimmer/iterator.c index 942b0264..d7633a9c 100644 --- a/plugins/trimmer/iterator.c +++ b/plugins/trimmer/iterator.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/plugins/trimmer/trimmer.c b/plugins/trimmer/trimmer.c index 6d94ddf2..1f9f48a3 100644 --- a/plugins/trimmer/trimmer.c +++ b/plugins/trimmer/trimmer.c @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/plugins/writer/writer.c b/plugins/writer/writer.c index 089a3d59..320642f9 100644 --- a/plugins/writer/writer.c +++ b/plugins/writer/writer.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include