Rename <babeltrace/component/...> -> <babeltrace/graph/...>
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 29 Mar 2017 02:04:59 +0000 (22:04 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:39 +0000 (12:57 -0400)
Also put all the graph-related header files directly in this directory,
not in subdirectories.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
124 files changed:
configure.ac
converter/babeltrace-cfg.h
converter/babeltrace.c
formats/ctf/ir/trace.c
include/Makefile.am
include/babeltrace/component/component-class-filter.h [deleted file]
include/babeltrace/component/component-class-internal.h [deleted file]
include/babeltrace/component/component-class-sink.h [deleted file]
include/babeltrace/component/component-class-source.h [deleted file]
include/babeltrace/component/component-class.h [deleted file]
include/babeltrace/component/component-filter-internal.h [deleted file]
include/babeltrace/component/component-filter.h [deleted file]
include/babeltrace/component/component-internal.h [deleted file]
include/babeltrace/component/component-sink-internal.h [deleted file]
include/babeltrace/component/component-sink.h [deleted file]
include/babeltrace/component/component-source-internal.h [deleted file]
include/babeltrace/component/component-source.h [deleted file]
include/babeltrace/component/component.h [deleted file]
include/babeltrace/component/connection-internal.h [deleted file]
include/babeltrace/component/connection.h [deleted file]
include/babeltrace/component/graph-internal.h [deleted file]
include/babeltrace/component/graph.h [deleted file]
include/babeltrace/component/notification/eot-internal.h [deleted file]
include/babeltrace/component/notification/eot.h [deleted file]
include/babeltrace/component/notification/event-internal.h [deleted file]
include/babeltrace/component/notification/event.h [deleted file]
include/babeltrace/component/notification/heap-internal.h [deleted file]
include/babeltrace/component/notification/heap.h [deleted file]
include/babeltrace/component/notification/iterator-internal.h [deleted file]
include/babeltrace/component/notification/iterator.h [deleted file]
include/babeltrace/component/notification/notification-internal.h [deleted file]
include/babeltrace/component/notification/notification.h [deleted file]
include/babeltrace/component/notification/packet-internal.h [deleted file]
include/babeltrace/component/notification/packet.h [deleted file]
include/babeltrace/component/notification/private-iterator.h [deleted file]
include/babeltrace/component/notification/schema.h [deleted file]
include/babeltrace/component/notification/stream-internal.h [deleted file]
include/babeltrace/component/notification/stream.h [deleted file]
include/babeltrace/component/port-internal.h [deleted file]
include/babeltrace/component/port.h [deleted file]
include/babeltrace/component/private-component-filter.h [deleted file]
include/babeltrace/component/private-component-sink.h [deleted file]
include/babeltrace/component/private-component-source.h [deleted file]
include/babeltrace/component/private-component.h [deleted file]
include/babeltrace/component/private-connection.h [deleted file]
include/babeltrace/component/private-port.h [deleted file]
include/babeltrace/ctf-ir/trace.h
include/babeltrace/graph/component-class-filter.h [new file with mode: 0644]
include/babeltrace/graph/component-class-internal.h [new file with mode: 0644]
include/babeltrace/graph/component-class-sink.h [new file with mode: 0644]
include/babeltrace/graph/component-class-source.h [new file with mode: 0644]
include/babeltrace/graph/component-class.h [new file with mode: 0644]
include/babeltrace/graph/component-filter-internal.h [new file with mode: 0644]
include/babeltrace/graph/component-filter.h [new file with mode: 0644]
include/babeltrace/graph/component-internal.h [new file with mode: 0644]
include/babeltrace/graph/component-sink-internal.h [new file with mode: 0644]
include/babeltrace/graph/component-sink.h [new file with mode: 0644]
include/babeltrace/graph/component-source-internal.h [new file with mode: 0644]
include/babeltrace/graph/component-source.h [new file with mode: 0644]
include/babeltrace/graph/component.h [new file with mode: 0644]
include/babeltrace/graph/connection-internal.h [new file with mode: 0644]
include/babeltrace/graph/connection.h [new file with mode: 0644]
include/babeltrace/graph/graph-internal.h [new file with mode: 0644]
include/babeltrace/graph/graph.h [new file with mode: 0644]
include/babeltrace/graph/notification-eot-internal.h [new file with mode: 0644]
include/babeltrace/graph/notification-eot.h [new file with mode: 0644]
include/babeltrace/graph/notification-event-internal.h [new file with mode: 0644]
include/babeltrace/graph/notification-event.h [new file with mode: 0644]
include/babeltrace/graph/notification-heap-internal.h [new file with mode: 0644]
include/babeltrace/graph/notification-heap.h [new file with mode: 0644]
include/babeltrace/graph/notification-internal.h [new file with mode: 0644]
include/babeltrace/graph/notification-iterator-internal.h [new file with mode: 0644]
include/babeltrace/graph/notification-iterator.h [new file with mode: 0644]
include/babeltrace/graph/notification-packet-internal.h [new file with mode: 0644]
include/babeltrace/graph/notification-packet.h [new file with mode: 0644]
include/babeltrace/graph/notification-schema.h [new file with mode: 0644]
include/babeltrace/graph/notification-stream-internal.h [new file with mode: 0644]
include/babeltrace/graph/notification-stream.h [new file with mode: 0644]
include/babeltrace/graph/notification.h [new file with mode: 0644]
include/babeltrace/graph/port-internal.h [new file with mode: 0644]
include/babeltrace/graph/port.h [new file with mode: 0644]
include/babeltrace/graph/private-component-filter.h [new file with mode: 0644]
include/babeltrace/graph/private-component-sink.h [new file with mode: 0644]
include/babeltrace/graph/private-component-source.h [new file with mode: 0644]
include/babeltrace/graph/private-component.h [new file with mode: 0644]
include/babeltrace/graph/private-connection.h [new file with mode: 0644]
include/babeltrace/graph/private-notification-iterator.h [new file with mode: 0644]
include/babeltrace/graph/private-port.h [new file with mode: 0644]
include/babeltrace/plugin/plugin-dev.h
include/babeltrace/plugin/plugin.h
lib/component/component-class.c
lib/component/component.c
lib/component/connection.c
lib/component/filter.c
lib/component/graph.c
lib/component/iterator.c
lib/component/notification/event.c
lib/component/notification/heap.c
lib/component/notification/notification.c
lib/component/notification/packet.c
lib/component/notification/stream.c
lib/component/port.c
lib/component/sink.c
lib/component/source.c
lib/plugin/plugin-so.c
plugins/ctf/common/notif-iter/notif-iter.c
plugins/ctf/fs/data-stream.c
plugins/ctf/fs/fs.c
plugins/ctf/fs/fs.h
plugins/ctf/lttng-live/lttng-live-internal.h
plugins/ctf/lttng-live/lttng-live.c
plugins/muxer/muxer.c
plugins/text/text.c
plugins/text/text.h
plugins/utils/dummy/dummy.c
plugins/utils/dummy/dummy.h
plugins/utils/trimmer/iterator.c
plugins/utils/trimmer/iterator.h
plugins/utils/trimmer/trimmer.c
plugins/utils/trimmer/trimmer.h
plugins/writer/writer.c
plugins/writer/writer.h
tests/lib/test-plugin-plugins/sfs.c
tests/lib/test_bt_notification_heap.c

index 0f3182142012e86137b8d33cdb85410153754fda..51e229d8756ffab6857511bbe8271fc3f532a216 100644 (file)
@@ -410,11 +410,8 @@ AC_SUBST(babeltracectfirincludedir)
 babeltracepluginincludedir="${includedir}/babeltrace/plugin"
 AC_SUBST(babeltracepluginincludedir)
 
-babeltracecomponentincludedir="${includedir}/babeltrace/component"
-AC_SUBST(babeltracecomponentincludedir)
-
-babeltracecomponentnotifincludedir="${includedir}/babeltrace/component/notification"
-AC_SUBST(babeltracecomponentnotifincludedir)
+babeltracegraphincludedir="${includedir}/babeltrace/graph"
+AC_SUBST(babeltracegraphincludedir)
 
 program_transform_name="s&babeltrace\.bin&babeltrace&;$program_transform_name"
 AC_SUBST(program_transform_name)
index caa90f44ce2f1939cf79316b194fcf7f5d613b9d..ca2f9950ebbdb6d592173aa0bab49408657d2ce2 100644 (file)
@@ -31,7 +31,7 @@
 #include <babeltrace/ref.h>
 #include <babeltrace/object-internal.h>
 #include <babeltrace/compiler.h>
-#include <babeltrace/component/component-class.h>
+#include <babeltrace/graph/component-class.h>
 #include <glib.h>
 
 struct bt_config_component {
index ecfbf5bee81060db7a09a493a20d280b90d72a58..5aa7255620c6f07e2e6c796b6365e10116e56e89 100644 (file)
 #include <babeltrace/babeltrace.h>
 #include <babeltrace/plugin/plugin.h>
 #include <babeltrace/common-internal.h>
-#include <babeltrace/component/component.h>
-#include <babeltrace/component/component-source.h>
-#include <babeltrace/component/component-sink.h>
-#include <babeltrace/component/component-filter.h>
-#include <babeltrace/component/component-class.h>
-#include <babeltrace/component/port.h>
-#include <babeltrace/component/graph.h>
-#include <babeltrace/component/connection.h>
-#include <babeltrace/component/notification/iterator.h>
+#include <babeltrace/graph/component.h>
+#include <babeltrace/graph/component-source.h>
+#include <babeltrace/graph/component-sink.h>
+#include <babeltrace/graph/component-filter.h>
+#include <babeltrace/graph/component-class.h>
+#include <babeltrace/graph/port.h>
+#include <babeltrace/graph/graph.h>
+#include <babeltrace/graph/connection.h>
+#include <babeltrace/graph/notification-iterator.h>
 #include <babeltrace/ref.h>
 #include <babeltrace/values.h>
 #include <stdlib.h>
index 37884069132f9fe5b82a6b4e8a262de38bf9c1ce..32ceca636f813e44aae98da61df8a41de5e2c5c7 100644 (file)
@@ -40,7 +40,7 @@
 #include <babeltrace/ctf-ir/validation-internal.h>
 #include <babeltrace/ctf-ir/visitor-internal.h>
 #include <babeltrace/ctf-ir/utils.h>
-#include <babeltrace/component/notification/schema.h>
+#include <babeltrace/graph/notification-schema.h>
 #include <babeltrace/compiler.h>
 #include <babeltrace/values.h>
 #include <babeltrace/ref.h>
index 94676992a3e0e14e22cff5e11f0de918ca4d249c..a4ef7ecda5cceb151aa07ea371879a8ca1d546b8 100644 (file)
@@ -41,35 +41,33 @@ babeltraceplugininclude_HEADERS = \
        babeltrace/plugin/plugin.h \
        babeltrace/plugin/plugin-dev.h
 
-babeltracecomponentnotifinclude_HEADERS = \
-       babeltrace/component/notification/eot.h \
-       babeltrace/component/notification/notification.h \
-       babeltrace/component/notification/event.h \
-       babeltrace/component/notification/iterator.h \
-       babeltrace/component/notification/packet.h \
-       babeltrace/component/notification/schema.h \
-       babeltrace/component/notification/stream.h \
-       babeltrace/component/notification/heap.h \
-       babeltrace/component/notification/private-iterator.h
-
-babeltracecomponentinclude_HEADERS = \
-       babeltrace/component/component.h \
-       babeltrace/component/component-class.h \
-       babeltrace/component/component-class-source.h \
-       babeltrace/component/component-class-filter.h \
-       babeltrace/component/component-class-sink.h \
-       babeltrace/component/connection.h \
-       babeltrace/component/port.h \
-       babeltrace/component/graph.h \
-       babeltrace/component/component-source.h \
-       babeltrace/component/component-sink.h \
-       babeltrace/component/component-filter.h \
-       babeltrace/component/private-connection.h \
-       babeltrace/component/private-port.h \
-       babeltrace/component/private-component.h \
-       babeltrace/component/private-component-source.h \
-       babeltrace/component/private-component-sink.h \
-       babeltrace/component/private-component-filter.h
+babeltracegraphinclude_HEADERS = \
+       babeltrace/graph/component-class-filter.h \
+       babeltrace/graph/component-class-sink.h \
+       babeltrace/graph/component-class-source.h \
+       babeltrace/graph/component-class.h \
+       babeltrace/graph/component-filter.h \
+       babeltrace/graph/component-sink.h \
+       babeltrace/graph/component-source.h \
+       babeltrace/graph/component.h \
+       babeltrace/graph/connection.h \
+       babeltrace/graph/graph.h \
+       babeltrace/graph/notification-eot.h \
+       babeltrace/graph/notification-event.h \
+       babeltrace/graph/notification-heap.h \
+       babeltrace/graph/notification-iterator.h \
+       babeltrace/graph/notification.h \
+       babeltrace/graph/notification-packet.h \
+       babeltrace/graph/notification-schema.h \
+       babeltrace/graph/notification-stream.h \
+       babeltrace/graph/port.h \
+       babeltrace/graph/private-component-filter.h \
+       babeltrace/graph/private-component-sink.h \
+       babeltrace/graph/private-component-source.h \
+       babeltrace/graph/private-component.h \
+       babeltrace/graph/private-connection.h \
+       babeltrace/graph/private-notification-iterator.h \
+       babeltrace/graph/private-port.h
 
 noinst_HEADERS = \
        babeltrace/align.h \
@@ -133,18 +131,18 @@ noinst_HEADERS = \
        babeltrace/mmap-align.h \
        babeltrace/plugin/plugin-internal.h \
        babeltrace/plugin/plugin-so-internal.h \
-       babeltrace/component/component-class-internal.h \
-       babeltrace/component/connection-internal.h \
-       babeltrace/component/port-internal.h \
-       babeltrace/component/component-internal.h \
-       babeltrace/component/graph-internal.h \
-       babeltrace/component/component-filter-internal.h \
-       babeltrace/component/component-sink-internal.h \
-       babeltrace/component/component-source-internal.h \
-       babeltrace/component/notification/eot-internal.h \
-       babeltrace/component/notification/event-internal.h \
-       babeltrace/component/notification/iterator-internal.h \
-       babeltrace/component/notification/notification-internal.h \
-       babeltrace/component/notification/packet-internal.h \
-       babeltrace/component/notification/stream-internal.h \
-       babeltrace/component/notification/heap-internal.h
+       babeltrace/graph/component-class-internal.h \
+       babeltrace/graph/connection-internal.h \
+       babeltrace/graph/port-internal.h \
+       babeltrace/graph/component-internal.h \
+       babeltrace/graph/graph-internal.h \
+       babeltrace/graph/component-filter-internal.h \
+       babeltrace/graph/component-sink-internal.h \
+       babeltrace/graph/component-source-internal.h \
+       babeltrace/graph/notification-eot-internal.h \
+       babeltrace/graph/notification-event-internal.h \
+       babeltrace/graph/notification-iterator-internal.h \
+       babeltrace/graph/notification-internal.h \
+       babeltrace/graph/notification-packet-internal.h \
+       babeltrace/graph/notification-stream-internal.h \
+       babeltrace/graph/notification-heap-internal.h
diff --git a/include/babeltrace/component/component-class-filter.h b/include/babeltrace/component/component-class-filter.h
deleted file mode 100644 (file)
index 60ed0f7..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_COMPONENT_CLASS_FILTER_H
-#define BABELTRACE_COMPONENT_COMPONENT_CLASS_FILTER_H
-
-/*
- * Babeltrace - Component Class Interface.
- *
- * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/component/component.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_component_class;
-
-extern
-struct bt_component_class *bt_component_class_filter_create(const char *name,
-               bt_component_class_notification_iterator_next_method notification_iterator_next_method);
-
-extern
-int bt_component_class_filter_set_notification_iterator_init_method(
-               struct bt_component_class *component_class,
-               bt_component_class_notification_iterator_init_method notification_iterator_init_method);
-
-extern
-int bt_component_class_filter_set_notification_iterator_finalize_method(
-               struct bt_component_class *component_class,
-               bt_component_class_notification_iterator_finalize_method notification_iterator_finalize_method);
-
-extern
-int bt_component_class_filter_set_notification_iterator_seek_time_method(
-               struct bt_component_class *component_class,
-               bt_component_class_notification_iterator_seek_time_method notification_iterator_seek_time_method);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_COMPONENT_CLASS_FILTER_H */
diff --git a/include/babeltrace/component/component-class-internal.h b/include/babeltrace/component/component-class-internal.h
deleted file mode 100644 (file)
index 1cafef6..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_COMPONENT_CLASS_INTERNAL_H
-#define BABELTRACE_COMPONENT_COMPONENT_CLASS_INTERNAL_H
-
-/*
- * BabelTrace - Component Class Internal
- *
- * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/component/component.h>
-#include <babeltrace/component/component-class.h>
-#include <babeltrace/component/component-class-source.h>
-#include <babeltrace/component/component-class-filter.h>
-#include <babeltrace/component/component-class-sink.h>
-#include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/object-internal.h>
-#include <stdbool.h>
-#include <glib.h>
-
-struct bt_component_class;
-
-typedef void (*bt_component_class_destroy_listener_func)(
-               struct bt_component_class *class, void *data);
-
-struct bt_component_class_destroy_listener {
-       bt_component_class_destroy_listener_func func;
-       void *data;
-};
-
-struct bt_component_class {
-       struct bt_object base;
-       enum bt_component_class_type type;
-       GString *name;
-       GString *description;
-       GString *help;
-       struct {
-               bt_component_class_init_method init;
-               bt_component_class_finalize_method finalize;
-               bt_component_class_query_method query;
-               bt_component_class_accept_port_connection_method accept_port_connection;
-               bt_component_class_port_disconnected_method port_disconnected;
-       } methods;
-       /* Array of struct bt_component_class_destroy_listener */
-       GArray *destroy_listeners;
-       bool frozen;
-};
-
-struct bt_component_class_iterator_methods {
-       bt_component_class_notification_iterator_init_method init;
-       bt_component_class_notification_iterator_finalize_method finalize;
-       bt_component_class_notification_iterator_next_method next;
-       bt_component_class_notification_iterator_seek_time_method seek_time;
-};
-
-struct bt_component_class_source {
-       struct bt_component_class parent;
-       struct {
-               struct bt_component_class_iterator_methods iterator;
-       } methods;
-};
-
-struct bt_component_class_sink {
-       struct bt_component_class parent;
-       struct {
-               bt_component_class_sink_consume_method consume;
-       } methods;
-};
-
-struct bt_component_class_filter {
-       struct bt_component_class parent;
-       struct {
-               struct bt_component_class_iterator_methods iterator;
-       } methods;
-};
-
-BT_HIDDEN
-int bt_component_class_add_destroy_listener(struct bt_component_class *class,
-               bt_component_class_destroy_listener_func func, void *data);
-
-#endif /* BABELTRACE_COMPONENT_COMPONENT_CLASS_INTERNAL_H */
diff --git a/include/babeltrace/component/component-class-sink.h b/include/babeltrace/component/component-class-sink.h
deleted file mode 100644 (file)
index b93b51d..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_COMPONENT_CLASS_SINK_H
-#define BABELTRACE_COMPONENT_COMPONENT_CLASS_SINK_H
-
-/*
- * Babeltrace - Component Class Interface.
- *
- * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/component/private-component.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_component_class;
-
-typedef enum bt_component_status (*bt_component_class_sink_consume_method)(
-        struct bt_private_component *private_component);
-
-extern
-struct bt_component_class *bt_component_class_sink_create(const char *name,
-               bt_component_class_sink_consume_method consume_method);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_COMPONENT_CLASS_SINK_H */
diff --git a/include/babeltrace/component/component-class-source.h b/include/babeltrace/component/component-class-source.h
deleted file mode 100644 (file)
index a6de3ae..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_COMPONENT_CLASS_SOURCE_H
-#define BABELTRACE_COMPONENT_COMPONENT_CLASS_SOURCE_H
-
-/*
- * Babeltrace - Component Class Interface.
- *
- * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/component/component.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_component_class;
-
-extern
-struct bt_component_class *bt_component_class_source_create(const char *name,
-               bt_component_class_notification_iterator_next_method notification_iterator_next_method);
-
-extern
-int bt_component_class_source_set_notification_iterator_init_method(
-               struct bt_component_class *component_class,
-               bt_component_class_notification_iterator_init_method notification_iterator_init_method);
-
-extern
-int bt_component_class_source_set_notification_iterator_finalize_method(
-               struct bt_component_class *component_class,
-               bt_component_class_notification_iterator_finalize_method notification_iterator_finalize_method);
-
-extern
-int bt_component_class_source_set_notification_iterator_seek_time_method(
-               struct bt_component_class *component_class,
-               bt_component_class_notification_iterator_seek_time_method notification_iterator_seek_time_method);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_COMPONENT_CLASS_SOURCE_H */
diff --git a/include/babeltrace/component/component-class.h b/include/babeltrace/component/component-class.h
deleted file mode 100644 (file)
index a5bfee8..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_COMPONENT_CLASS_H
-#define BABELTRACE_COMPONENT_COMPONENT_CLASS_H
-
-/*
- * Babeltrace - Component Class Interface.
- *
- * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/component/component.h>
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_component_class;
-struct bt_component;
-struct bt_private_component;
-struct bt_private_port;
-struct bt_port;
-struct bt_value;
-struct bt_private_notification_iterator;
-
-/**
- * Component class type.
- */
-enum bt_component_class_type {
-       BT_COMPONENT_CLASS_TYPE_UNKNOWN =       -1,
-
-       /** A source component is a notification generator. */
-       BT_COMPONENT_CLASS_TYPE_SOURCE =        0,
-
-       /** A sink component handles incoming notifications. */
-       BT_COMPONENT_CLASS_TYPE_SINK =          1,
-
-       /** A filter component implements both Source and Sink interfaces. */
-       BT_COMPONENT_CLASS_TYPE_FILTER =        2,
-};
-
-typedef enum bt_component_status (*bt_component_class_init_method)(
-               struct bt_private_component *private_component,
-               struct bt_value *params, void *init_method_data);
-
-typedef void (*bt_component_class_finalize_method)(
-               struct bt_private_component *private_component);
-
-typedef enum bt_notification_iterator_status
-               (*bt_component_class_notification_iterator_init_method)(
-               struct bt_private_notification_iterator *private_notification_iterator,
-               struct bt_private_port *private_port);
-
-typedef void (*bt_component_class_notification_iterator_finalize_method)(
-               struct bt_private_notification_iterator *private_notification_iterator);
-
-typedef struct bt_notification_iterator_next_return (*bt_component_class_notification_iterator_next_method)(
-               struct bt_private_notification_iterator *private_notification_iterator);
-
-typedef enum bt_notification_iterator_status
-               (*bt_component_class_notification_iterator_seek_time_method)(
-               struct bt_private_notification_iterator *private_notification_iterator,
-               int64_t time);
-
-typedef struct bt_value *(*bt_component_class_query_method)(
-               struct bt_component_class *component_class,
-               const char *object, struct bt_value *params);
-
-typedef enum bt_component_status (*bt_component_class_accept_port_connection_method)(
-               struct bt_private_component *private_component,
-               struct bt_private_port *self_private_port,
-               struct bt_port *other_port);
-
-typedef void (*bt_component_class_port_disconnected_method)(
-               struct bt_private_component *private_component,
-               struct bt_private_port *private_port);
-
-extern int bt_component_class_set_init_method(
-               struct bt_component_class *component_class,
-               bt_component_class_init_method init_method);
-
-extern int bt_component_class_set_finalize_method(
-               struct bt_component_class *component_class,
-               bt_component_class_finalize_method finalize_method);
-
-extern int bt_component_class_set_accept_port_connection_method(
-               struct bt_component_class *component_class,
-               bt_component_class_accept_port_connection_method accept_port_connection_method);
-
-extern int bt_component_class_set_port_disconnected_method(
-               struct bt_component_class *component_class,
-               bt_component_class_port_disconnected_method port_disconnected_method);
-
-extern int bt_component_class_set_query_method(
-               struct bt_component_class *component_class,
-               bt_component_class_query_method query_method);
-
-extern int bt_component_class_set_description(
-               struct bt_component_class *component_class,
-               const char *description);
-
-extern int bt_component_class_set_help(
-               struct bt_component_class *component_class,
-               const char *help);
-
-extern int bt_component_class_freeze(
-               struct bt_component_class *component_class);
-
-/**
- * Get a component class' name.
- *
- * @param component_class      Component class of which to get the name
- * @returns                    Name of the component class
- */
-extern const char *bt_component_class_get_name(
-               struct bt_component_class *component_class);
-
-/**
- * Get a component class' description.
- *
- * Component classes may provide an optional description. It may, however,
- * opt not to.
- *
- * @param component_class      Component class of which to get the description
- * @returns                    Description of the component class, or NULL.
- */
-extern const char *bt_component_class_get_description(
-               struct bt_component_class *component_class);
-
-extern const char *bt_component_class_get_help(
-               struct bt_component_class *component_class);
-
-extern struct bt_value *bt_component_class_query(
-               struct bt_component_class *component_class,
-               const char *object, struct bt_value *params);
-
-/**
- * Get a component class' type.
- *
- * @param component_class      Component class of which to get the type
- * @returns                    One of #bt_component_type
- */
-extern enum bt_component_class_type bt_component_class_get_type(
-               struct bt_component_class *component_class);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_COMPONENT_CLASS_H */
diff --git a/include/babeltrace/component/component-filter-internal.h b/include/babeltrace/component/component-filter-internal.h
deleted file mode 100644 (file)
index 71690ca..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_FILTER_INTERNAL_H
-#define BABELTRACE_COMPONENT_FILTER_INTERNAL_H
-
-/*
- * BabelTrace - Filter Component Internal
- *
- * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/babeltrace-internal.h>
-#include <babeltrace/component/component-internal.h>
-#include <babeltrace/component/component-class-internal.h>
-
-struct bt_value;
-
-struct bt_component_filter {
-       struct bt_component parent;
-};
-
-/**
- * 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);
-
-BT_HIDDEN
-void bt_component_filter_destroy(struct bt_component *component);
-
-/**
- * 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
deleted file mode 100644 (file)
index 6f42d4e..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_FILTER_H
-#define BABELTRACE_COMPONENT_FILTER_H
-
-/*
- * BabelTrace - Filter Plug-in Interface
- *
- * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <stdint.h>
-#include <babeltrace/component/component.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_port;
-struct bt_component;
-
-extern enum bt_component_status bt_component_filter_get_input_port_count(
-               struct bt_component *component, uint64_t *count);
-extern struct bt_port *bt_component_filter_get_input_port(
-               struct bt_component *component, const char *name);
-extern struct bt_port *bt_component_filter_get_input_port_at_index(
-               struct bt_component *component, int index);
-extern struct bt_port *bt_component_filter_get_default_input_port(
-               struct bt_component *component);
-
-extern enum bt_component_status bt_component_filter_get_output_port_count(
-               struct bt_component *component, uint64_t *count);
-extern struct bt_port *bt_component_filter_get_output_port(
-               struct bt_component *component, const char *name);
-extern struct bt_port *bt_component_filter_get_output_port_at_index(
-               struct bt_component *component, int index);
-extern struct bt_port *bt_component_filter_get_default_output_port(
-               struct bt_component *component);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_FILTER_H */
diff --git a/include/babeltrace/component/component-internal.h b/include/babeltrace/component/component-internal.h
deleted file mode 100644 (file)
index 744fb0d..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_COMPONENT_INTERNAL_H
-#define BABELTRACE_COMPONENT_COMPONENT_INTERNAL_H
-
-/*
- * BabelTrace - Component internal
- *
- * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/babeltrace-internal.h>
-#include <babeltrace/component/component.h>
-#include <babeltrace/component/component-class-internal.h>
-#include <babeltrace/component/port-internal.h>
-#include <babeltrace/object-internal.h>
-#include <glib.h>
-#include <stdio.h>
-
-#define DEFAULT_INPUT_PORT_NAME                "default"
-#define DEFAULT_OUTPUT_PORT_NAME       "default"
-
-struct bt_component {
-       struct bt_object base;
-       struct bt_component_class *class;
-       GString *name;
-
-       /*
-        * Internal destroy function specific to a source, filter, or
-        * sink component object.
-        */
-       void (*destroy)(struct bt_component *);
-
-       /* User-defined data */
-       void *user_data;
-
-       /*
-        * Used to protect operations which may only be used during
-        * a component's initialization.
-        */
-       bool initializing;
-
-       /* Input and output ports (weak references) */
-       GPtrArray *input_ports;
-       GPtrArray *output_ports;
-};
-
-static inline
-struct bt_component *bt_component_from_private(
-               struct bt_private_component *private_component)
-{
-       return (void *) private_component;
-}
-
-static inline
-struct bt_private_component *bt_private_component_from_component(
-               struct bt_component *component)
-{
-       return (void *) component;
-}
-
-BT_HIDDEN
-enum bt_component_status bt_component_accept_port_connection(
-               struct bt_component *component, struct bt_port *self_port,
-               struct bt_port *other_port);
-
-BT_HIDDEN
-void bt_component_port_disconnected(struct bt_component *comp,
-               struct bt_port *port);
-
-BT_HIDDEN
-void bt_component_set_graph(struct bt_component *component,
-               struct bt_graph *graph);
-
-BT_HIDDEN
-uint64_t bt_component_get_input_port_count(struct bt_component *comp);
-
-BT_HIDDEN
-uint64_t bt_component_get_output_port_count(struct bt_component *comp);
-
-BT_HIDDEN
-struct bt_port *bt_component_get_input_port_at_index(struct bt_component *comp,
-               int index);
-
-BT_HIDDEN
-struct bt_port *bt_component_get_output_port_at_index(struct bt_component *comp,
-               int index);
-
-BT_HIDDEN
-struct bt_port *bt_component_get_input_port(struct bt_component *comp,
-               const char *name);
-
-BT_HIDDEN
-struct bt_port *bt_component_get_output_port(struct bt_component *comp,
-               const char *name);
-
-BT_HIDDEN
-struct bt_port *bt_component_add_input_port(
-               struct bt_component *component, const char *name);
-
-BT_HIDDEN
-struct bt_port *bt_component_add_output_port(
-               struct bt_component *component, const char *name);
-
-BT_HIDDEN
-enum bt_component_status bt_component_remove_port(
-               struct bt_component *component, struct bt_port *port);
-
-#endif /* BABELTRACE_COMPONENT_COMPONENT_INTERNAL_H */
diff --git a/include/babeltrace/component/component-sink-internal.h b/include/babeltrace/component/component-sink-internal.h
deleted file mode 100644 (file)
index 465fa54..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_SINK_INTERNAL_H
-#define BABELTRACE_COMPONENT_SINK_INTERNAL_H
-
-/*
- * BabelTrace - Sink Component internal
- *
- * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/babeltrace-internal.h>
-#include <babeltrace/component/component-sink.h>
-#include <babeltrace/component/component-internal.h>
-#include <babeltrace/component/component-class-internal.h>
-
-struct bt_value;
-
-//typedef uint32_t notification_mask_t;
-
-struct bt_component_sink {
-       struct bt_component parent;
-};
-
-/**
- * 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);
-
-BT_HIDDEN
-void bt_component_sink_destroy(struct bt_component *component);
-
-/**
- * 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);
-
-/**
- * Process one event, consuming from sources as needed.
- *
- * @param component    Component instance
- * @returns            One of #bt_component_status values
- */
-BT_HIDDEN
-enum bt_component_status bt_component_sink_consume(
-               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
deleted file mode 100644 (file)
index 924f8c7..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_SINK_H
-#define BABELTRACE_COMPONENT_SINK_H
-
-/*
- * BabelTrace - Sink Component Interface
- *
- * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/component/component.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_component;
-struct bt_notification;
-
-extern enum bt_component_status bt_component_sink_get_input_port_count(
-               struct bt_component *component, uint64_t *count);
-extern struct bt_port *bt_component_sink_get_input_port(
-               struct bt_component *component, const char *name);
-extern struct bt_port *bt_component_sink_get_input_port_at_index(
-               struct bt_component *component, int index);
-extern struct bt_port *bt_component_sink_get_default_input_port(
-               struct bt_component *component);
-
-#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
deleted file mode 100644 (file)
index 0a68e8a..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_SOURCE_INTERNAL_H
-#define BABELTRACE_COMPONENT_SOURCE_INTERNAL_H
-
-/*
- * BabelTrace - Source Component internal
- *
- * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/babeltrace-internal.h>
-#include <babeltrace/component/component-internal.h>
-#include <babeltrace/component/component-class-internal.h>
-
-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);
-
-BT_HIDDEN
-void bt_component_source_destroy(struct bt_component *component);
-
-/**
- * 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
deleted file mode 100644 (file)
index 94ebf70..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_SOURCE_H
-#define BABELTRACE_COMPONENT_SOURCE_H
-
-/*
- * BabelTrace - Source Plug-in Interface
- *
- * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <stdint.h>
-#include <babeltrace/component/component.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_component;
-struct bt_notification_iterator;
-
-extern enum bt_component_status bt_component_source_get_output_port_count(
-               struct bt_component *component, uint64_t *count);
-extern struct bt_port *bt_component_source_get_output_port(
-               struct bt_component *component, const char *name);
-extern struct bt_port *bt_component_source_get_output_port_at_index(
-               struct bt_component *component, int index);
-extern struct bt_port *bt_component_source_get_default_output_port(
-               struct bt_component *component);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_SOURCE_H */
diff --git a/include/babeltrace/component/component.h b/include/babeltrace/component/component.h
deleted file mode 100644 (file)
index 1d88496..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_COMPONENT_H
-#define BABELTRACE_COMPONENT_COMPONENT_H
-
-/*
- * BabelTrace - Babeltrace Component Interface
- *
- * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/component/component-class.h>
-#include <babeltrace/component/notification/iterator.h>
-#include <babeltrace/values.h>
-#include <stdio.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_component_class;
-struct bt_component_graph;
-struct bt_component;
-struct bt_value;
-struct bt_port;
-
-/**
- * Status code. Errors are always negative.
- */
-enum bt_component_status {
-       /** No error, okay. */
-       BT_COMPONENT_STATUS_OK                          = 0,
-       /** No more work to be done by this component. **/
-       BT_COMPONENT_STATUS_END                         = 1,
-       /**
-        * Component can't process a notification at this time
-        * (e.g. would block), try again later.
-        */
-       BT_COMPONENT_STATUS_AGAIN                       = 2,
-       /** Refuse port connection. */
-       BT_COMPONENT_STATUS_REFUSE_PORT_CONNECTION      = 3,
-       /** General error. */
-       BT_COMPONENT_STATUS_ERROR                       = -1,
-       /** Unsupported component feature. */
-       BT_COMPONENT_STATUS_UNSUPPORTED                 = -2,
-       /** Invalid arguments. */
-       BT_COMPONENT_STATUS_INVALID                     = -3,
-       /** Memory allocation failure. */
-       BT_COMPONENT_STATUS_NOMEM                       = -4,
-       /** Element not found. */
-       BT_COMPONENT_STATUS_NOT_FOUND                   = -5,
-};
-
-/**
- * Create an instance of a component from a component class.
- *
- * @param component_class      Component class of which to create an instance
- * @param name                 Name of the new component instance, optional
- * @param params               A dictionary of component parameters
- * @returns                    Returns a pointer to a new component instance
- */
-extern struct bt_component *bt_component_create(
-               struct bt_component_class *component_class, const char *name,
-               struct bt_value *params);
-
-extern struct bt_component *bt_component_create_with_init_method_data(
-               struct bt_component_class *component_class, const char *name,
-               struct bt_value *params, void *init_method_data);
-
-/**
- * Get component's name.
- *
- * @param component    Component instance of which to get the name
- * @returns            Returns a pointer to the component's name
- */
-extern const char *bt_component_get_name(struct bt_component *component);
-
-/**
- * Get component's class.
- *
- * @param component    Component instance of which to get the class
- * @returns            The component's class
- */
-extern struct bt_component_class *bt_component_get_class(
-               struct bt_component *component);
-
-extern enum bt_component_class_type bt_component_get_class_type(
-               struct bt_component *component);
-
-extern struct bt_graph *bt_component_get_graph(struct bt_component *component);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_COMPONENT_H */
diff --git a/include/babeltrace/component/connection-internal.h b/include/babeltrace/component/connection-internal.h
deleted file mode 100644 (file)
index 10533af..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_CONNECTION_INTERNAL_H
-#define BABELTRACE_COMPONENT_CONNECTION_INTERNAL_H
-
-/*
- * BabelTrace - Component Connection Internal
- *
- * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/component/connection.h>
-#include <babeltrace/component/private-connection.h>
-#include <babeltrace/object-internal.h>
-
-struct bt_graph;
-
-struct bt_connection {
-       /*
-        * The graph is a connection's parent and the connection is the parent
-        * of all iterators it has created.
-        */
-       struct bt_object base;
-       /*
-        * Weak references are held to both ports. Their existence is guaranteed
-        * by the existence of the graph and thus, of their respective
-        * components.
-        */
-       /* Downstream port. */
-       struct bt_port *downstream_port;
-       /* Upstream port. */
-       struct bt_port *upstream_port;
-};
-
-static inline
-struct bt_connection *bt_connection_from_private(
-               struct bt_private_connection *private_connection)
-{
-       return (void *) private_connection;
-}
-
-static inline
-struct bt_private_connection *bt_private_connection_from_connection(
-               struct bt_connection *connection)
-{
-       return (void *) connection;
-}
-
-BT_HIDDEN
-struct bt_connection *bt_connection_create(struct bt_graph *graph,
-               struct bt_port *upstream_port,
-               struct bt_port *downstream_port);
-
-BT_HIDDEN
-void bt_connection_disconnect_ports(struct bt_connection *conn,
-               struct bt_component *comp);
-
-#endif /* BABELTRACE_COMPONENT_CONNECTION_INTERNAL_H */
diff --git a/include/babeltrace/component/connection.h b/include/babeltrace/component/connection.h
deleted file mode 100644 (file)
index 4fe1d4c..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_CONNECTION_H
-#define BABELTRACE_COMPONENT_CONNECTION_H
-
-/*
- * BabelTrace - Babeltrace Component Connection Interface
- *
- * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_component;
-struct bt_connection;
-
-/* Returns the "downstream" input port. */
-extern struct bt_port *bt_connection_get_downstream_port(
-               struct bt_connection *connection);
-/* Returns the "upstream" output port. */
-extern struct bt_port *bt_connection_get_upstream_port(
-               struct bt_connection *connection);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_CONNECTION_H */
diff --git a/include/babeltrace/component/graph-internal.h b/include/babeltrace/component/graph-internal.h
deleted file mode 100644 (file)
index 0084628..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_COMPONENT_GRAPH_INTERNAL_H
-#define BABELTRACE_COMPONENT_COMPONENT_GRAPH_INTERNAL_H
-
-/*
- * BabelTrace - Component Graph Internal
- *
- * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/component/graph.h>
-#include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/object-internal.h>
-#include <glib.h>
-
-struct bt_component;
-struct bt_port;
-
-struct bt_graph {
-       /**
-        * A component graph contains components and point-to-point connection
-        * between these components.
-        *
-        * In terms of ownership:
-        * 1) The graph is the components' parent,
-        * 2) The graph is the connnections' parent,
-        * 3) Components share the ownership of their connections,
-        * 4) A connection holds weak references to its two component endpoints.
-        */
-       struct bt_object base;
-
-       /* Array of pointers to bt_connection. */
-       GPtrArray *connections;
-       /* Array of pointers to bt_component. */
-       GPtrArray *components;
-       /* Queue of pointers (weak references) to sink bt_components. */
-       GQueue *sinks_to_consume;
-
-       struct {
-               GArray *port_added;
-               GArray *port_removed;
-               GArray *port_connected;
-               GArray *port_disconnected;
-       } listeners;
-};
-
-BT_HIDDEN
-void bt_graph_notify_port_added(struct bt_graph *graph, struct bt_port *port);
-
-BT_HIDDEN
-void bt_graph_notify_port_removed(struct bt_graph *graph,
-               struct bt_component *comp, struct bt_port *port);
-
-BT_HIDDEN
-void bt_graph_notify_port_connected(struct bt_graph *graph,
-               struct bt_port *port);
-
-BT_HIDDEN
-void bt_graph_notify_port_disconnected(struct bt_graph *graph,
-               struct bt_component *comp, struct bt_port *port);
-
-#endif /* BABELTRACE_COMPONENT_COMPONENT_GRAPH_INTERNAL_H */
diff --git a/include/babeltrace/component/graph.h b/include/babeltrace/component/graph.h
deleted file mode 100644 (file)
index 2d62484..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_GRAPH_H
-#define BABELTRACE_COMPONENT_GRAPH_H
-
-/*
- * BabelTrace - Babeltrace Graph Interface
- *
- * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/component/component.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_port;
-struct bt_connection;
-
-enum bt_graph_status {
-       /** No sink can consume at the moment. */
-       BT_GRAPH_STATUS_AGAIN = 2,
-       /** Downstream component does not support multiple inputs. */
-       BT_GRAPH_STATUS_END = 1,
-       BT_GRAPH_STATUS_OK = 0,
-       /** Downstream component does not support multiple inputs. */
-       BT_GRAPH_STATUS_MULTIPLE_INPUTS_UNSUPPORTED = -1,
-       /** Component is already part of another graph. */
-       BT_GRAPH_STATUS_ALREADY_IN_A_GRAPH = -2,
-       /** Invalid arguments. */
-       BT_GRAPH_STATUS_INVALID = -3,
-       /** No sink in graph. */
-       BT_GRAPH_STATUS_NO_SINK = -4,
-       /** General error. */
-       BT_GRAPH_STATUS_ERROR = -5,
-};
-
-typedef void (*bt_graph_port_added_listener)(struct bt_port *port,
-               void *data);
-typedef void (*bt_graph_port_removed_listener)(struct bt_component *component,
-               struct bt_port *port, void *data);
-typedef void (*bt_graph_port_connected_listener)(struct bt_port *port,
-               void *data);
-typedef void (*bt_graph_port_disconnected_listener)(
-               struct bt_component *component, struct bt_port *port,
-               void *data);
-
-extern struct bt_graph *bt_graph_create(void);
-
-/**
- * Creates a connection between two components using the two ports specified
- * and adds the connection and components (if not already added) to the graph.
- */
-extern struct bt_connection *bt_graph_connect(struct bt_graph *graph,
-               struct bt_port *upstream,
-               struct bt_port *downstream);
-
-/**
- * Add a component as a "sibling" of the origin component. Sibling share
- * connections equivalent to each other at the time of connection (same
- * upstream and downstream ports).
- */
-extern enum bt_graph_status bt_graph_add_component_as_sibling(
-               struct bt_graph *graph, struct bt_component *origin,
-               struct bt_component *new_component);
-
-/**
- * Run graph to completion or until a single sink is left and "AGAIN" is received.
- *
- * Runs "bt_component_sink_consume()" on all sinks in round-robin until they all
- * indicate that the end is reached or that an error occured.
- */
-extern enum bt_graph_status bt_graph_run(struct bt_graph *graph);
-
-/**
- * Runs "bt_component_sink_consume()" on the graph's sinks. Each invokation will
- * invoke "bt_component_sink_consume()" on the next sink, in round-robin, until
- * they all indicated that the end is reached.
- */
-extern enum bt_graph_status bt_graph_consume(struct bt_graph *graph);
-
-extern enum bt_graph_status bt_graph_add_port_added_listener(
-               struct bt_graph *graph,
-               bt_graph_port_added_listener listener, void *data);
-
-extern enum bt_graph_status bt_graph_add_port_removed_listener(
-               struct bt_graph *graph,
-               bt_graph_port_removed_listener listener, void *data);
-
-extern enum bt_graph_status bt_graph_add_port_connected_listener(
-               struct bt_graph *graph,
-               bt_graph_port_connected_listener listener, void *data);
-
-extern enum bt_graph_status bt_graph_add_port_disconnected_listener(
-               struct bt_graph *graph,
-               bt_graph_port_disconnected_listener listener, void *data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_GRAPH_H */
diff --git a/include/babeltrace/component/notification/eot-internal.h b/include/babeltrace/component/notification/eot-internal.h
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/include/babeltrace/component/notification/eot.h b/include/babeltrace/component/notification/eot.h
deleted file mode 100644 (file)
index 4c3626c..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_NOTIFICATION_EOT_H
-#define BABELTRACE_COMPONENT_NOTIFICATION_EOT_H
-
-/*
- * BabelTrace - Plug-in End of Trace Notification
- *
- * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_NOTIFICATION_EOT_H */
diff --git a/include/babeltrace/component/notification/event-internal.h b/include/babeltrace/component/notification/event-internal.h
deleted file mode 100644 (file)
index 3db8ffd..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_NOTIFICATION_EVENT_INTERNAL_H
-#define BABELTRACE_COMPONENT_NOTIFICATION_EVENT_INTERNAL_H
-
-/*
- * BabelTrace - Plug-in Event Notification internal
- *
- * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/ctf-ir/event.h>
-#include <babeltrace/component/notification/notification-internal.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_notification_event {
-       struct bt_notification parent;
-       struct bt_ctf_event *event;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACECOMPONENTPLUGIN_NOTIFICATION_EVENT_INTERNAL_H */
diff --git a/include/babeltrace/component/notification/event.h b/include/babeltrace/component/notification/event.h
deleted file mode 100644 (file)
index e5947b7..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_NOTIFICATION_EVENT_H
-#define BABELTRACE_COMPONENT_NOTIFICATION_EVENT_H
-
-/*
- * BabelTrace - Plug-in Event Notification
- *
- * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_notification;
-struct bt_ctf_event;
-
-/***BT_NOTIFICATION_TYPE_EVENT ***/
-/**
- * Create an event notification.
- *
- * @param event                        The event
- * @returns                    An event notification instance
- *
- * @see #bt_notification_type
- */
-extern struct bt_notification *bt_notification_event_create(
-               struct bt_ctf_event *event);
-
-/**
- * Get an event notification's event.
- *
- * @param notification Event notification instance
- * @returns            An event instance
- *
- * @see #bt_ctf_event
- */
-extern struct bt_ctf_event *bt_notification_event_get_event(
-               struct bt_notification *notification);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_NOTIFICATION_EVENT_H */
diff --git a/include/babeltrace/component/notification/heap-internal.h b/include/babeltrace/component/notification/heap-internal.h
deleted file mode 100644 (file)
index 8603780..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_NOTIFICATION_HEAP_INTERNAL_H
-#define BABELTRACE_COMPONENT_NOTIFICATION_HEAP_INTERNAL_H
-
-/*
- * Babeltrace - CTF notification heap priority heap
- *
- * Copyright (c) 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/object-internal.h>
-#include <babeltrace/component/notification/heap.h>
-#include <babeltrace/component/notification/notification.h>
-#include <glib.h>
-
-struct bt_notification_heap {
-       struct bt_object base;
-       GPtrArray *ptrs;
-       size_t count;
-       bt_notification_time_compare_func compare;
-       void *compare_data;
-};
-
-#endif /* BABELTRACE_COMPONENT_NOTIFICATION_HEAP_INTERNAL_H */
diff --git a/include/babeltrace/component/notification/heap.h b/include/babeltrace/component/notification/heap.h
deleted file mode 100644 (file)
index 3a5ce6d..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_NOTIFICATION_HEAP_H
-#define BABELTRACE_COMPONENT_NOTIFICATION_HEAP_H
-
-/*
- * Babeltrace - Notification Heap
- *
- * Copyright (c) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- * Copyright (c) 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <stddef.h>
-#include <stdbool.h>
-#include <babeltrace/component/notification/notification.h>
-#include <babeltrace/babeltrace-internal.h>
-
-/**
- * bt_notification_time_compare - Compare two notifications' timestamps
- *
- * Compare two notifications in the time domain. Return true if 'a' happened
- * prior to 'b'. In the case where both notifications are deemed to have
- * happened at the same time, an implementation-defined critarion shall be
- * used to order the notifications. This criterion shall ensure a consistent
- * ordering over multiple runs.
- */
-typedef bool (*bt_notification_time_compare_func)(
-               struct bt_notification *a, struct bt_notification *b,
-               void *user_data);
-
-/**
- * bt_notification_heap_create - create a new bt_notification heap.
- *
- * @comparator: Function to use for notification comparisons.
- *
- * Returns a new notification heap, NULL on error.
- */
-extern struct bt_notification_heap *bt_notification_heap_create(
-               bt_notification_time_compare_func comparator, void *user_data);
-
-/**
- * bt_notification_heap_insert - insert an element into the heap
- *
- * @heap: the heap to be operated on
- * @notification: the notification to add
- *
- * Insert a notification into the heap.
- *
- * Returns 0 on success, a negative value on error.
- */
-extern int bt_notification_heap_insert(struct bt_notification_heap *heap,
-               struct bt_notification *notification);
-
-/**
- * bt_notification_heap_peek - return the element on top of the heap.
- *
- * @heap: the heap to be operated on
- *
- * Returns the top element of the heap, without performing any modification
- * to the heap structure. Returns NULL if the heap is empty. The returned
- * notification must be bt_put() by the caller.
- */
-extern struct bt_notification *bt_notification_heap_peek(
-               struct bt_notification_heap *heap);
-
-/**
- * bt_notification_heap_pop - remove the element sitting on top of the heap.
- * @heap: the heap to be operated on
- *
- * Returns the top element of the heap. The element is removed from the
- * heap. Returns NULL if the heap is empty. The returned notification must be
- * bt_put() by the caller.
- */
-extern struct bt_notification *bt_notification_heap_pop(
-               struct bt_notification_heap *heap);
-
-#endif /* BABELTRACE_COMPONENT_NOTIFICATION_HEAP_H */
diff --git a/include/babeltrace/component/notification/iterator-internal.h b/include/babeltrace/component/notification/iterator-internal.h
deleted file mode 100644 (file)
index b1300f0..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_NOTIFICATION_ITERATOR_INTERNAL_H
-#define BABELTRACE_COMPONENT_NOTIFICATION_ITERATOR_INTERNAL_H
-
-/*
- * BabelTrace - Notification Iterator Internal
- *
- * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/babeltrace-internal.h>
-#include <babeltrace/object-internal.h>
-#include <babeltrace/ref-internal.h>
-#include <babeltrace/component/notification/notification.h>
-#include <babeltrace/component/notification/iterator.h>
-#include <babeltrace/component/notification/private-iterator.h>
-
-struct bt_notification_iterator {
-       struct bt_object base;
-       struct bt_component *component;
-       struct bt_notification *current_notification;
-       void *user_data;
-};
-
-static inline
-struct bt_notification_iterator *bt_notification_iterator_from_private(
-               struct bt_private_notification_iterator *private_notification_iterator)
-{
-       return (void *) private_notification_iterator;
-}
-
-static inline
-struct bt_private_notification_iterator *
-bt_private_notification_iterator_from_notification_iterator(
-               struct bt_notification_iterator *notification_iterator)
-{
-       return (void *) notification_iterator;
-}
-
-/**
- * Allocate a notification iterator.
- *
- * @param component            Component instance
- * @returns                    A notification iterator instance
- */
-BT_HIDDEN
-struct bt_notification_iterator *bt_notification_iterator_create(
-               struct bt_component *component);
-
-/**
- * Validate a notification iterator.
- *
- * @param iterator             Notification iterator instance
- * @returns                    One of #bt_component_status values
- */
-BT_HIDDEN
-enum bt_notification_iterator_status bt_notification_iterator_validate(
-               struct bt_notification_iterator *iterator);
-
-#endif /* BABELTRACE_COMPONENT_NOTIFICATION_ITERATOR_INTERNAL_H */
diff --git a/include/babeltrace/component/notification/iterator.h b/include/babeltrace/component/notification/iterator.h
deleted file mode 100644 (file)
index 8cf2a06..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_NOTIFICATION_ITERATOR_H
-#define BABELTRACE_COMPONENT_NOTIFICATION_ITERATOR_H
-
-/*
- * BabelTrace - Plug-in Notification Iterator
- *
- * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_notification;
-struct bt_notification_iterator;
-
-/**
- * Status code. Errors are always negative.
- */
-enum bt_notification_iterator_status {
-       /** No more notifications to be delivered. */
-       BT_NOTIFICATION_ITERATOR_STATUS_END = 1,
-       /** No error, okay. */
-       BT_NOTIFICATION_ITERATOR_STATUS_OK = 0,
-       /** Invalid arguments. */
-       BT_NOTIFICATION_ITERATOR_STATUS_INVAL = -1,
-       /** General error. */
-       BT_NOTIFICATION_ITERATOR_STATUS_ERROR = -2,
-       /** Out of memory. */
-       BT_NOTIFICATION_ITERATOR_STATUS_NOMEM = -3,
-       /** Unsupported iterator feature. */
-       BT_NOTIFICATION_ITERATOR_STATUS_UNSUPPORTED = -4,
-
-};
-
-/**
- * Notification iterator seek reference.
- */
-enum bt_notification_iterator_seek_origin {
-       /** Seek at a time relative to the beginning of the trace. */
-       BT_NOTIFICATION_ITERATOR_SEEK_ORIGIN_BEGIN = 0,
-
-       /** Seek at a time relative to the current position. */
-       BT_NOTIFICATION_ITERATOR_SEEK_ORIGIN_CURRENT = 1,
-
-       /** Seek at a time relative to the end of the trace. */
-       BT_NOTIFICATION_ITERATOR_SEEK_ORIGIN_END = 2,
-
-       /** Seek at a time relative to EPOCH. */
-       BT_NOTIFICATION_ITERATOR_SEEK_ORIGIN_EPOCH = 3,
-};
-
-struct bt_notification_iterator_next_return {
-       struct bt_notification *notification;
-       enum bt_notification_iterator_status status;
-};
-
-/**
- * Get current notification at iterator's position.
- *
- * This functions will <b>not</b> advance the cursor's position.
- * The returned notification's reference count is already incremented.
- *
- * @param iterator     Iterator instance
- * @returns            Returns a bt_notification instance
- *
- * @see bt_put()
- */
-extern struct bt_notification *bt_notification_iterator_get_notification(
-               struct bt_notification_iterator *iterator);
-
-/**
- * Advance the iterator's position forward.
- *
- * This function can be called repeatedly to iterate through the iterator's
- * associated trace.
- *
- * @param iterator     Iterator instance
- * @returns            Returns a bt_notification instance
- *
- * @see bt_notification_iterator_get_notification()
- */
-extern enum bt_notification_iterator_status
-bt_notification_iterator_next(struct bt_notification_iterator *iterator);
-
-/**
- * Seek iterator to time.
- *
- * Sets the iterator's position for the trace associated with the iterator.
- * The new position is computed by adding \p time to the position specified
- * by \p seek_origin.
- *
- * time is expressed in nanoseconds.
- *
- * @param iterator     Iterator instance
- * @param seek_origin  One of #bt_notification_iterator_seek_type values.
- * @returns            One of #bt_notification_iterator_status values;
- *                     if \iterator does not support seeking,
- *                     #BT_NOTIFICATION_ITERATOR_STATUS_UNSUPPORTED is
- *                     returned.
- *
- * @see bt_notification_iterator_get_notification()
- */
-extern enum bt_notification_iterator_status bt_notification_iterator_seek_time(
-               struct bt_notification_iterator *iterator,
-               enum bt_notification_iterator_seek_origin seek_origin,
-               int64_t time);
-
-extern struct bt_component *bt_notification_iterator_get_component(
-               struct bt_notification_iterator *iterator);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_NOTIFICATION_ITERATOR_H */
diff --git a/include/babeltrace/component/notification/notification-internal.h b/include/babeltrace/component/notification/notification-internal.h
deleted file mode 100644 (file)
index 8f3d055..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_NOTIFICATION_NOTIFICATION_INTERNAL_H
-#define BABELTRACE_COMPONENT_NOTIFICATION_NOTIFICATION_INTERNAL_H
-
-/*
- * BabelTrace - Plug-in Notification internal
- *
- * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/ref-internal.h>
-#include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/object-internal.h>
-#include <babeltrace/component/notification/notification.h>
-#include <babeltrace/ctf-ir/stream.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct bt_ctf_stream *(*get_stream_func)(
-               struct bt_notification *notification);
-
-struct bt_notification {
-       struct bt_object base;
-       enum bt_notification_type type;
-       get_stream_func get_stream;
-};
-
-BT_HIDDEN
-void bt_notification_init(struct bt_notification *notification,
-               enum bt_notification_type type,
-               bt_object_release_func release);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_NOTIFICATION_NOTIFICATION_INTERNAL_H */
diff --git a/include/babeltrace/component/notification/notification.h b/include/babeltrace/component/notification/notification.h
deleted file mode 100644 (file)
index d179733..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_NOTIFICATION_NOTIFICATION_H
-#define BABELTRACE_COMPONENT_NOTIFICATION_NOTIFICATION_H
-
-/*
- * BabelTrace - Plug-in Notification
- *
- * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_notification;
-
-/**
- * Notification types. Unhandled notification types should be ignored.
- */
-enum bt_notification_type {
-       BT_NOTIFICATION_TYPE_UNKNOWN = -1,
-
-       /**
-        * All types of notifications (used to register to notification
-        * delivery).
-        */
-       BT_NOTIFICATION_TYPE_ALL = 0,
-
-       /** Event delivery notification, see event.h */
-       BT_NOTIFICATION_TYPE_EVENT = 1,
-
-       /** Beginning of stream packet notification, see packet.h */
-       BT_NOTIFICATION_TYPE_PACKET_BEGIN = 2,
-
-       /** End of stream packet notification, see packet.h */
-       BT_NOTIFICATION_TYPE_PACKET_END = 3,
-
-       /** End of stream packet notification, see stream.h */
-       BT_NOTIFICATION_TYPE_STREAM_END = 4,
-
-       /** New trace notification, see model.h */
-       BT_NOTIFICATION_TYPE_NEW_TRACE = 5,
-
-       /** New stream class notification, see model.h */
-       BT_NOTIFICATION_TYPE_NEW_STREAM_CLASS = 6,
-
-       /** New event class notification, see model.h */
-       BT_NOTIFICATION_TYPE_NEW_EVENT_CLASS = 7,
-
-       /** End of trace notification, see eot.h */
-       BT_NOTIFICATION_TYPE_END_OF_TRACE = 8,
-
-       BT_NOTIFICATION_TYPE_NR, /* Not part of ABI. */
-};
-
-/**
- * Get a notification's type.
- *
- * @param notification Notification instance
- * @returns            One of #bt_notification_type
- */
-extern enum bt_notification_type bt_notification_get_type(
-               struct bt_notification *notification);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_NOTIFICATION_NOTIFICATION_H */
diff --git a/include/babeltrace/component/notification/packet-internal.h b/include/babeltrace/component/notification/packet-internal.h
deleted file mode 100644 (file)
index 3b7836d..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_NOTIFICATION_PACKET_INTERNAL_H
-#define BABELTRACE_COMPONENT_NOTIFICATION_PACKET_INTERNAL_H
-
-/*
- * BabelTrace - Packet-related Notifications
- *
- * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/ctf-ir/packet.h>
-#include <babeltrace/component/notification/notification-internal.h>
-
-struct bt_notification_packet_begin {
-       struct bt_notification parent;
-       struct bt_ctf_packet *packet;
-};
-
-struct bt_notification_packet_end {
-       struct bt_notification parent;
-       struct bt_ctf_packet *packet;
-};
-
-#endif /* BABELTRACE_COMPONENT_NOTIFICATION_PACKET_INTERNAL_H */
diff --git a/include/babeltrace/component/notification/packet.h b/include/babeltrace/component/notification/packet.h
deleted file mode 100644 (file)
index d457aa2..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_NOTIFICATION_PACKET_H
-#define BABELTRACE_COMPONENT_NOTIFICATION_PACKET_H
-
-/*
- * BabelTrace - Plug-in Packet-related Notifications
- *
- * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/component/notification/notification.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_ctf_packet;
-
-/*** BT_NOTIFICATION_TYPE_PACKET_BEGIN ***/
-struct bt_notification *bt_notification_packet_begin_create(
-               struct bt_ctf_packet *packet);
-struct bt_ctf_packet *bt_notification_packet_begin_get_packet(
-               struct bt_notification *notification);
-
-/*** BT_NOTIFICATION_TYPE_PACKET_END ***/
-struct bt_notification *bt_notification_packet_end_create(
-               struct bt_ctf_packet *packet);
-struct bt_ctf_packet *bt_notification_packet_end_get_packet(
-               struct bt_notification *notification);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_NOTIFICATION_PACKET_H */
diff --git a/include/babeltrace/component/notification/private-iterator.h b/include/babeltrace/component/notification/private-iterator.h
deleted file mode 100644 (file)
index 9cc8c66..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_NOTIFICATION_PRIVATE_ITERATOR_H
-#define BABELTRACE_COMPONENT_NOTIFICATION_PRIVATE_ITERATOR_H
-
-/*
- * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
- *
- * 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:
- * 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.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_connection;
-struct bt_private_port;
-struct bt_private_connection;
-struct bt_private_notification_iterator;
-
-struct bt_notification_iterator *
-bt_notification_iterator_from_private_notification_iterator(
-               struct bt_private_notification_iterator *private_notification_iterator);
-
-extern struct bt_private_component *
-bt_private_notification_iterator_get_private_component(
-               struct bt_private_notification_iterator *private_notification_iterator);
-
-extern enum bt_notification_iterator_status
-bt_private_notification_iterator_set_user_data(
-               struct bt_private_notification_iterator *private_notification_iterator,
-               void *user_data);
-
-extern void *bt_private_notification_iterator_get_user_data(
-               struct bt_private_notification_iterator *private_notification_iterator);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_NOTIFICATION_PRIVATE_ITERATOR_H */
diff --git a/include/babeltrace/component/notification/schema.h b/include/babeltrace/component/notification/schema.h
deleted file mode 100644 (file)
index eb6f09e..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_NOTIFICATION_SCHEMA_H
-#define BABELTRACE_COMPONENT_NOTIFICATION_SCHEMA_H
-
-/*
- * BabelTrace - Plug-in Schema Change Notification
- *
- * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_notification;
-struct bt_ctf_trace;
-struct bt_ctf_stream_class;
-struct bt_ctf_event_class;
-
-/* BT_NOTIFICATION_TYPE_NEW_TRACE */
-/**
- * Create a new trace notification.
- *
- * @param trace                        The new trace
- * @returns                    A new trace notification instance
- *
- * @see #bt_notification_type
- */
-extern struct bt_notification *bt_notification_new_trace_create(
-               struct bt_ctf_trace *trace);
-
-/**
- * Get a new trace notification's associated trace.
- *
- * @param notification New trace notification instance
- * @returns            A trace instance
- *
- * @see #bt_ctf_trace
- */
-extern struct bt_ctf_trace *bt_notification_new_trace_get_trace(
-               struct bt_notification *notification);
-
-
-/* BT_NOTIFICATION_TYPE_NEW_STREAM_CLASS */
-/**
- * Create a new stream class notification.
- *
- * @param trace                        The event's trace
- * @returns                    A new stream class notification instance
- *
- * @see #bt_notification_type
- */
-extern struct bt_notification *bt_notification_new_stream_class_create(
-               struct bt_ctf_stream_class *stream_class);
-
-/**
- * Get a new stream class notification's associated stream class.
- *
- * @param notification New stream class notification instance
- * @returns            A stream class instance
- *
- * @see #bt_ctf_stream_class
- */
-extern struct bt_ctf_trace *bt_notification_new_stream_class_get_stream_class(
-               struct bt_notification *notification);
-
-
-/* BT_NOTIFICATION_TYPE_EVENT_CLASS */
-/**
- * Create a new trace notification.
- *
- * @param trace                        The event's trace
- * @returns                    An event notification instance
- *
- * @see #bt_notification_type
- */
-extern struct bt_notification *bt_notification_new_trace_create(
-               struct bt_ctf_trace *trace);
-
-/**
- * Get a new trace notification's associated trace.
- *
- * @param notification New trace notification instance
- * @returns            A trace instance
- *
- * @see #bt_ctf_trace
- */
-extern struct bt_ctf_trace *bt_notification_new_trace_get_trace(
-               struct bt_notification *notification);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_NOTIFICATION_SCHEMA_H */
diff --git a/include/babeltrace/component/notification/stream-internal.h b/include/babeltrace/component/notification/stream-internal.h
deleted file mode 100644 (file)
index 83c7e24..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_NOTIFICATION_STREAM_INTERNAL_H
-#define BABELTRACE_COMPONENT_NOTIFICATION_STREAM_INTERNAL_H
-
-/*
- * BabelTrace - Stream-related Notifications
- *
- * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/ctf-ir/packet.h>
-#include <babeltrace/component/notification/notification-internal.h>
-
-struct bt_notification_stream_end {
-       struct bt_notification parent;
-       struct bt_ctf_stream *stream;
-};
-
-#endif /* BABELTRACE_COMPONENT_NOTIFICATION_STREAM_INTERNAL_H */
diff --git a/include/babeltrace/component/notification/stream.h b/include/babeltrace/component/notification/stream.h
deleted file mode 100644 (file)
index c33b251..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_NOTIFICATION_STREAM_H
-#define BABELTRACE_COMPONENT_NOTIFICATION_STREAM_H
-
-/*
- * BabelTrace - Plug-in Stream-related Notifications
- *
- * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/component/notification/notification.h>
-#include <babeltrace/ctf-ir/stream.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*** BT_NOTIFICATION_TYPE_STREAM_END ***/
-struct bt_notification *bt_notification_stream_end_create(
-               struct bt_ctf_stream *stream);
-struct bt_ctf_stream *bt_notification_stream_end_get_stream(
-               struct bt_notification *notification);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_NOTIFICATION_STREAM_H */
diff --git a/include/babeltrace/component/port-internal.h b/include/babeltrace/component/port-internal.h
deleted file mode 100644 (file)
index fb4ff72..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_PORT_INTERNAL_H
-#define BABELTRACE_COMPONENT_PORT_INTERNAL_H
-
-/*
- * BabelTrace - Babeltrace Component Port
- *
- * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <babeltrace/component/port.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_port {
-       struct bt_object base;
-       enum bt_port_type type;
-       GString *name;
-       struct bt_connection *connection;
-};
-
-static inline
-struct bt_port *bt_port_from_private(
-               struct bt_private_port *private_port)
-{
-       return (void *) private_port;
-}
-
-static inline
-struct bt_private_port *bt_private_port_from_port(
-               struct bt_port *port)
-{
-       return (void *) port;
-}
-
-BT_HIDDEN
-struct bt_port *bt_port_create(struct bt_component *parent_component,
-               enum bt_port_type type, const char *name);
-
-BT_HIDDEN
-void bt_port_set_connection(struct bt_port *port,
-               struct bt_connection *connection);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_PORT_INTERNAL_H */
diff --git a/include/babeltrace/component/port.h b/include/babeltrace/component/port.h
deleted file mode 100644 (file)
index 9d80244..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_PORT_H
-#define BABELTRACE_COMPONENT_PORT_H
-
-/*
- * BabelTrace - Babeltrace Component Connection Interface
- *
- * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * 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 <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_port;
-struct bt_connection;
-
-enum bt_port_status {
-       BT_PORT_STATUS_OK = 0,
-       BT_PORT_STATUS_ERROR = -1,
-       BT_PORT_STATUS_INVALID = -2,
-};
-
-enum bt_port_type {
-       BT_PORT_TYPE_INPUT = 0,
-       BT_PORT_TYPE_OUTPUT = 1,
-       BT_PORT_TYPE_UNKOWN = -1,
-};
-
-extern const char *BT_DEFAULT_PORT_NAME;
-
-extern const char *bt_port_get_name(struct bt_port *port);
-extern enum bt_port_type bt_port_get_type(struct bt_port *port);
-extern struct bt_connection *bt_port_get_connection(struct bt_port *port);
-extern struct bt_component *bt_port_get_component(struct bt_port *port);
-extern int bt_port_remove_from_component(struct bt_port *port);
-extern int bt_port_disconnect(struct bt_port *port);
-extern int bt_port_is_connected(struct bt_port *port);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_PORT_H */
diff --git a/include/babeltrace/component/private-component-filter.h b/include/babeltrace/component/private-component-filter.h
deleted file mode 100644 (file)
index e54ccc4..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SINK_H
-#define BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SINK_H
-
-/*
- * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
- *
- * 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 <babeltrace/component/component.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_private_component;
-struct bt_private_port;
-
-extern struct bt_private_port *
-bt_private_component_filter_get_output_private_port(
-               struct bt_private_component *private_component,
-               const char *name);
-
-extern struct bt_private_port *
-bt_private_component_filter_get_output_private_port_at_index(
-               struct bt_private_component *private_component, int index);
-
-extern struct bt_private_port *
-bt_private_component_filter_get_default_output_private_port(
-               struct bt_private_component *private_component);
-
-extern struct bt_private_port *
-bt_private_component_filter_add_output_private_port(
-               struct bt_private_component *private_component,
-               const char *name);
-
-extern struct bt_private_port *
-bt_private_component_filter_get_input_private_port(
-               struct bt_private_component *private_component,
-               const char *name);
-
-extern struct bt_private_port *
-bt_private_component_filter_get_input_private_port_at_index(
-               struct bt_private_component *private_component, int index);
-
-extern struct bt_private_port *
-bt_private_component_filter_get_default_input_private_port(
-               struct bt_private_component *private_component);
-
-extern struct bt_private_port *
-bt_private_component_filter_add_input_private_port(
-               struct bt_private_component *private_component,
-               const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SINK_H */
diff --git a/include/babeltrace/component/private-component-sink.h b/include/babeltrace/component/private-component-sink.h
deleted file mode 100644 (file)
index f1ba7a7..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SINK_H
-#define BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SINK_H
-
-/*
- * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
- *
- * 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 <babeltrace/component/component.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_private_component;
-struct bt_private_port;
-
-extern struct bt_private_port *
-bt_private_component_sink_get_input_private_port(
-               struct bt_private_component *private_component,
-               const char *name);
-
-extern struct bt_private_port *
-bt_private_component_sink_get_input_private_port_at_index(
-               struct bt_private_component *private_component, int index);
-
-extern struct bt_private_port *
-bt_private_component_sink_get_default_input_private_port(
-               struct bt_private_component *private_component);
-
-extern struct bt_private_port *
-bt_private_component_sink_add_input_private_port(
-               struct bt_private_component *private_component,
-               const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SINK_H */
diff --git a/include/babeltrace/component/private-component-source.h b/include/babeltrace/component/private-component-source.h
deleted file mode 100644 (file)
index b54bbfb..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SOURCE_H
-#define BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SOURCE_H
-
-/*
- * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
- *
- * 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 <babeltrace/component/component.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_private_component;
-struct bt_private_port;
-
-extern struct bt_private_port *
-bt_private_component_source_get_output_private_port(
-               struct bt_private_component *private_component,
-               const char *name);
-
-extern struct bt_private_port *
-bt_private_component_source_get_output_private_port_at_index(
-               struct bt_private_component *private_component, int index);
-
-extern struct bt_private_port *
-bt_private_component_source_get_default_output_private_port(
-               struct bt_private_component *private_component);
-
-extern struct bt_private_port *
-bt_private_component_source_add_output_private_port(
-               struct bt_private_component *private_component,
-               const char *name);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SOURCE_H */
diff --git a/include/babeltrace/component/private-component.h b/include/babeltrace/component/private-component.h
deleted file mode 100644 (file)
index e19b6ff..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_PRIVATE_COMPONENT_H
-#define BABELTRACE_COMPONENT_PRIVATE_COMPONENT_H
-
-/*
- * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
- *
- * 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 <babeltrace/component/component.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_private_component;
-
-struct bt_component *bt_component_from_private_component(
-               struct bt_private_component *private_component);
-
-extern void *bt_private_component_get_user_data(
-               struct bt_private_component *private_component);
-
-extern enum bt_component_status bt_private_component_set_user_data(
-               struct bt_private_component *private_component,
-               void *user_data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_PRIVATE_COMPONENT_H */
diff --git a/include/babeltrace/component/private-connection.h b/include/babeltrace/component/private-connection.h
deleted file mode 100644 (file)
index 7629460..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_PRIVATE_CONNECTION_H
-#define BABELTRACE_COMPONENT_PRIVATE_CONNECTION_H
-
-/*
- * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
- *
- * 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.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_connection;
-struct bt_private_port;
-struct bt_private_connection;
-
-struct bt_connection *bt_connection_from_private_connection(
-               struct bt_private_connection *private_connection);
-
-extern struct bt_notification_iterator *
-bt_private_connection_create_notification_iterator(
-               struct bt_private_connection *private_connection);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_PRIVATE_CONNECTION_H */
diff --git a/include/babeltrace/component/private-port.h b/include/babeltrace/component/private-port.h
deleted file mode 100644 (file)
index 2f0e49d..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef BABELTRACE_COMPONENT_PRIVATE_PORT_H
-#define BABELTRACE_COMPONENT_PRIVATE_PORT_H
-
-/*
- * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
- *
- * 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.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct bt_port;
-struct bt_private_port;
-struct bt_private_component;
-struct bt_private_connection;
-
-struct bt_port *bt_port_from_private_port(struct bt_private_port *private_port);
-extern struct bt_private_connection *bt_private_port_get_private_connection(
-               struct bt_private_port *private_port);
-extern struct bt_private_component *bt_private_port_get_private_component(
-               struct bt_private_port *private_port);
-extern int bt_private_port_remove_from_component(
-               struct bt_private_port *private_port);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BABELTRACE_COMPONENT_PRIVATE_PORT_H */
index b722d92215f2909082ed88e2d4d44a1a761cbc72..07daabe3adf7fac6c9da0d979a26e9d94181ee7d 100644 (file)
@@ -33,7 +33,7 @@
 #include <babeltrace/ctf-ir/field-types.h>
 #include <babeltrace/ctf-ir/visitor.h>
 #include <babeltrace/values.h>
-#include <babeltrace/component/notification/notification.h>
+#include <babeltrace/graph/notification.h>
 #include <stdint.h>
 
 #ifdef __cplusplus
diff --git a/include/babeltrace/graph/component-class-filter.h b/include/babeltrace/graph/component-class-filter.h
new file mode 100644 (file)
index 0000000..bc30a77
--- /dev/null
@@ -0,0 +1,59 @@
+#ifndef BABELTRACE_COMPONENT_COMPONENT_CLASS_FILTER_H
+#define BABELTRACE_COMPONENT_COMPONENT_CLASS_FILTER_H
+
+/*
+ * Babeltrace - Component Class Interface.
+ *
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/graph/component.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_component_class;
+
+extern
+struct bt_component_class *bt_component_class_filter_create(const char *name,
+               bt_component_class_notification_iterator_next_method notification_iterator_next_method);
+
+extern
+int bt_component_class_filter_set_notification_iterator_init_method(
+               struct bt_component_class *component_class,
+               bt_component_class_notification_iterator_init_method notification_iterator_init_method);
+
+extern
+int bt_component_class_filter_set_notification_iterator_finalize_method(
+               struct bt_component_class *component_class,
+               bt_component_class_notification_iterator_finalize_method notification_iterator_finalize_method);
+
+extern
+int bt_component_class_filter_set_notification_iterator_seek_time_method(
+               struct bt_component_class *component_class,
+               bt_component_class_notification_iterator_seek_time_method notification_iterator_seek_time_method);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_COMPONENT_CLASS_FILTER_H */
diff --git a/include/babeltrace/graph/component-class-internal.h b/include/babeltrace/graph/component-class-internal.h
new file mode 100644 (file)
index 0000000..68a8e0c
--- /dev/null
@@ -0,0 +1,101 @@
+#ifndef BABELTRACE_COMPONENT_COMPONENT_CLASS_INTERNAL_H
+#define BABELTRACE_COMPONENT_COMPONENT_CLASS_INTERNAL_H
+
+/*
+ * BabelTrace - Component Class Internal
+ *
+ * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/graph/component.h>
+#include <babeltrace/graph/component-class.h>
+#include <babeltrace/graph/component-class-source.h>
+#include <babeltrace/graph/component-class-filter.h>
+#include <babeltrace/graph/component-class-sink.h>
+#include <babeltrace/babeltrace-internal.h>
+#include <babeltrace/object-internal.h>
+#include <stdbool.h>
+#include <glib.h>
+
+struct bt_component_class;
+
+typedef void (*bt_component_class_destroy_listener_func)(
+               struct bt_component_class *class, void *data);
+
+struct bt_component_class_destroy_listener {
+       bt_component_class_destroy_listener_func func;
+       void *data;
+};
+
+struct bt_component_class {
+       struct bt_object base;
+       enum bt_component_class_type type;
+       GString *name;
+       GString *description;
+       GString *help;
+       struct {
+               bt_component_class_init_method init;
+               bt_component_class_finalize_method finalize;
+               bt_component_class_query_method query;
+               bt_component_class_accept_port_connection_method accept_port_connection;
+               bt_component_class_port_disconnected_method port_disconnected;
+       } methods;
+       /* Array of struct bt_component_class_destroy_listener */
+       GArray *destroy_listeners;
+       bool frozen;
+};
+
+struct bt_component_class_iterator_methods {
+       bt_component_class_notification_iterator_init_method init;
+       bt_component_class_notification_iterator_finalize_method finalize;
+       bt_component_class_notification_iterator_next_method next;
+       bt_component_class_notification_iterator_seek_time_method seek_time;
+};
+
+struct bt_component_class_source {
+       struct bt_component_class parent;
+       struct {
+               struct bt_component_class_iterator_methods iterator;
+       } methods;
+};
+
+struct bt_component_class_sink {
+       struct bt_component_class parent;
+       struct {
+               bt_component_class_sink_consume_method consume;
+       } methods;
+};
+
+struct bt_component_class_filter {
+       struct bt_component_class parent;
+       struct {
+               struct bt_component_class_iterator_methods iterator;
+       } methods;
+};
+
+BT_HIDDEN
+int bt_component_class_add_destroy_listener(struct bt_component_class *class,
+               bt_component_class_destroy_listener_func func, void *data);
+
+#endif /* BABELTRACE_COMPONENT_COMPONENT_CLASS_INTERNAL_H */
diff --git a/include/babeltrace/graph/component-class-sink.h b/include/babeltrace/graph/component-class-sink.h
new file mode 100644 (file)
index 0000000..e2cf85e
--- /dev/null
@@ -0,0 +1,47 @@
+#ifndef BABELTRACE_COMPONENT_COMPONENT_CLASS_SINK_H
+#define BABELTRACE_COMPONENT_COMPONENT_CLASS_SINK_H
+
+/*
+ * Babeltrace - Component Class Interface.
+ *
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/graph/private-component.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_component_class;
+
+typedef enum bt_component_status (*bt_component_class_sink_consume_method)(
+        struct bt_private_component *private_component);
+
+extern
+struct bt_component_class *bt_component_class_sink_create(const char *name,
+               bt_component_class_sink_consume_method consume_method);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_COMPONENT_CLASS_SINK_H */
diff --git a/include/babeltrace/graph/component-class-source.h b/include/babeltrace/graph/component-class-source.h
new file mode 100644 (file)
index 0000000..6190977
--- /dev/null
@@ -0,0 +1,59 @@
+#ifndef BABELTRACE_COMPONENT_COMPONENT_CLASS_SOURCE_H
+#define BABELTRACE_COMPONENT_COMPONENT_CLASS_SOURCE_H
+
+/*
+ * Babeltrace - Component Class Interface.
+ *
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/graph/component.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_component_class;
+
+extern
+struct bt_component_class *bt_component_class_source_create(const char *name,
+               bt_component_class_notification_iterator_next_method notification_iterator_next_method);
+
+extern
+int bt_component_class_source_set_notification_iterator_init_method(
+               struct bt_component_class *component_class,
+               bt_component_class_notification_iterator_init_method notification_iterator_init_method);
+
+extern
+int bt_component_class_source_set_notification_iterator_finalize_method(
+               struct bt_component_class *component_class,
+               bt_component_class_notification_iterator_finalize_method notification_iterator_finalize_method);
+
+extern
+int bt_component_class_source_set_notification_iterator_seek_time_method(
+               struct bt_component_class *component_class,
+               bt_component_class_notification_iterator_seek_time_method notification_iterator_seek_time_method);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_COMPONENT_CLASS_SOURCE_H */
diff --git a/include/babeltrace/graph/component-class.h b/include/babeltrace/graph/component-class.h
new file mode 100644 (file)
index 0000000..cf031cf
--- /dev/null
@@ -0,0 +1,167 @@
+#ifndef BABELTRACE_COMPONENT_COMPONENT_CLASS_H
+#define BABELTRACE_COMPONENT_COMPONENT_CLASS_H
+
+/*
+ * Babeltrace - Component Class Interface.
+ *
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/graph/component.h>
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_component_class;
+struct bt_component;
+struct bt_private_component;
+struct bt_private_port;
+struct bt_port;
+struct bt_value;
+struct bt_private_notification_iterator;
+
+/**
+ * Component class type.
+ */
+enum bt_component_class_type {
+       BT_COMPONENT_CLASS_TYPE_UNKNOWN =       -1,
+
+       /** A source component is a notification generator. */
+       BT_COMPONENT_CLASS_TYPE_SOURCE =        0,
+
+       /** A sink component handles incoming notifications. */
+       BT_COMPONENT_CLASS_TYPE_SINK =          1,
+
+       /** A filter component implements both Source and Sink interfaces. */
+       BT_COMPONENT_CLASS_TYPE_FILTER =        2,
+};
+
+typedef enum bt_component_status (*bt_component_class_init_method)(
+               struct bt_private_component *private_component,
+               struct bt_value *params, void *init_method_data);
+
+typedef void (*bt_component_class_finalize_method)(
+               struct bt_private_component *private_component);
+
+typedef enum bt_notification_iterator_status
+               (*bt_component_class_notification_iterator_init_method)(
+               struct bt_private_notification_iterator *private_notification_iterator,
+               struct bt_private_port *private_port);
+
+typedef void (*bt_component_class_notification_iterator_finalize_method)(
+               struct bt_private_notification_iterator *private_notification_iterator);
+
+typedef struct bt_notification_iterator_next_return (*bt_component_class_notification_iterator_next_method)(
+               struct bt_private_notification_iterator *private_notification_iterator);
+
+typedef enum bt_notification_iterator_status
+               (*bt_component_class_notification_iterator_seek_time_method)(
+               struct bt_private_notification_iterator *private_notification_iterator,
+               int64_t time);
+
+typedef struct bt_value *(*bt_component_class_query_method)(
+               struct bt_component_class *component_class,
+               const char *object, struct bt_value *params);
+
+typedef enum bt_component_status (*bt_component_class_accept_port_connection_method)(
+               struct bt_private_component *private_component,
+               struct bt_private_port *self_private_port,
+               struct bt_port *other_port);
+
+typedef void (*bt_component_class_port_disconnected_method)(
+               struct bt_private_component *private_component,
+               struct bt_private_port *private_port);
+
+extern int bt_component_class_set_init_method(
+               struct bt_component_class *component_class,
+               bt_component_class_init_method init_method);
+
+extern int bt_component_class_set_finalize_method(
+               struct bt_component_class *component_class,
+               bt_component_class_finalize_method finalize_method);
+
+extern int bt_component_class_set_accept_port_connection_method(
+               struct bt_component_class *component_class,
+               bt_component_class_accept_port_connection_method accept_port_connection_method);
+
+extern int bt_component_class_set_port_disconnected_method(
+               struct bt_component_class *component_class,
+               bt_component_class_port_disconnected_method port_disconnected_method);
+
+extern int bt_component_class_set_query_method(
+               struct bt_component_class *component_class,
+               bt_component_class_query_method query_method);
+
+extern int bt_component_class_set_description(
+               struct bt_component_class *component_class,
+               const char *description);
+
+extern int bt_component_class_set_help(
+               struct bt_component_class *component_class,
+               const char *help);
+
+extern int bt_component_class_freeze(
+               struct bt_component_class *component_class);
+
+/**
+ * Get a component class' name.
+ *
+ * @param component_class      Component class of which to get the name
+ * @returns                    Name of the component class
+ */
+extern const char *bt_component_class_get_name(
+               struct bt_component_class *component_class);
+
+/**
+ * Get a component class' description.
+ *
+ * Component classes may provide an optional description. It may, however,
+ * opt not to.
+ *
+ * @param component_class      Component class of which to get the description
+ * @returns                    Description of the component class, or NULL.
+ */
+extern const char *bt_component_class_get_description(
+               struct bt_component_class *component_class);
+
+extern const char *bt_component_class_get_help(
+               struct bt_component_class *component_class);
+
+extern struct bt_value *bt_component_class_query(
+               struct bt_component_class *component_class,
+               const char *object, struct bt_value *params);
+
+/**
+ * Get a component class' type.
+ *
+ * @param component_class      Component class of which to get the type
+ * @returns                    One of #bt_component_type
+ */
+extern enum bt_component_class_type bt_component_class_get_type(
+               struct bt_component_class *component_class);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_COMPONENT_CLASS_H */
diff --git a/include/babeltrace/graph/component-filter-internal.h b/include/babeltrace/graph/component-filter-internal.h
new file mode 100644 (file)
index 0000000..15db1bb
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef BABELTRACE_COMPONENT_FILTER_INTERNAL_H
+#define BABELTRACE_COMPONENT_FILTER_INTERNAL_H
+
+/*
+ * BabelTrace - Filter Component Internal
+ *
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/babeltrace-internal.h>
+#include <babeltrace/graph/component-internal.h>
+#include <babeltrace/graph/component-class-internal.h>
+
+struct bt_value;
+
+struct bt_component_filter {
+       struct bt_component parent;
+};
+
+/**
+ * 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);
+
+BT_HIDDEN
+void bt_component_filter_destroy(struct bt_component *component);
+
+/**
+ * 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/graph/component-filter.h b/include/babeltrace/graph/component-filter.h
new file mode 100644 (file)
index 0000000..f9e681f
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef BABELTRACE_COMPONENT_FILTER_H
+#define BABELTRACE_COMPONENT_FILTER_H
+
+/*
+ * BabelTrace - Filter Plug-in Interface
+ *
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <stdint.h>
+#include <babeltrace/graph/component.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_port;
+struct bt_component;
+
+extern enum bt_component_status bt_component_filter_get_input_port_count(
+               struct bt_component *component, uint64_t *count);
+extern struct bt_port *bt_component_filter_get_input_port(
+               struct bt_component *component, const char *name);
+extern struct bt_port *bt_component_filter_get_input_port_at_index(
+               struct bt_component *component, int index);
+extern struct bt_port *bt_component_filter_get_default_input_port(
+               struct bt_component *component);
+
+extern enum bt_component_status bt_component_filter_get_output_port_count(
+               struct bt_component *component, uint64_t *count);
+extern struct bt_port *bt_component_filter_get_output_port(
+               struct bt_component *component, const char *name);
+extern struct bt_port *bt_component_filter_get_output_port_at_index(
+               struct bt_component *component, int index);
+extern struct bt_port *bt_component_filter_get_default_output_port(
+               struct bt_component *component);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_FILTER_H */
diff --git a/include/babeltrace/graph/component-internal.h b/include/babeltrace/graph/component-internal.h
new file mode 100644 (file)
index 0000000..4c50ffb
--- /dev/null
@@ -0,0 +1,127 @@
+#ifndef BABELTRACE_COMPONENT_COMPONENT_INTERNAL_H
+#define BABELTRACE_COMPONENT_COMPONENT_INTERNAL_H
+
+/*
+ * BabelTrace - Component internal
+ *
+ * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/babeltrace-internal.h>
+#include <babeltrace/graph/component.h>
+#include <babeltrace/graph/component-class-internal.h>
+#include <babeltrace/graph/port-internal.h>
+#include <babeltrace/object-internal.h>
+#include <glib.h>
+#include <stdio.h>
+
+#define DEFAULT_INPUT_PORT_NAME                "default"
+#define DEFAULT_OUTPUT_PORT_NAME       "default"
+
+struct bt_component {
+       struct bt_object base;
+       struct bt_component_class *class;
+       GString *name;
+
+       /*
+        * Internal destroy function specific to a source, filter, or
+        * sink component object.
+        */
+       void (*destroy)(struct bt_component *);
+
+       /* User-defined data */
+       void *user_data;
+
+       /*
+        * Used to protect operations which may only be used during
+        * a component's initialization.
+        */
+       bool initializing;
+
+       /* Input and output ports (weak references) */
+       GPtrArray *input_ports;
+       GPtrArray *output_ports;
+};
+
+static inline
+struct bt_component *bt_component_from_private(
+               struct bt_private_component *private_component)
+{
+       return (void *) private_component;
+}
+
+static inline
+struct bt_private_component *bt_private_component_from_component(
+               struct bt_component *component)
+{
+       return (void *) component;
+}
+
+BT_HIDDEN
+enum bt_component_status bt_component_accept_port_connection(
+               struct bt_component *component, struct bt_port *self_port,
+               struct bt_port *other_port);
+
+BT_HIDDEN
+void bt_component_port_disconnected(struct bt_component *comp,
+               struct bt_port *port);
+
+BT_HIDDEN
+void bt_component_set_graph(struct bt_component *component,
+               struct bt_graph *graph);
+
+BT_HIDDEN
+uint64_t bt_component_get_input_port_count(struct bt_component *comp);
+
+BT_HIDDEN
+uint64_t bt_component_get_output_port_count(struct bt_component *comp);
+
+BT_HIDDEN
+struct bt_port *bt_component_get_input_port_at_index(struct bt_component *comp,
+               int index);
+
+BT_HIDDEN
+struct bt_port *bt_component_get_output_port_at_index(struct bt_component *comp,
+               int index);
+
+BT_HIDDEN
+struct bt_port *bt_component_get_input_port(struct bt_component *comp,
+               const char *name);
+
+BT_HIDDEN
+struct bt_port *bt_component_get_output_port(struct bt_component *comp,
+               const char *name);
+
+BT_HIDDEN
+struct bt_port *bt_component_add_input_port(
+               struct bt_component *component, const char *name);
+
+BT_HIDDEN
+struct bt_port *bt_component_add_output_port(
+               struct bt_component *component, const char *name);
+
+BT_HIDDEN
+enum bt_component_status bt_component_remove_port(
+               struct bt_component *component, struct bt_port *port);
+
+#endif /* BABELTRACE_COMPONENT_COMPONENT_INTERNAL_H */
diff --git a/include/babeltrace/graph/component-sink-internal.h b/include/babeltrace/graph/component-sink-internal.h
new file mode 100644 (file)
index 0000000..84c37f2
--- /dev/null
@@ -0,0 +1,77 @@
+#ifndef BABELTRACE_COMPONENT_SINK_INTERNAL_H
+#define BABELTRACE_COMPONENT_SINK_INTERNAL_H
+
+/*
+ * BabelTrace - Sink Component internal
+ *
+ * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/babeltrace-internal.h>
+#include <babeltrace/graph/component-sink.h>
+#include <babeltrace/graph/component-internal.h>
+#include <babeltrace/graph/component-class-internal.h>
+
+struct bt_value;
+
+//typedef uint32_t notification_mask_t;
+
+struct bt_component_sink {
+       struct bt_component parent;
+};
+
+/**
+ * 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);
+
+BT_HIDDEN
+void bt_component_sink_destroy(struct bt_component *component);
+
+/**
+ * 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);
+
+/**
+ * Process one event, consuming from sources as needed.
+ *
+ * @param component    Component instance
+ * @returns            One of #bt_component_status values
+ */
+BT_HIDDEN
+enum bt_component_status bt_component_sink_consume(
+               struct bt_component *component);
+
+#endif /* BABELTRACE_COMPONENT_SINK_INTERNAL_H */
diff --git a/include/babeltrace/graph/component-sink.h b/include/babeltrace/graph/component-sink.h
new file mode 100644 (file)
index 0000000..3bbfbb1
--- /dev/null
@@ -0,0 +1,52 @@
+#ifndef BABELTRACE_COMPONENT_SINK_H
+#define BABELTRACE_COMPONENT_SINK_H
+
+/*
+ * BabelTrace - Sink Component Interface
+ *
+ * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/graph/component.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_component;
+struct bt_notification;
+
+extern enum bt_component_status bt_component_sink_get_input_port_count(
+               struct bt_component *component, uint64_t *count);
+extern struct bt_port *bt_component_sink_get_input_port(
+               struct bt_component *component, const char *name);
+extern struct bt_port *bt_component_sink_get_input_port_at_index(
+               struct bt_component *component, int index);
+extern struct bt_port *bt_component_sink_get_default_input_port(
+               struct bt_component *component);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_SINK_H */
diff --git a/include/babeltrace/graph/component-source-internal.h b/include/babeltrace/graph/component-source-internal.h
new file mode 100644 (file)
index 0000000..fa53bf0
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef BABELTRACE_COMPONENT_SOURCE_INTERNAL_H
+#define BABELTRACE_COMPONENT_SOURCE_INTERNAL_H
+
+/*
+ * BabelTrace - Source Component internal
+ *
+ * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/babeltrace-internal.h>
+#include <babeltrace/graph/component-internal.h>
+#include <babeltrace/graph/component-class-internal.h>
+
+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);
+
+BT_HIDDEN
+void bt_component_source_destroy(struct bt_component *component);
+
+/**
+ * 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/graph/component-source.h b/include/babeltrace/graph/component-source.h
new file mode 100644 (file)
index 0000000..165ba0d
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef BABELTRACE_COMPONENT_SOURCE_H
+#define BABELTRACE_COMPONENT_SOURCE_H
+
+/*
+ * BabelTrace - Source Plug-in Interface
+ *
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <stdint.h>
+#include <babeltrace/graph/component.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_component;
+struct bt_notification_iterator;
+
+extern enum bt_component_status bt_component_source_get_output_port_count(
+               struct bt_component *component, uint64_t *count);
+extern struct bt_port *bt_component_source_get_output_port(
+               struct bt_component *component, const char *name);
+extern struct bt_port *bt_component_source_get_output_port_at_index(
+               struct bt_component *component, int index);
+extern struct bt_port *bt_component_source_get_default_output_port(
+               struct bt_component *component);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_SOURCE_H */
diff --git a/include/babeltrace/graph/component.h b/include/babeltrace/graph/component.h
new file mode 100644 (file)
index 0000000..74f3834
--- /dev/null
@@ -0,0 +1,114 @@
+#ifndef BABELTRACE_COMPONENT_COMPONENT_H
+#define BABELTRACE_COMPONENT_COMPONENT_H
+
+/*
+ * BabelTrace - Babeltrace Component Interface
+ *
+ * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/graph/component-class.h>
+#include <babeltrace/graph/notification-iterator.h>
+#include <babeltrace/values.h>
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_component_class;
+struct bt_component_graph;
+struct bt_component;
+struct bt_value;
+struct bt_port;
+
+/**
+ * Status code. Errors are always negative.
+ */
+enum bt_component_status {
+       /** No error, okay. */
+       BT_COMPONENT_STATUS_OK                          = 0,
+       /** No more work to be done by this component. **/
+       BT_COMPONENT_STATUS_END                         = 1,
+       /**
+        * Component can't process a notification at this time
+        * (e.g. would block), try again later.
+        */
+       BT_COMPONENT_STATUS_AGAIN                       = 2,
+       /** Refuse port connection. */
+       BT_COMPONENT_STATUS_REFUSE_PORT_CONNECTION      = 3,
+       /** General error. */
+       BT_COMPONENT_STATUS_ERROR                       = -1,
+       /** Unsupported component feature. */
+       BT_COMPONENT_STATUS_UNSUPPORTED                 = -2,
+       /** Invalid arguments. */
+       BT_COMPONENT_STATUS_INVALID                     = -3,
+       /** Memory allocation failure. */
+       BT_COMPONENT_STATUS_NOMEM                       = -4,
+       /** Element not found. */
+       BT_COMPONENT_STATUS_NOT_FOUND                   = -5,
+};
+
+/**
+ * Create an instance of a component from a component class.
+ *
+ * @param component_class      Component class of which to create an instance
+ * @param name                 Name of the new component instance, optional
+ * @param params               A dictionary of component parameters
+ * @returns                    Returns a pointer to a new component instance
+ */
+extern struct bt_component *bt_component_create(
+               struct bt_component_class *component_class, const char *name,
+               struct bt_value *params);
+
+extern struct bt_component *bt_component_create_with_init_method_data(
+               struct bt_component_class *component_class, const char *name,
+               struct bt_value *params, void *init_method_data);
+
+/**
+ * Get component's name.
+ *
+ * @param component    Component instance of which to get the name
+ * @returns            Returns a pointer to the component's name
+ */
+extern const char *bt_component_get_name(struct bt_component *component);
+
+/**
+ * Get component's class.
+ *
+ * @param component    Component instance of which to get the class
+ * @returns            The component's class
+ */
+extern struct bt_component_class *bt_component_get_class(
+               struct bt_component *component);
+
+extern enum bt_component_class_type bt_component_get_class_type(
+               struct bt_component *component);
+
+extern struct bt_graph *bt_component_get_graph(struct bt_component *component);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_COMPONENT_H */
diff --git a/include/babeltrace/graph/connection-internal.h b/include/babeltrace/graph/connection-internal.h
new file mode 100644 (file)
index 0000000..d22c7ee
--- /dev/null
@@ -0,0 +1,76 @@
+#ifndef BABELTRACE_COMPONENT_CONNECTION_INTERNAL_H
+#define BABELTRACE_COMPONENT_CONNECTION_INTERNAL_H
+
+/*
+ * BabelTrace - Component Connection Internal
+ *
+ * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/graph/connection.h>
+#include <babeltrace/graph/private-connection.h>
+#include <babeltrace/object-internal.h>
+
+struct bt_graph;
+
+struct bt_connection {
+       /*
+        * The graph is a connection's parent and the connection is the parent
+        * of all iterators it has created.
+        */
+       struct bt_object base;
+       /*
+        * Weak references are held to both ports. Their existence is guaranteed
+        * by the existence of the graph and thus, of their respective
+        * components.
+        */
+       /* Downstream port. */
+       struct bt_port *downstream_port;
+       /* Upstream port. */
+       struct bt_port *upstream_port;
+};
+
+static inline
+struct bt_connection *bt_connection_from_private(
+               struct bt_private_connection *private_connection)
+{
+       return (void *) private_connection;
+}
+
+static inline
+struct bt_private_connection *bt_private_connection_from_connection(
+               struct bt_connection *connection)
+{
+       return (void *) connection;
+}
+
+BT_HIDDEN
+struct bt_connection *bt_connection_create(struct bt_graph *graph,
+               struct bt_port *upstream_port,
+               struct bt_port *downstream_port);
+
+BT_HIDDEN
+void bt_connection_disconnect_ports(struct bt_connection *conn,
+               struct bt_component *comp);
+
+#endif /* BABELTRACE_COMPONENT_CONNECTION_INTERNAL_H */
diff --git a/include/babeltrace/graph/connection.h b/include/babeltrace/graph/connection.h
new file mode 100644 (file)
index 0000000..4fe1d4c
--- /dev/null
@@ -0,0 +1,48 @@
+#ifndef BABELTRACE_COMPONENT_CONNECTION_H
+#define BABELTRACE_COMPONENT_CONNECTION_H
+
+/*
+ * BabelTrace - Babeltrace Component Connection Interface
+ *
+ * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_component;
+struct bt_connection;
+
+/* Returns the "downstream" input port. */
+extern struct bt_port *bt_connection_get_downstream_port(
+               struct bt_connection *connection);
+/* Returns the "upstream" output port. */
+extern struct bt_port *bt_connection_get_upstream_port(
+               struct bt_connection *connection);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_CONNECTION_H */
diff --git a/include/babeltrace/graph/graph-internal.h b/include/babeltrace/graph/graph-internal.h
new file mode 100644 (file)
index 0000000..e8e9e7f
--- /dev/null
@@ -0,0 +1,81 @@
+#ifndef BABELTRACE_COMPONENT_COMPONENT_GRAPH_INTERNAL_H
+#define BABELTRACE_COMPONENT_COMPONENT_GRAPH_INTERNAL_H
+
+/*
+ * BabelTrace - Component Graph Internal
+ *
+ * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/graph/graph.h>
+#include <babeltrace/babeltrace-internal.h>
+#include <babeltrace/object-internal.h>
+#include <glib.h>
+
+struct bt_component;
+struct bt_port;
+
+struct bt_graph {
+       /**
+        * A component graph contains components and point-to-point connection
+        * between these components.
+        *
+        * In terms of ownership:
+        * 1) The graph is the components' parent,
+        * 2) The graph is the connnections' parent,
+        * 3) Components share the ownership of their connections,
+        * 4) A connection holds weak references to its two component endpoints.
+        */
+       struct bt_object base;
+
+       /* Array of pointers to bt_connection. */
+       GPtrArray *connections;
+       /* Array of pointers to bt_component. */
+       GPtrArray *components;
+       /* Queue of pointers (weak references) to sink bt_components. */
+       GQueue *sinks_to_consume;
+
+       struct {
+               GArray *port_added;
+               GArray *port_removed;
+               GArray *port_connected;
+               GArray *port_disconnected;
+       } listeners;
+};
+
+BT_HIDDEN
+void bt_graph_notify_port_added(struct bt_graph *graph, struct bt_port *port);
+
+BT_HIDDEN
+void bt_graph_notify_port_removed(struct bt_graph *graph,
+               struct bt_component *comp, struct bt_port *port);
+
+BT_HIDDEN
+void bt_graph_notify_port_connected(struct bt_graph *graph,
+               struct bt_port *port);
+
+BT_HIDDEN
+void bt_graph_notify_port_disconnected(struct bt_graph *graph,
+               struct bt_component *comp, struct bt_port *port);
+
+#endif /* BABELTRACE_COMPONENT_COMPONENT_GRAPH_INTERNAL_H */
diff --git a/include/babeltrace/graph/graph.h b/include/babeltrace/graph/graph.h
new file mode 100644 (file)
index 0000000..c092792
--- /dev/null
@@ -0,0 +1,121 @@
+#ifndef BABELTRACE_COMPONENT_GRAPH_H
+#define BABELTRACE_COMPONENT_GRAPH_H
+
+/*
+ * BabelTrace - Babeltrace Graph Interface
+ *
+ * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/graph/component.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_port;
+struct bt_connection;
+
+enum bt_graph_status {
+       /** No sink can consume at the moment. */
+       BT_GRAPH_STATUS_AGAIN = 2,
+       /** Downstream component does not support multiple inputs. */
+       BT_GRAPH_STATUS_END = 1,
+       BT_GRAPH_STATUS_OK = 0,
+       /** Downstream component does not support multiple inputs. */
+       BT_GRAPH_STATUS_MULTIPLE_INPUTS_UNSUPPORTED = -1,
+       /** Component is already part of another graph. */
+       BT_GRAPH_STATUS_ALREADY_IN_A_GRAPH = -2,
+       /** Invalid arguments. */
+       BT_GRAPH_STATUS_INVALID = -3,
+       /** No sink in graph. */
+       BT_GRAPH_STATUS_NO_SINK = -4,
+       /** General error. */
+       BT_GRAPH_STATUS_ERROR = -5,
+};
+
+typedef void (*bt_graph_port_added_listener)(struct bt_port *port,
+               void *data);
+typedef void (*bt_graph_port_removed_listener)(struct bt_component *component,
+               struct bt_port *port, void *data);
+typedef void (*bt_graph_port_connected_listener)(struct bt_port *port,
+               void *data);
+typedef void (*bt_graph_port_disconnected_listener)(
+               struct bt_component *component, struct bt_port *port,
+               void *data);
+
+extern struct bt_graph *bt_graph_create(void);
+
+/**
+ * Creates a connection between two components using the two ports specified
+ * and adds the connection and components (if not already added) to the graph.
+ */
+extern struct bt_connection *bt_graph_connect(struct bt_graph *graph,
+               struct bt_port *upstream,
+               struct bt_port *downstream);
+
+/**
+ * Add a component as a "sibling" of the origin component. Sibling share
+ * connections equivalent to each other at the time of connection (same
+ * upstream and downstream ports).
+ */
+extern enum bt_graph_status bt_graph_add_component_as_sibling(
+               struct bt_graph *graph, struct bt_component *origin,
+               struct bt_component *new_component);
+
+/**
+ * Run graph to completion or until a single sink is left and "AGAIN" is received.
+ *
+ * Runs "bt_component_sink_consume()" on all sinks in round-robin until they all
+ * indicate that the end is reached or that an error occured.
+ */
+extern enum bt_graph_status bt_graph_run(struct bt_graph *graph);
+
+/**
+ * Runs "bt_component_sink_consume()" on the graph's sinks. Each invokation will
+ * invoke "bt_component_sink_consume()" on the next sink, in round-robin, until
+ * they all indicated that the end is reached.
+ */
+extern enum bt_graph_status bt_graph_consume(struct bt_graph *graph);
+
+extern enum bt_graph_status bt_graph_add_port_added_listener(
+               struct bt_graph *graph,
+               bt_graph_port_added_listener listener, void *data);
+
+extern enum bt_graph_status bt_graph_add_port_removed_listener(
+               struct bt_graph *graph,
+               bt_graph_port_removed_listener listener, void *data);
+
+extern enum bt_graph_status bt_graph_add_port_connected_listener(
+               struct bt_graph *graph,
+               bt_graph_port_connected_listener listener, void *data);
+
+extern enum bt_graph_status bt_graph_add_port_disconnected_listener(
+               struct bt_graph *graph,
+               bt_graph_port_disconnected_listener listener, void *data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_GRAPH_H */
diff --git a/include/babeltrace/graph/notification-eot-internal.h b/include/babeltrace/graph/notification-eot-internal.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/include/babeltrace/graph/notification-eot.h b/include/babeltrace/graph/notification-eot.h
new file mode 100644 (file)
index 0000000..4c3626c
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef BABELTRACE_COMPONENT_NOTIFICATION_EOT_H
+#define BABELTRACE_COMPONENT_NOTIFICATION_EOT_H
+
+/*
+ * BabelTrace - Plug-in End of Trace Notification
+ *
+ * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_NOTIFICATION_EOT_H */
diff --git a/include/babeltrace/graph/notification-event-internal.h b/include/babeltrace/graph/notification-event-internal.h
new file mode 100644 (file)
index 0000000..939b771
--- /dev/null
@@ -0,0 +1,46 @@
+#ifndef BABELTRACE_COMPONENT_NOTIFICATION_EVENT_INTERNAL_H
+#define BABELTRACE_COMPONENT_NOTIFICATION_EVENT_INTERNAL_H
+
+/*
+ * BabelTrace - Plug-in Event Notification internal
+ *
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/ctf-ir/event.h>
+#include <babeltrace/graph/notification-internal.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_notification_event {
+       struct bt_notification parent;
+       struct bt_ctf_event *event;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACECOMPONENTPLUGIN_NOTIFICATION_EVENT_INTERNAL_H */
diff --git a/include/babeltrace/graph/notification-event.h b/include/babeltrace/graph/notification-event.h
new file mode 100644 (file)
index 0000000..e5947b7
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef BABELTRACE_COMPONENT_NOTIFICATION_EVENT_H
+#define BABELTRACE_COMPONENT_NOTIFICATION_EVENT_H
+
+/*
+ * BabelTrace - Plug-in Event Notification
+ *
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_notification;
+struct bt_ctf_event;
+
+/***BT_NOTIFICATION_TYPE_EVENT ***/
+/**
+ * Create an event notification.
+ *
+ * @param event                        The event
+ * @returns                    An event notification instance
+ *
+ * @see #bt_notification_type
+ */
+extern struct bt_notification *bt_notification_event_create(
+               struct bt_ctf_event *event);
+
+/**
+ * Get an event notification's event.
+ *
+ * @param notification Event notification instance
+ * @returns            An event instance
+ *
+ * @see #bt_ctf_event
+ */
+extern struct bt_ctf_event *bt_notification_event_get_event(
+               struct bt_notification *notification);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_NOTIFICATION_EVENT_H */
diff --git a/include/babeltrace/graph/notification-heap-internal.h b/include/babeltrace/graph/notification-heap-internal.h
new file mode 100644 (file)
index 0000000..07e1378
--- /dev/null
@@ -0,0 +1,41 @@
+#ifndef BABELTRACE_COMPONENT_NOTIFICATION_HEAP_INTERNAL_H
+#define BABELTRACE_COMPONENT_NOTIFICATION_HEAP_INTERNAL_H
+
+/*
+ * Babeltrace - CTF notification heap priority heap
+ *
+ * Copyright (c) 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/object-internal.h>
+#include <babeltrace/graph/notification-heap.h>
+#include <babeltrace/graph/notification.h>
+#include <glib.h>
+
+struct bt_notification_heap {
+       struct bt_object base;
+       GPtrArray *ptrs;
+       size_t count;
+       bt_notification_time_compare_func compare;
+       void *compare_data;
+};
+
+#endif /* BABELTRACE_COMPONENT_NOTIFICATION_HEAP_INTERNAL_H */
diff --git a/include/babeltrace/graph/notification-heap.h b/include/babeltrace/graph/notification-heap.h
new file mode 100644 (file)
index 0000000..ddadc67
--- /dev/null
@@ -0,0 +1,93 @@
+#ifndef BABELTRACE_COMPONENT_NOTIFICATION_HEAP_H
+#define BABELTRACE_COMPONENT_NOTIFICATION_HEAP_H
+
+/*
+ * Babeltrace - Notification Heap
+ *
+ * Copyright (c) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (c) 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <stddef.h>
+#include <stdbool.h>
+#include <babeltrace/graph/notification.h>
+#include <babeltrace/babeltrace-internal.h>
+
+/**
+ * bt_notification_time_compare - Compare two notifications' timestamps
+ *
+ * Compare two notifications in the time domain. Return true if 'a' happened
+ * prior to 'b'. In the case where both notifications are deemed to have
+ * happened at the same time, an implementation-defined critarion shall be
+ * used to order the notifications. This criterion shall ensure a consistent
+ * ordering over multiple runs.
+ */
+typedef bool (*bt_notification_time_compare_func)(
+               struct bt_notification *a, struct bt_notification *b,
+               void *user_data);
+
+/**
+ * bt_notification_heap_create - create a new bt_notification heap.
+ *
+ * @comparator: Function to use for notification comparisons.
+ *
+ * Returns a new notification heap, NULL on error.
+ */
+extern struct bt_notification_heap *bt_notification_heap_create(
+               bt_notification_time_compare_func comparator, void *user_data);
+
+/**
+ * bt_notification_heap_insert - insert an element into the heap
+ *
+ * @heap: the heap to be operated on
+ * @notification: the notification to add
+ *
+ * Insert a notification into the heap.
+ *
+ * Returns 0 on success, a negative value on error.
+ */
+extern int bt_notification_heap_insert(struct bt_notification_heap *heap,
+               struct bt_notification *notification);
+
+/**
+ * bt_notification_heap_peek - return the element on top of the heap.
+ *
+ * @heap: the heap to be operated on
+ *
+ * Returns the top element of the heap, without performing any modification
+ * to the heap structure. Returns NULL if the heap is empty. The returned
+ * notification must be bt_put() by the caller.
+ */
+extern struct bt_notification *bt_notification_heap_peek(
+               struct bt_notification_heap *heap);
+
+/**
+ * bt_notification_heap_pop - remove the element sitting on top of the heap.
+ * @heap: the heap to be operated on
+ *
+ * Returns the top element of the heap. The element is removed from the
+ * heap. Returns NULL if the heap is empty. The returned notification must be
+ * bt_put() by the caller.
+ */
+extern struct bt_notification *bt_notification_heap_pop(
+               struct bt_notification_heap *heap);
+
+#endif /* BABELTRACE_COMPONENT_NOTIFICATION_HEAP_H */
diff --git a/include/babeltrace/graph/notification-internal.h b/include/babeltrace/graph/notification-internal.h
new file mode 100644 (file)
index 0000000..c5a542d
--- /dev/null
@@ -0,0 +1,58 @@
+#ifndef BABELTRACE_COMPONENT_NOTIFICATION_NOTIFICATION_INTERNAL_H
+#define BABELTRACE_COMPONENT_NOTIFICATION_NOTIFICATION_INTERNAL_H
+
+/*
+ * BabelTrace - Plug-in Notification internal
+ *
+ * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/ref-internal.h>
+#include <babeltrace/babeltrace-internal.h>
+#include <babeltrace/object-internal.h>
+#include <babeltrace/graph/notification.h>
+#include <babeltrace/ctf-ir/stream.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct bt_ctf_stream *(*get_stream_func)(
+               struct bt_notification *notification);
+
+struct bt_notification {
+       struct bt_object base;
+       enum bt_notification_type type;
+       get_stream_func get_stream;
+};
+
+BT_HIDDEN
+void bt_notification_init(struct bt_notification *notification,
+               enum bt_notification_type type,
+               bt_object_release_func release);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_NOTIFICATION_NOTIFICATION_INTERNAL_H */
diff --git a/include/babeltrace/graph/notification-iterator-internal.h b/include/babeltrace/graph/notification-iterator-internal.h
new file mode 100644 (file)
index 0000000..d702566
--- /dev/null
@@ -0,0 +1,79 @@
+#ifndef BABELTRACE_COMPONENT_NOTIFICATION_ITERATOR_INTERNAL_H
+#define BABELTRACE_COMPONENT_NOTIFICATION_ITERATOR_INTERNAL_H
+
+/*
+ * BabelTrace - Notification Iterator Internal
+ *
+ * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/babeltrace-internal.h>
+#include <babeltrace/object-internal.h>
+#include <babeltrace/ref-internal.h>
+#include <babeltrace/graph/notification.h>
+#include <babeltrace/graph/notification-iterator.h>
+#include <babeltrace/graph/private-notification-iterator.h>
+
+struct bt_notification_iterator {
+       struct bt_object base;
+       struct bt_component *component;
+       struct bt_notification *current_notification;
+       void *user_data;
+};
+
+static inline
+struct bt_notification_iterator *bt_notification_iterator_from_private(
+               struct bt_private_notification_iterator *private_notification_iterator)
+{
+       return (void *) private_notification_iterator;
+}
+
+static inline
+struct bt_private_notification_iterator *
+bt_private_notification_iterator_from_notification_iterator(
+               struct bt_notification_iterator *notification_iterator)
+{
+       return (void *) notification_iterator;
+}
+
+/**
+ * Allocate a notification iterator.
+ *
+ * @param component            Component instance
+ * @returns                    A notification iterator instance
+ */
+BT_HIDDEN
+struct bt_notification_iterator *bt_notification_iterator_create(
+               struct bt_component *component);
+
+/**
+ * Validate a notification iterator.
+ *
+ * @param iterator             Notification iterator instance
+ * @returns                    One of #bt_component_status values
+ */
+BT_HIDDEN
+enum bt_notification_iterator_status bt_notification_iterator_validate(
+               struct bt_notification_iterator *iterator);
+
+#endif /* BABELTRACE_COMPONENT_NOTIFICATION_ITERATOR_INTERNAL_H */
diff --git a/include/babeltrace/graph/notification-iterator.h b/include/babeltrace/graph/notification-iterator.h
new file mode 100644 (file)
index 0000000..8cf2a06
--- /dev/null
@@ -0,0 +1,138 @@
+#ifndef BABELTRACE_COMPONENT_NOTIFICATION_ITERATOR_H
+#define BABELTRACE_COMPONENT_NOTIFICATION_ITERATOR_H
+
+/*
+ * BabelTrace - Plug-in Notification Iterator
+ *
+ * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_notification;
+struct bt_notification_iterator;
+
+/**
+ * Status code. Errors are always negative.
+ */
+enum bt_notification_iterator_status {
+       /** No more notifications to be delivered. */
+       BT_NOTIFICATION_ITERATOR_STATUS_END = 1,
+       /** No error, okay. */
+       BT_NOTIFICATION_ITERATOR_STATUS_OK = 0,
+       /** Invalid arguments. */
+       BT_NOTIFICATION_ITERATOR_STATUS_INVAL = -1,
+       /** General error. */
+       BT_NOTIFICATION_ITERATOR_STATUS_ERROR = -2,
+       /** Out of memory. */
+       BT_NOTIFICATION_ITERATOR_STATUS_NOMEM = -3,
+       /** Unsupported iterator feature. */
+       BT_NOTIFICATION_ITERATOR_STATUS_UNSUPPORTED = -4,
+
+};
+
+/**
+ * Notification iterator seek reference.
+ */
+enum bt_notification_iterator_seek_origin {
+       /** Seek at a time relative to the beginning of the trace. */
+       BT_NOTIFICATION_ITERATOR_SEEK_ORIGIN_BEGIN = 0,
+
+       /** Seek at a time relative to the current position. */
+       BT_NOTIFICATION_ITERATOR_SEEK_ORIGIN_CURRENT = 1,
+
+       /** Seek at a time relative to the end of the trace. */
+       BT_NOTIFICATION_ITERATOR_SEEK_ORIGIN_END = 2,
+
+       /** Seek at a time relative to EPOCH. */
+       BT_NOTIFICATION_ITERATOR_SEEK_ORIGIN_EPOCH = 3,
+};
+
+struct bt_notification_iterator_next_return {
+       struct bt_notification *notification;
+       enum bt_notification_iterator_status status;
+};
+
+/**
+ * Get current notification at iterator's position.
+ *
+ * This functions will <b>not</b> advance the cursor's position.
+ * The returned notification's reference count is already incremented.
+ *
+ * @param iterator     Iterator instance
+ * @returns            Returns a bt_notification instance
+ *
+ * @see bt_put()
+ */
+extern struct bt_notification *bt_notification_iterator_get_notification(
+               struct bt_notification_iterator *iterator);
+
+/**
+ * Advance the iterator's position forward.
+ *
+ * This function can be called repeatedly to iterate through the iterator's
+ * associated trace.
+ *
+ * @param iterator     Iterator instance
+ * @returns            Returns a bt_notification instance
+ *
+ * @see bt_notification_iterator_get_notification()
+ */
+extern enum bt_notification_iterator_status
+bt_notification_iterator_next(struct bt_notification_iterator *iterator);
+
+/**
+ * Seek iterator to time.
+ *
+ * Sets the iterator's position for the trace associated with the iterator.
+ * The new position is computed by adding \p time to the position specified
+ * by \p seek_origin.
+ *
+ * time is expressed in nanoseconds.
+ *
+ * @param iterator     Iterator instance
+ * @param seek_origin  One of #bt_notification_iterator_seek_type values.
+ * @returns            One of #bt_notification_iterator_status values;
+ *                     if \iterator does not support seeking,
+ *                     #BT_NOTIFICATION_ITERATOR_STATUS_UNSUPPORTED is
+ *                     returned.
+ *
+ * @see bt_notification_iterator_get_notification()
+ */
+extern enum bt_notification_iterator_status bt_notification_iterator_seek_time(
+               struct bt_notification_iterator *iterator,
+               enum bt_notification_iterator_seek_origin seek_origin,
+               int64_t time);
+
+extern struct bt_component *bt_notification_iterator_get_component(
+               struct bt_notification_iterator *iterator);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_NOTIFICATION_ITERATOR_H */
diff --git a/include/babeltrace/graph/notification-packet-internal.h b/include/babeltrace/graph/notification-packet-internal.h
new file mode 100644 (file)
index 0000000..8d525c5
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef BABELTRACE_COMPONENT_NOTIFICATION_PACKET_INTERNAL_H
+#define BABELTRACE_COMPONENT_NOTIFICATION_PACKET_INTERNAL_H
+
+/*
+ * BabelTrace - Packet-related Notifications
+ *
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/ctf-ir/packet.h>
+#include <babeltrace/graph/notification-internal.h>
+
+struct bt_notification_packet_begin {
+       struct bt_notification parent;
+       struct bt_ctf_packet *packet;
+};
+
+struct bt_notification_packet_end {
+       struct bt_notification parent;
+       struct bt_ctf_packet *packet;
+};
+
+#endif /* BABELTRACE_COMPONENT_NOTIFICATION_PACKET_INTERNAL_H */
diff --git a/include/babeltrace/graph/notification-packet.h b/include/babeltrace/graph/notification-packet.h
new file mode 100644 (file)
index 0000000..a15a969
--- /dev/null
@@ -0,0 +1,54 @@
+#ifndef BABELTRACE_COMPONENT_NOTIFICATION_PACKET_H
+#define BABELTRACE_COMPONENT_NOTIFICATION_PACKET_H
+
+/*
+ * BabelTrace - Plug-in Packet-related Notifications
+ *
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/graph/notification.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_ctf_packet;
+
+/*** BT_NOTIFICATION_TYPE_PACKET_BEGIN ***/
+struct bt_notification *bt_notification_packet_begin_create(
+               struct bt_ctf_packet *packet);
+struct bt_ctf_packet *bt_notification_packet_begin_get_packet(
+               struct bt_notification *notification);
+
+/*** BT_NOTIFICATION_TYPE_PACKET_END ***/
+struct bt_notification *bt_notification_packet_end_create(
+               struct bt_ctf_packet *packet);
+struct bt_ctf_packet *bt_notification_packet_end_get_packet(
+               struct bt_notification *notification);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_NOTIFICATION_PACKET_H */
diff --git a/include/babeltrace/graph/notification-schema.h b/include/babeltrace/graph/notification-schema.h
new file mode 100644 (file)
index 0000000..eb6f09e
--- /dev/null
@@ -0,0 +1,114 @@
+#ifndef BABELTRACE_COMPONENT_NOTIFICATION_SCHEMA_H
+#define BABELTRACE_COMPONENT_NOTIFICATION_SCHEMA_H
+
+/*
+ * BabelTrace - Plug-in Schema Change Notification
+ *
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_notification;
+struct bt_ctf_trace;
+struct bt_ctf_stream_class;
+struct bt_ctf_event_class;
+
+/* BT_NOTIFICATION_TYPE_NEW_TRACE */
+/**
+ * Create a new trace notification.
+ *
+ * @param trace                        The new trace
+ * @returns                    A new trace notification instance
+ *
+ * @see #bt_notification_type
+ */
+extern struct bt_notification *bt_notification_new_trace_create(
+               struct bt_ctf_trace *trace);
+
+/**
+ * Get a new trace notification's associated trace.
+ *
+ * @param notification New trace notification instance
+ * @returns            A trace instance
+ *
+ * @see #bt_ctf_trace
+ */
+extern struct bt_ctf_trace *bt_notification_new_trace_get_trace(
+               struct bt_notification *notification);
+
+
+/* BT_NOTIFICATION_TYPE_NEW_STREAM_CLASS */
+/**
+ * Create a new stream class notification.
+ *
+ * @param trace                        The event's trace
+ * @returns                    A new stream class notification instance
+ *
+ * @see #bt_notification_type
+ */
+extern struct bt_notification *bt_notification_new_stream_class_create(
+               struct bt_ctf_stream_class *stream_class);
+
+/**
+ * Get a new stream class notification's associated stream class.
+ *
+ * @param notification New stream class notification instance
+ * @returns            A stream class instance
+ *
+ * @see #bt_ctf_stream_class
+ */
+extern struct bt_ctf_trace *bt_notification_new_stream_class_get_stream_class(
+               struct bt_notification *notification);
+
+
+/* BT_NOTIFICATION_TYPE_EVENT_CLASS */
+/**
+ * Create a new trace notification.
+ *
+ * @param trace                        The event's trace
+ * @returns                    An event notification instance
+ *
+ * @see #bt_notification_type
+ */
+extern struct bt_notification *bt_notification_new_trace_create(
+               struct bt_ctf_trace *trace);
+
+/**
+ * Get a new trace notification's associated trace.
+ *
+ * @param notification New trace notification instance
+ * @returns            A trace instance
+ *
+ * @see #bt_ctf_trace
+ */
+extern struct bt_ctf_trace *bt_notification_new_trace_get_trace(
+               struct bt_notification *notification);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_NOTIFICATION_SCHEMA_H */
diff --git a/include/babeltrace/graph/notification-stream-internal.h b/include/babeltrace/graph/notification-stream-internal.h
new file mode 100644 (file)
index 0000000..839c220
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef BABELTRACE_COMPONENT_NOTIFICATION_STREAM_INTERNAL_H
+#define BABELTRACE_COMPONENT_NOTIFICATION_STREAM_INTERNAL_H
+
+/*
+ * BabelTrace - Stream-related Notifications
+ *
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/ctf-ir/packet.h>
+#include <babeltrace/graph/notification-internal.h>
+
+struct bt_notification_stream_end {
+       struct bt_notification parent;
+       struct bt_ctf_stream *stream;
+};
+
+#endif /* BABELTRACE_COMPONENT_NOTIFICATION_STREAM_INTERNAL_H */
diff --git a/include/babeltrace/graph/notification-stream.h b/include/babeltrace/graph/notification-stream.h
new file mode 100644 (file)
index 0000000..bdcf4c9
--- /dev/null
@@ -0,0 +1,47 @@
+#ifndef BABELTRACE_COMPONENT_NOTIFICATION_STREAM_H
+#define BABELTRACE_COMPONENT_NOTIFICATION_STREAM_H
+
+/*
+ * BabelTrace - Plug-in Stream-related Notifications
+ *
+ * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/graph/notification.h>
+#include <babeltrace/ctf-ir/stream.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*** BT_NOTIFICATION_TYPE_STREAM_END ***/
+struct bt_notification *bt_notification_stream_end_create(
+               struct bt_ctf_stream *stream);
+struct bt_ctf_stream *bt_notification_stream_end_get_stream(
+               struct bt_notification *notification);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_NOTIFICATION_STREAM_H */
diff --git a/include/babeltrace/graph/notification.h b/include/babeltrace/graph/notification.h
new file mode 100644 (file)
index 0000000..d179733
--- /dev/null
@@ -0,0 +1,88 @@
+#ifndef BABELTRACE_COMPONENT_NOTIFICATION_NOTIFICATION_H
+#define BABELTRACE_COMPONENT_NOTIFICATION_NOTIFICATION_H
+
+/*
+ * BabelTrace - Plug-in Notification
+ *
+ * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_notification;
+
+/**
+ * Notification types. Unhandled notification types should be ignored.
+ */
+enum bt_notification_type {
+       BT_NOTIFICATION_TYPE_UNKNOWN = -1,
+
+       /**
+        * All types of notifications (used to register to notification
+        * delivery).
+        */
+       BT_NOTIFICATION_TYPE_ALL = 0,
+
+       /** Event delivery notification, see event.h */
+       BT_NOTIFICATION_TYPE_EVENT = 1,
+
+       /** Beginning of stream packet notification, see packet.h */
+       BT_NOTIFICATION_TYPE_PACKET_BEGIN = 2,
+
+       /** End of stream packet notification, see packet.h */
+       BT_NOTIFICATION_TYPE_PACKET_END = 3,
+
+       /** End of stream packet notification, see stream.h */
+       BT_NOTIFICATION_TYPE_STREAM_END = 4,
+
+       /** New trace notification, see model.h */
+       BT_NOTIFICATION_TYPE_NEW_TRACE = 5,
+
+       /** New stream class notification, see model.h */
+       BT_NOTIFICATION_TYPE_NEW_STREAM_CLASS = 6,
+
+       /** New event class notification, see model.h */
+       BT_NOTIFICATION_TYPE_NEW_EVENT_CLASS = 7,
+
+       /** End of trace notification, see eot.h */
+       BT_NOTIFICATION_TYPE_END_OF_TRACE = 8,
+
+       BT_NOTIFICATION_TYPE_NR, /* Not part of ABI. */
+};
+
+/**
+ * Get a notification's type.
+ *
+ * @param notification Notification instance
+ * @returns            One of #bt_notification_type
+ */
+extern enum bt_notification_type bt_notification_get_type(
+               struct bt_notification *notification);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_NOTIFICATION_NOTIFICATION_H */
diff --git a/include/babeltrace/graph/port-internal.h b/include/babeltrace/graph/port-internal.h
new file mode 100644 (file)
index 0000000..85d9d76
--- /dev/null
@@ -0,0 +1,69 @@
+#ifndef BABELTRACE_COMPONENT_PORT_INTERNAL_H
+#define BABELTRACE_COMPONENT_PORT_INTERNAL_H
+
+/*
+ * BabelTrace - Babeltrace Component Port
+ *
+ * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <babeltrace/graph/port.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_port {
+       struct bt_object base;
+       enum bt_port_type type;
+       GString *name;
+       struct bt_connection *connection;
+};
+
+static inline
+struct bt_port *bt_port_from_private(
+               struct bt_private_port *private_port)
+{
+       return (void *) private_port;
+}
+
+static inline
+struct bt_private_port *bt_private_port_from_port(
+               struct bt_port *port)
+{
+       return (void *) port;
+}
+
+BT_HIDDEN
+struct bt_port *bt_port_create(struct bt_component *parent_component,
+               enum bt_port_type type, const char *name);
+
+BT_HIDDEN
+void bt_port_set_connection(struct bt_port *port,
+               struct bt_connection *connection);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_PORT_INTERNAL_H */
diff --git a/include/babeltrace/graph/port.h b/include/babeltrace/graph/port.h
new file mode 100644 (file)
index 0000000..9d80244
--- /dev/null
@@ -0,0 +1,65 @@
+#ifndef BABELTRACE_COMPONENT_PORT_H
+#define BABELTRACE_COMPONENT_PORT_H
+
+/*
+ * BabelTrace - Babeltrace Component Connection Interface
+ *
+ * Copyright 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * 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 <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_port;
+struct bt_connection;
+
+enum bt_port_status {
+       BT_PORT_STATUS_OK = 0,
+       BT_PORT_STATUS_ERROR = -1,
+       BT_PORT_STATUS_INVALID = -2,
+};
+
+enum bt_port_type {
+       BT_PORT_TYPE_INPUT = 0,
+       BT_PORT_TYPE_OUTPUT = 1,
+       BT_PORT_TYPE_UNKOWN = -1,
+};
+
+extern const char *BT_DEFAULT_PORT_NAME;
+
+extern const char *bt_port_get_name(struct bt_port *port);
+extern enum bt_port_type bt_port_get_type(struct bt_port *port);
+extern struct bt_connection *bt_port_get_connection(struct bt_port *port);
+extern struct bt_component *bt_port_get_component(struct bt_port *port);
+extern int bt_port_remove_from_component(struct bt_port *port);
+extern int bt_port_disconnect(struct bt_port *port);
+extern int bt_port_is_connected(struct bt_port *port);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_PORT_H */
diff --git a/include/babeltrace/graph/private-component-filter.h b/include/babeltrace/graph/private-component-filter.h
new file mode 100644 (file)
index 0000000..4c52d0f
--- /dev/null
@@ -0,0 +1,75 @@
+#ifndef BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SINK_H
+#define BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SINK_H
+
+/*
+ * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
+ *
+ * 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 <babeltrace/graph/component.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_private_component;
+struct bt_private_port;
+
+extern struct bt_private_port *
+bt_private_component_filter_get_output_private_port(
+               struct bt_private_component *private_component,
+               const char *name);
+
+extern struct bt_private_port *
+bt_private_component_filter_get_output_private_port_at_index(
+               struct bt_private_component *private_component, int index);
+
+extern struct bt_private_port *
+bt_private_component_filter_get_default_output_private_port(
+               struct bt_private_component *private_component);
+
+extern struct bt_private_port *
+bt_private_component_filter_add_output_private_port(
+               struct bt_private_component *private_component,
+               const char *name);
+
+extern struct bt_private_port *
+bt_private_component_filter_get_input_private_port(
+               struct bt_private_component *private_component,
+               const char *name);
+
+extern struct bt_private_port *
+bt_private_component_filter_get_input_private_port_at_index(
+               struct bt_private_component *private_component, int index);
+
+extern struct bt_private_port *
+bt_private_component_filter_get_default_input_private_port(
+               struct bt_private_component *private_component);
+
+extern struct bt_private_port *
+bt_private_component_filter_add_input_private_port(
+               struct bt_private_component *private_component,
+               const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SINK_H */
diff --git a/include/babeltrace/graph/private-component-sink.h b/include/babeltrace/graph/private-component-sink.h
new file mode 100644 (file)
index 0000000..52178ae
--- /dev/null
@@ -0,0 +1,57 @@
+#ifndef BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SINK_H
+#define BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SINK_H
+
+/*
+ * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
+ *
+ * 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 <babeltrace/graph/component.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_private_component;
+struct bt_private_port;
+
+extern struct bt_private_port *
+bt_private_component_sink_get_input_private_port(
+               struct bt_private_component *private_component,
+               const char *name);
+
+extern struct bt_private_port *
+bt_private_component_sink_get_input_private_port_at_index(
+               struct bt_private_component *private_component, int index);
+
+extern struct bt_private_port *
+bt_private_component_sink_get_default_input_private_port(
+               struct bt_private_component *private_component);
+
+extern struct bt_private_port *
+bt_private_component_sink_add_input_private_port(
+               struct bt_private_component *private_component,
+               const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SINK_H */
diff --git a/include/babeltrace/graph/private-component-source.h b/include/babeltrace/graph/private-component-source.h
new file mode 100644 (file)
index 0000000..d74df86
--- /dev/null
@@ -0,0 +1,57 @@
+#ifndef BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SOURCE_H
+#define BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SOURCE_H
+
+/*
+ * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
+ *
+ * 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 <babeltrace/graph/component.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_private_component;
+struct bt_private_port;
+
+extern struct bt_private_port *
+bt_private_component_source_get_output_private_port(
+               struct bt_private_component *private_component,
+               const char *name);
+
+extern struct bt_private_port *
+bt_private_component_source_get_output_private_port_at_index(
+               struct bt_private_component *private_component, int index);
+
+extern struct bt_private_port *
+bt_private_component_source_get_default_output_private_port(
+               struct bt_private_component *private_component);
+
+extern struct bt_private_port *
+bt_private_component_source_add_output_private_port(
+               struct bt_private_component *private_component,
+               const char *name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_PRIVATE_COMPONENT_SOURCE_H */
diff --git a/include/babeltrace/graph/private-component.h b/include/babeltrace/graph/private-component.h
new file mode 100644 (file)
index 0000000..c209198
--- /dev/null
@@ -0,0 +1,48 @@
+#ifndef BABELTRACE_COMPONENT_PRIVATE_COMPONENT_H
+#define BABELTRACE_COMPONENT_PRIVATE_COMPONENT_H
+
+/*
+ * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
+ *
+ * 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 <babeltrace/graph/component.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_private_component;
+
+struct bt_component *bt_component_from_private_component(
+               struct bt_private_component *private_component);
+
+extern void *bt_private_component_get_user_data(
+               struct bt_private_component *private_component);
+
+extern enum bt_component_status bt_private_component_set_user_data(
+               struct bt_private_component *private_component,
+               void *user_data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_PRIVATE_COMPONENT_H */
diff --git a/include/babeltrace/graph/private-connection.h b/include/babeltrace/graph/private-connection.h
new file mode 100644 (file)
index 0000000..7629460
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef BABELTRACE_COMPONENT_PRIVATE_CONNECTION_H
+#define BABELTRACE_COMPONENT_PRIVATE_CONNECTION_H
+
+/*
+ * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
+ *
+ * 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.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_connection;
+struct bt_private_port;
+struct bt_private_connection;
+
+struct bt_connection *bt_connection_from_private_connection(
+               struct bt_private_connection *private_connection);
+
+extern struct bt_notification_iterator *
+bt_private_connection_create_notification_iterator(
+               struct bt_private_connection *private_connection);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_PRIVATE_CONNECTION_H */
diff --git a/include/babeltrace/graph/private-notification-iterator.h b/include/babeltrace/graph/private-notification-iterator.h
new file mode 100644 (file)
index 0000000..9cc8c66
--- /dev/null
@@ -0,0 +1,56 @@
+#ifndef BABELTRACE_COMPONENT_NOTIFICATION_PRIVATE_ITERATOR_H
+#define BABELTRACE_COMPONENT_NOTIFICATION_PRIVATE_ITERATOR_H
+
+/*
+ * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
+ *
+ * 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:
+ * 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.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_connection;
+struct bt_private_port;
+struct bt_private_connection;
+struct bt_private_notification_iterator;
+
+struct bt_notification_iterator *
+bt_notification_iterator_from_private_notification_iterator(
+               struct bt_private_notification_iterator *private_notification_iterator);
+
+extern struct bt_private_component *
+bt_private_notification_iterator_get_private_component(
+               struct bt_private_notification_iterator *private_notification_iterator);
+
+extern enum bt_notification_iterator_status
+bt_private_notification_iterator_set_user_data(
+               struct bt_private_notification_iterator *private_notification_iterator,
+               void *user_data);
+
+extern void *bt_private_notification_iterator_get_user_data(
+               struct bt_private_notification_iterator *private_notification_iterator);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_NOTIFICATION_PRIVATE_ITERATOR_H */
diff --git a/include/babeltrace/graph/private-port.h b/include/babeltrace/graph/private-port.h
new file mode 100644 (file)
index 0000000..2f0e49d
--- /dev/null
@@ -0,0 +1,47 @@
+#ifndef BABELTRACE_COMPONENT_PRIVATE_PORT_H
+#define BABELTRACE_COMPONENT_PRIVATE_PORT_H
+
+/*
+ * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
+ *
+ * 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.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct bt_port;
+struct bt_private_port;
+struct bt_private_component;
+struct bt_private_connection;
+
+struct bt_port *bt_port_from_private_port(struct bt_private_port *private_port);
+extern struct bt_private_connection *bt_private_port_get_private_connection(
+               struct bt_private_port *private_port);
+extern struct bt_private_component *bt_private_port_get_private_component(
+               struct bt_private_port *private_port);
+extern int bt_private_port_remove_from_component(
+               struct bt_private_port *private_port);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_PRIVATE_PORT_H */
index 5221b974ce6711738701260ad1434cf0aedce410..4a0dadd235cfe0339a40aaedcb69756e4cd96ac6 100644 (file)
 
 #include <stdint.h>
 #include <babeltrace/plugin/plugin.h>
-#include <babeltrace/component/component-class.h>
-#include <babeltrace/component/component-class-source.h>
-#include <babeltrace/component/component-class-filter.h>
-#include <babeltrace/component/component-class-sink.h>
+#include <babeltrace/graph/component-class.h>
+#include <babeltrace/graph/component-class-source.h>
+#include <babeltrace/graph/component-class-filter.h>
+#include <babeltrace/graph/component-class-sink.h>
 
 #ifdef __cplusplus
 extern "C" {
index 0ec3b6c03e777aae3b1a8ecfb13f1b3fae2be37a..1d172540806f5a76696b30b637381249757b9917 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <stddef.h>
 #include <stdbool.h>
-#include <babeltrace/component/component-class.h>
+#include <babeltrace/graph/component-class.h>
 
 #ifdef __cplusplus
 extern "C" {
index f3cbb4222fdb8e4507877b1254278915e6f4d33b..bdaa2d37d3435f53081d8371593fbff83ce96d08 100644 (file)
@@ -27,7 +27,7 @@
  */
 
 #include <babeltrace/compiler.h>
-#include <babeltrace/component/component-class-internal.h>
+#include <babeltrace/graph/component-class-internal.h>
 #include <babeltrace/ref.h>
 #include <stdbool.h>
 #include <glib.h>
index 834370751c291334da006d6027a6e5491497e5bb..e8c4b5af7c14e2167386c9d1886bfcd2ef20a442 100644 (file)
  * SOFTWARE.
  */
 
-#include <babeltrace/component/private-component.h>
-#include <babeltrace/component/component.h>
-#include <babeltrace/component/component-internal.h>
-#include <babeltrace/component/component-class-internal.h>
-#include <babeltrace/component/component-source-internal.h>
-#include <babeltrace/component/component-filter-internal.h>
-#include <babeltrace/component/component-sink-internal.h>
-#include <babeltrace/component/private-connection.h>
-#include <babeltrace/component/connection-internal.h>
-#include <babeltrace/component/graph-internal.h>
-#include <babeltrace/component/notification/iterator-internal.h>
-#include <babeltrace/component/notification/private-iterator.h>
+#include <babeltrace/graph/private-component.h>
+#include <babeltrace/graph/component.h>
+#include <babeltrace/graph/component-internal.h>
+#include <babeltrace/graph/component-class-internal.h>
+#include <babeltrace/graph/component-source-internal.h>
+#include <babeltrace/graph/component-filter-internal.h>
+#include <babeltrace/graph/component-sink-internal.h>
+#include <babeltrace/graph/private-connection.h>
+#include <babeltrace/graph/connection-internal.h>
+#include <babeltrace/graph/graph-internal.h>
+#include <babeltrace/graph/notification-iterator-internal.h>
+#include <babeltrace/graph/private-notification-iterator.h>
 #include <babeltrace/babeltrace-internal.h>
 #include <babeltrace/compiler.h>
 #include <babeltrace/ref.h>
index 587a19565827db1d7345d95d2797e0ef46326d15..d57a2cd49cd150774dbcbc3dbc44a118e54f5b09 100644 (file)
  * SOFTWARE.
  */
 
-#include <babeltrace/component/notification/iterator-internal.h>
-#include <babeltrace/component/component-internal.h>
-#include <babeltrace/component/component-source-internal.h>
-#include <babeltrace/component/component-filter-internal.h>
-#include <babeltrace/component/connection-internal.h>
-#include <babeltrace/component/private-connection.h>
-#include <babeltrace/component/graph-internal.h>
-#include <babeltrace/component/port-internal.h>
+#include <babeltrace/graph/notification-iterator-internal.h>
+#include <babeltrace/graph/component-internal.h>
+#include <babeltrace/graph/component-source-internal.h>
+#include <babeltrace/graph/component-filter-internal.h>
+#include <babeltrace/graph/connection-internal.h>
+#include <babeltrace/graph/private-connection.h>
+#include <babeltrace/graph/graph-internal.h>
+#include <babeltrace/graph/port-internal.h>
 #include <babeltrace/object-internal.h>
 #include <babeltrace/compiler.h>
 #include <glib.h>
index 20c8b62794cb995005ca5f8adcc1178eddcaf2c5..dd44012022a5429cbec2db4b3d713877bb12a664 100644 (file)
 
 #include <babeltrace/compiler.h>
 #include <babeltrace/values.h>
-#include <babeltrace/component/component-filter-internal.h>
-#include <babeltrace/component/component-internal.h>
-#include <babeltrace/component/component-class-internal.h>
-#include <babeltrace/component/notification/notification.h>
-#include <babeltrace/component/notification/iterator-internal.h>
+#include <babeltrace/graph/component-filter-internal.h>
+#include <babeltrace/graph/component-internal.h>
+#include <babeltrace/graph/component-class-internal.h>
+#include <babeltrace/graph/notification.h>
+#include <babeltrace/graph/notification-iterator-internal.h>
 
 BT_HIDDEN
 void bt_component_filter_destroy(struct bt_component *component)
index e16a1314260a3a063c71c0998fe1643f896cd0ce..7f0a4258dca9457d1353987cbc2c6aa012c4fbe4 100644 (file)
  * SOFTWARE.
  */
 
-#include <babeltrace/component/component-internal.h>
-#include <babeltrace/component/graph-internal.h>
-#include <babeltrace/component/connection-internal.h>
-#include <babeltrace/component/component-sink-internal.h>
-#include <babeltrace/component/component-source.h>
-#include <babeltrace/component/component-filter.h>
-#include <babeltrace/component/port.h>
+#include <babeltrace/graph/component-internal.h>
+#include <babeltrace/graph/graph-internal.h>
+#include <babeltrace/graph/connection-internal.h>
+#include <babeltrace/graph/component-sink-internal.h>
+#include <babeltrace/graph/component-source.h>
+#include <babeltrace/graph/component-filter.h>
+#include <babeltrace/graph/port.h>
 #include <babeltrace/compiler.h>
 #include <unistd.h>
 #include <glib.h>
index d72f86499cba9c70e14ec2ff24b8262c7a7f18fb..5e70e719463df9fdf5dcfea552a8431a02511a8d 100644 (file)
 
 #include <babeltrace/compiler.h>
 #include <babeltrace/ref.h>
-#include <babeltrace/component/component.h>
-#include <babeltrace/component/component-source-internal.h>
-#include <babeltrace/component/component-class-internal.h>
-#include <babeltrace/component/notification/iterator.h>
-#include <babeltrace/component/notification/iterator-internal.h>
+#include <babeltrace/graph/component.h>
+#include <babeltrace/graph/component-source-internal.h>
+#include <babeltrace/graph/component-class-internal.h>
+#include <babeltrace/graph/notification-iterator.h>
+#include <babeltrace/graph/notification-iterator-internal.h>
 
 static
 void bt_notification_iterator_destroy(struct bt_object *obj)
index 93833a22f55fce24e1add9bed4ce9ed56cad7322..faf9635273f27c3cb349edf4f45e1677908dd3b5 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 #include <babeltrace/compiler.h>
-#include <babeltrace/component/notification/event-internal.h>
+#include <babeltrace/graph/notification-event-internal.h>
 
 static
 void bt_notification_event_destroy(struct bt_object *obj)
index b58480fc1faf9dae9b7c576f9f09fbf8f6ccbd28..897b680b0f1271b04cc007e5eb2fb78b7074399c 100644 (file)
@@ -29,7 +29,7 @@
 #include <assert.h>
 #include <stddef.h>
 #include <babeltrace/compiler.h>
-#include <babeltrace/component/notification/heap-internal.h>
+#include <babeltrace/graph/notification-heap-internal.h>
 
 #ifdef DEBUG_HEAP
 static
index 3b2ffb3d456f29264f1a639921fd0e7812622588..9dc64d796dcfe99060bcca9877ec8b0928c50359 100644 (file)
@@ -24,7 +24,7 @@
  * SOFTWARE.
  */
 
-#include <babeltrace/component/notification/notification-internal.h>
+#include <babeltrace/graph/notification-internal.h>
 
 BT_HIDDEN
 void bt_notification_init(struct bt_notification *notification,
index 587b85084997001bdd0df3d6e80cb2afc82c21c8..393181dab13238c52511409947f1388849e786b5 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 #include <babeltrace/compiler.h>
-#include <babeltrace/component/notification/packet-internal.h>
+#include <babeltrace/graph/notification-packet-internal.h>
 
 static
 void bt_notification_packet_begin_destroy(struct bt_object *obj)
index 1fd096c62715a1708edbaad1ea2cf936dcaa00c6..56062f61222c8e87aec04239957dec162bbe9669 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 #include <babeltrace/compiler.h>
-#include <babeltrace/component/notification/stream-internal.h>
+#include <babeltrace/graph/notification-stream-internal.h>
 
 static
 void bt_notification_stream_end_destroy(struct bt_object *obj)
index ed4eda054c04801405b41b1921807d389a0eb844..68b1cb607ed398cd0cde8d94a45b6d8ae01677af 100644 (file)
@@ -26,9 +26,9 @@
  * SOFTWARE.
  */
 
-#include <babeltrace/component/component-internal.h>
-#include <babeltrace/component/port-internal.h>
-#include <babeltrace/component/connection-internal.h>
+#include <babeltrace/graph/component-internal.h>
+#include <babeltrace/graph/port-internal.h>
+#include <babeltrace/graph/connection-internal.h>
 #include <babeltrace/object-internal.h>
 #include <babeltrace/compiler.h>
 
index 91fa2353313ad310c5d0d718ed6cb46d4d15c1b5..1f01d3191e3b9a9e436531732bfd19a91dcd825e 100644 (file)
@@ -28,9 +28,9 @@
 
 #include <babeltrace/compiler.h>
 #include <babeltrace/values.h>
-#include <babeltrace/component/component-sink-internal.h>
-#include <babeltrace/component/component-internal.h>
-#include <babeltrace/component/notification/notification.h>
+#include <babeltrace/graph/component-sink-internal.h>
+#include <babeltrace/graph/component-internal.h>
+#include <babeltrace/graph/notification.h>
 
 BT_HIDDEN
 enum bt_component_status bt_component_sink_validate(
index bddd2f6a2408fee405133de591b0d6824e0eb7c0..7d43e34c8f154a5d7ede3aad5ad7ac78b4f3abc1 100644 (file)
 
 #include <babeltrace/ref.h>
 #include <babeltrace/compiler.h>
-#include <babeltrace/component/component-source-internal.h>
-#include <babeltrace/component/component-internal.h>
-#include <babeltrace/component/port-internal.h>
-#include <babeltrace/component/notification/iterator.h>
-#include <babeltrace/component/notification/iterator-internal.h>
+#include <babeltrace/graph/component-source-internal.h>
+#include <babeltrace/graph/component-internal.h>
+#include <babeltrace/graph/port-internal.h>
+#include <babeltrace/graph/notification-iterator.h>
+#include <babeltrace/graph/notification-iterator-internal.h>
 
 BT_HIDDEN
 enum bt_component_status bt_component_source_validate(
index 4fc939e5b13cfb182ed7960e01b2c8c58856c62c..bf6f9425dbbc8ebc54c32c297f0bffc923230c38 100644 (file)
@@ -33,7 +33,7 @@
 #include <babeltrace/plugin/plugin-so-internal.h>
 #include <babeltrace/plugin/plugin-dev.h>
 #include <babeltrace/plugin/plugin-internal.h>
-#include <babeltrace/component/component-class-internal.h>
+#include <babeltrace/graph/component-class-internal.h>
 #include <string.h>
 #include <stdbool.h>
 #include <glib.h>
index 92de35798f1944a1f2bd693a78bc7e0fe0898712..c4b6f68da94b6b3c41c0489b6eaa4b72e76779fb 100644 (file)
@@ -38,9 +38,9 @@
 #include <babeltrace/ctf-ir/stream.h>
 #include <babeltrace/ctf-ir/clock-class.h>
 #include <babeltrace/ctf-ir/event-class.h>
-#include <babeltrace/component/notification/packet.h>
-#include <babeltrace/component/notification/event.h>
-#include <babeltrace/component/notification/stream.h>
+#include <babeltrace/graph/notification-packet.h>
+#include <babeltrace/graph/notification-event.h>
+#include <babeltrace/graph/notification-stream.h>
 #include <babeltrace/ref.h>
 #include <glib.h>
 
index 905e26a946525c99ce4b35716d3d8d12fd0ea2c8..ceeefdf5cf2b23768fddea02f79583889fe21eab 100644 (file)
@@ -30,7 +30,7 @@
 #include <inttypes.h>
 #include <sys/mman.h>
 #include <babeltrace/ctf-ir/stream.h>
-#include <babeltrace/component/notification/iterator.h>
+#include <babeltrace/graph/notification-iterator.h>
 #include "file.h"
 #include "metadata.h"
 #include "../common/notif-iter/notif-iter.h"
index f559a7ba47d2f735158de748ad4df31c213c012f..9a38834a7ca56a0499d0978b8d7d06de5e78a53f 100644 (file)
 
 #include <babeltrace/ctf-ir/packet.h>
 #include <babeltrace/ctf-ir/clock-class.h>
-#include <babeltrace/component/private-component.h>
-#include <babeltrace/component/component.h>
-#include <babeltrace/component/notification/iterator.h>
-#include <babeltrace/component/notification/private-iterator.h>
-#include <babeltrace/component/notification/stream.h>
-#include <babeltrace/component/notification/event.h>
-#include <babeltrace/component/notification/packet.h>
-#include <babeltrace/component/notification/heap.h>
+#include <babeltrace/graph/private-component.h>
+#include <babeltrace/graph/component.h>
+#include <babeltrace/graph/notification-iterator.h>
+#include <babeltrace/graph/private-notification-iterator.h>
+#include <babeltrace/graph/notification-stream.h>
+#include <babeltrace/graph/notification-event.h>
+#include <babeltrace/graph/notification-packet.h>
+#include <babeltrace/graph/notification-heap.h>
 #include <plugins-common.h>
 #include <glib.h>
 #include <assert.h>
index 037d47eebc88978e8f9a3d64bf09182ca3013262..43977d286ba137d1b109a0fada8f45e4ac73cabe 100644 (file)
@@ -29,7 +29,7 @@
  */
 
 #include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/component/component.h>
+#include <babeltrace/graph/component.h>
 #include "data-stream.h"
 
 #define CTF_FS_COMPONENT_DESCRIPTION \
index a99f170d3e8b741e96cb05c128042a88201adb1d..e2f99b476fd57cd28405aa0b8159ce43d939bffa 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 #include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/component/component.h>
+#include <babeltrace/graph/component.h>
 
 #define LTTNG_LIVE_COMPONENT_DESCRIPTION "Component implementing an LTTng-live client."
 
index 0c8b3c2b63b8ac187d09443288992570a33a6437..2d996abb2631a7d402a98b4a5de0eecdb7ce0ad7 100644 (file)
@@ -27,7 +27,7 @@
  */
 
 #include "lttng-live-internal.h"
-#include <babeltrace/component/component-source.h>
+#include <babeltrace/graph/component-source.h>
 #include <plugins-common.h>
 
 BT_HIDDEN
index 6fa10f3844f5bd41acf4a38f242d2ace1eb3eae8..5ce38d894a56226e7f58bd62942234e1242a2800 100644 (file)
  */
 
 #include <babeltrace/plugin/plugin-dev.h>
-#include <babeltrace/component/component.h>
-#include <babeltrace/component/component-filter.h>
-#include <babeltrace/component/notification/notification.h>
-#include <babeltrace/component/notification/iterator.h>
-#include <babeltrace/component/notification/event.h>
+#include <babeltrace/graph/component.h>
+#include <babeltrace/graph/component-filter.h>
+#include <babeltrace/graph/notification.h>
+#include <babeltrace/graph/notification-iterator.h>
+#include <babeltrace/graph/notification-event.h>
 #include <plugins-common.h>
 #include "muxer.h"
 
index 045673686b6361846c662f40b28fc8121e1e553b..66b476e92f3052062b2ab5337155b0fd7d727dad 100644 (file)
  */
 
 #include <babeltrace/plugin/plugin-dev.h>
-#include <babeltrace/component/component.h>
-#include <babeltrace/component/private-component.h>
-#include <babeltrace/component/component-sink.h>
-#include <babeltrace/component/port.h>
-#include <babeltrace/component/private-port.h>
-#include <babeltrace/component/connection.h>
-#include <babeltrace/component/private-connection.h>
-#include <babeltrace/component/notification/notification.h>
-#include <babeltrace/component/notification/iterator.h>
-#include <babeltrace/component/notification/event.h>
+#include <babeltrace/graph/component.h>
+#include <babeltrace/graph/private-component.h>
+#include <babeltrace/graph/component-sink.h>
+#include <babeltrace/graph/port.h>
+#include <babeltrace/graph/private-port.h>
+#include <babeltrace/graph/connection.h>
+#include <babeltrace/graph/private-connection.h>
+#include <babeltrace/graph/notification.h>
+#include <babeltrace/graph/notification-iterator.h>
+#include <babeltrace/graph/notification-event.h>
 #include <babeltrace/values.h>
 #include <babeltrace/compiler.h>
 #include <babeltrace/common-internal.h>
index c819365f87f2436c92579ad30a9d5661968e458c..956527607b1ca6819e81f7859c39084a7590ead0 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <stdbool.h>
 #include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/component/component.h>
+#include <babeltrace/graph/component.h>
 
 enum text_default {
        TEXT_DEFAULT_UNSET,
index 44d191c303f6177cc641fa3ce29c18f0f5be0a91..df4b5a3b936e11a7491888b4d0bc7ca94fbb1e54 100644 (file)
  */
 
 #include <babeltrace/plugin/plugin-dev.h>
-#include <babeltrace/component/component.h>
-#include <babeltrace/component/private-component.h>
-#include <babeltrace/component/private-port.h>
-#include <babeltrace/component/port.h>
-#include <babeltrace/component/private-connection.h>
-#include <babeltrace/component/component-sink.h>
-#include <babeltrace/component/notification/iterator.h>
-#include <babeltrace/component/notification/notification.h>
+#include <babeltrace/graph/component.h>
+#include <babeltrace/graph/private-component.h>
+#include <babeltrace/graph/private-port.h>
+#include <babeltrace/graph/port.h>
+#include <babeltrace/graph/private-connection.h>
+#include <babeltrace/graph/component-sink.h>
+#include <babeltrace/graph/notification-iterator.h>
+#include <babeltrace/graph/notification.h>
 #include <plugins-common.h>
 #include <assert.h>
 #include "dummy.h"
index 31a84e83b1613a54a876b6a7b12fb70293e4daa6..77e25111c9d573e4afd7c74e3652511f28f1b881 100644 (file)
@@ -24,9 +24,9 @@
  */
 
 #include <glib.h>
-#include <babeltrace/component/private-component.h>
-#include <babeltrace/component/private-port.h>
-#include <babeltrace/component/port.h>
+#include <babeltrace/graph/private-component.h>
+#include <babeltrace/graph/private-port.h>
+#include <babeltrace/graph/port.h>
 
 struct dummy {
        GPtrArray *iterators;
index 9d15ba1daefa49a9075cccf96a544e66faab4afb..2d487f19ef0bc292f3f18a88fb01abcf57a29e59 100644 (file)
 
 #include "trimmer.h"
 #include "iterator.h"
-#include <babeltrace/component/notification/iterator.h>
-#include <babeltrace/component/notification/private-iterator.h>
-#include <babeltrace/component/notification/notification.h>
-#include <babeltrace/component/notification/event.h>
-#include <babeltrace/component/notification/stream.h>
-#include <babeltrace/component/notification/packet.h>
-#include <babeltrace/component/component-filter.h>
-#include <babeltrace/component/private-component-filter.h>
-#include <babeltrace/component/private-port.h>
-#include <babeltrace/component/private-connection.h>
-#include <babeltrace/component/private-component.h>
+#include <babeltrace/graph/notification-iterator.h>
+#include <babeltrace/graph/private-notification-iterator.h>
+#include <babeltrace/graph/notification.h>
+#include <babeltrace/graph/notification-event.h>
+#include <babeltrace/graph/notification-stream.h>
+#include <babeltrace/graph/notification-packet.h>
+#include <babeltrace/graph/component-filter.h>
+#include <babeltrace/graph/private-component-filter.h>
+#include <babeltrace/graph/private-port.h>
+#include <babeltrace/graph/private-connection.h>
+#include <babeltrace/graph/private-component.h>
 #include <babeltrace/ctf-ir/event.h>
 #include <babeltrace/ctf-ir/stream.h>
 #include <babeltrace/ctf-ir/stream-class.h>
index 3fe3dc4b735dad991d9e367656e23f594d78e724..3fd99a729f229595ac179f1cc51b344df9592407 100644 (file)
  */
 
 #include "trimmer.h"
-#include <babeltrace/component/notification/notification.h>
-#include <babeltrace/component/notification/iterator.h>
-#include <babeltrace/component/private-component.h>
-#include <babeltrace/component/private-port.h>
+#include <babeltrace/graph/notification.h>
+#include <babeltrace/graph/notification-iterator.h>
+#include <babeltrace/graph/private-component.h>
+#include <babeltrace/graph/private-port.h>
 
 struct trimmer_iterator {
        /* Input iterator associated with this output iterator. */
index ec34c973fa135fc4353e3986988542c0fb1279e1..d3f907e168f4f40eaa81247df333a2bab367d37c 100644 (file)
  */
 
 #include <babeltrace/plugin/plugin-dev.h>
-#include <babeltrace/component/component.h>
-#include <babeltrace/component/private-component.h>
-#include <babeltrace/component/component-filter.h>
-#include <babeltrace/component/notification/notification.h>
-#include <babeltrace/component/notification/iterator.h>
-#include <babeltrace/component/notification/private-iterator.h>
-#include <babeltrace/component/notification/event.h>
+#include <babeltrace/graph/component.h>
+#include <babeltrace/graph/private-component.h>
+#include <babeltrace/graph/component-filter.h>
+#include <babeltrace/graph/notification.h>
+#include <babeltrace/graph/notification-iterator.h>
+#include <babeltrace/graph/private-notification-iterator.h>
+#include <babeltrace/graph/notification-event.h>
 #include <plugins-common.h>
 #include "trimmer.h"
 #include "iterator.h"
index e4ee88246465841d71deca2229742c06f57a4dc7..165d7c8b3b77b2aefc05166d0ed0459069c27c3d 100644 (file)
@@ -30,7 +30,7 @@
 #include <stdbool.h>
 #include <babeltrace/babeltrace-internal.h>
 #include <babeltrace/values.h>
-#include <babeltrace/component/private-component.h>
+#include <babeltrace/graph/private-component.h>
 
 #define NSEC_PER_SEC   1000000000LL
 
index a7f4024bea014f814a1bedee25fe0ce89edd7abe..8f1d2fc1942eec526cb457a5954cbf5a635eec46 100644 (file)
 
 #include <babeltrace/ctf-ir/packet.h>
 #include <babeltrace/plugin/plugin-dev.h>
-#include <babeltrace/component/component.h>
-#include <babeltrace/component/private-component.h>
-#include <babeltrace/component/component-sink.h>
-#include <babeltrace/component/private-component-sink.h>
-#include <babeltrace/component/private-port.h>
-#include <babeltrace/component/private-connection.h>
-#include <babeltrace/component/notification/notification.h>
-#include <babeltrace/component/notification/iterator.h>
-#include <babeltrace/component/notification/event.h>
-#include <babeltrace/component/notification/packet.h>
+#include <babeltrace/graph/component.h>
+#include <babeltrace/graph/private-component.h>
+#include <babeltrace/graph/component-sink.h>
+#include <babeltrace/graph/private-component-sink.h>
+#include <babeltrace/graph/private-port.h>
+#include <babeltrace/graph/private-connection.h>
+#include <babeltrace/graph/notification.h>
+#include <babeltrace/graph/notification-iterator.h>
+#include <babeltrace/graph/notification-event.h>
+#include <babeltrace/graph/notification-packet.h>
 #include <plugins-common.h>
 #include <stdio.h>
 #include <stdbool.h>
index 12e2b65fbdfc83a807b6f16b09dffba48f413f23..6c6fed35f89bf030db1846096b7d5fbeffd986ba 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <stdbool.h>
 #include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/component/component.h>
+#include <babeltrace/graph/component.h>
 #include <babeltrace/ctf-writer/writer.h>
 
 struct writer_component {
index 93fbb02367ce9cf01a0d90b51f9a858d249e6f4c..735bf2ae19a84047d3c09afe51d9a96ceccf3314 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #include <babeltrace/plugin/plugin-dev.h>
-#include <babeltrace/component/component-class.h>
+#include <babeltrace/graph/component-class.h>
 #include <babeltrace/values.h>
 #include <babeltrace/ref.h>
 #include <assert.h>
index bacce9f6ce0f0b1778f32564e6664f112e90d538..a8c1a42b049e813b2c05e7f9905d8033e1bf1ee4 100644 (file)
@@ -24,9 +24,9 @@
 #include <stdlib.h>
 #include <babeltrace/compiler.h>
 #include <babeltrace/ref.h>
-#include <babeltrace/component/notification/heap.h>
-#include <babeltrace/component/notification/notification.h>
-#include <babeltrace/component/notification/notification-internal.h>
+#include <babeltrace/graph/notification-heap.h>
+#include <babeltrace/graph/notification.h>
+#include <babeltrace/graph/notification-internal.h>
 
 #define NR_TESTS 7
 
This page took 0.144371 seconds and 4 git commands to generate.