Fix: ctf writer test on Cygwin
[babeltrace.git] / include / babeltrace / plugin / plugin-dev.h
index d8d0281509600896b0cf211501cc7a196ced115b..c50a9e3eeeaca63762869af4b9aaac99bc0092da 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" {
@@ -145,13 +145,11 @@ struct __bt_plugin_component_class_descriptor {
        union {
                /* BT_COMPONENT_CLASS_TYPE_SOURCE */
                struct {
-                       bt_component_class_notification_iterator_get_method notif_iter_get;
                        bt_component_class_notification_iterator_next_method notif_iter_next;
                } source;
 
                /* BT_COMPONENT_CLASS_TYPE_FILTER */
                struct {
-                       bt_component_class_notification_iterator_get_method notif_iter_get;
                        bt_component_class_notification_iterator_next_method notif_iter_next;
                } filter;
 
@@ -170,10 +168,11 @@ enum __bt_plugin_component_class_descriptor_attribute_type {
        BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_FINALIZE_METHOD                     = 3,
        BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_QUERY_METHOD                        = 4,
        BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_PORT_CONNECTION_METHOD       = 5,
-       BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_DISCONNECTED_METHOD            = 6,
-       BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD              = 7,
-       BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD          = 8,
-       BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_SEEK_TIME_METHOD         = 9,
+       BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_CONNECTED_METHOD               = 7,
+       BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_DISCONNECTED_METHOD            = 8,
+       BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_INIT_METHOD              = 9,
+       BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_FINALIZE_METHOD          = 10,
+       BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_NOTIF_ITER_SEEK_TIME_METHOD         = 11,
 };
 
 /* Component class attribute (internal use) */
@@ -210,6 +209,9 @@ struct __bt_plugin_component_class_descriptor_attribute {
                /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_PORT_CONNECTION_METHOD */
                bt_component_class_accept_port_connection_method accept_port_connection_method;
 
+               /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_CONNECTED_METHOD */
+               bt_component_class_port_connected_method port_connected_method;
+
                /* BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_DISCONNECTED_METHOD */
                bt_component_class_port_disconnected_method port_disconnected_method;
 
@@ -372,18 +374,15 @@ struct __bt_plugin_component_class_descriptor_attribute {
  * _id:                     ID (any valid C identifier except `auto`).
  * _comp_class_id:          Component class ID (C identifier).
  * _name:                   Component class name (C string).
- * _notif_iter_get_method:  Component class's iterator get method
- *                          (bt_component_class_notification_iterator_get_method).
  * _notif_iter_next_method: Component class's iterator next method
  *                          (bt_component_class_notification_iterator_next_method).
  */
-#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _notif_iter_get_method, _notif_iter_next_method) \
+#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _notif_iter_next_method) \
        static struct __bt_plugin_component_class_descriptor __bt_plugin_source_component_class_descriptor_##_id##_##_comp_class_id = { \
                .plugin_descriptor = &__bt_plugin_descriptor_##_id,     \
                .name = _name,                                          \
                .type = BT_COMPONENT_CLASS_TYPE_SOURCE,                 \
                .methods.source = {                                     \
-                       .notif_iter_get = _notif_iter_get_method,       \
                        .notif_iter_next = _notif_iter_next_method,     \
                },                                                      \
        };                                                              \
@@ -396,18 +395,15 @@ struct __bt_plugin_component_class_descriptor_attribute {
  * _id:                   ID (any valid C identifier except `auto`).
  * _comp_class_id:        Component class ID (C identifier).
  * _name:                 Component class name (C string).
- * _notif_iter_get_method:  Component class's iterator get method
- *                          (bt_component_class_notification_iterator_get_method).
  * _notif_iter_next_method: Component class's iterator next method
  *                          (bt_component_class_notification_iterator_next_method).
  */
-#define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _notif_iter_get_method, _notif_iter_next_method) \
+#define BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(_id, _comp_class_id, _name, _notif_iter_next_method) \
        static struct __bt_plugin_component_class_descriptor __bt_plugin_filter_component_class_descriptor_##_id##_##_comp_class_id = { \
                .plugin_descriptor = &__bt_plugin_descriptor_##_id,     \
                .name = _name,                                          \
                .type = BT_COMPONENT_CLASS_TYPE_FILTER,                 \
                .methods.filter = {                                     \
-                       .notif_iter_get = _notif_iter_get_method,       \
                        .notif_iter_next = _notif_iter_next_method,     \
                },                                                      \
        };                                                              \
@@ -659,6 +655,42 @@ struct __bt_plugin_component_class_descriptor_attribute {
 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(_id, _comp_class_id, _x) \
        __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(accept_port_connection_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_ACCEPT_PORT_CONNECTION_METHOD, _id, _comp_class_id, sink, _x)
 
+/*
+ * Defines a port connected method attribute attached to a specific
+ * source component class descriptor.
+ *
+ * _id:            Plugin descriptor ID (C identifier).
+ * _comp_class_id: Component class descriptor ID (C identifier).
+ * _x:             Port connected method
+ *                 (bt_component_class_port_connected_method).
+ */
+#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
+       __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_CONNECTED_METHOD, _id, _comp_class_id, source, _x)
+
+/*
+ * Defines a port connected method attribute attached to a specific
+ * filter component class descriptor.
+ *
+ * _id:            Plugin descriptor ID (C identifier).
+ * _comp_class_id: Component class descriptor ID (C identifier).
+ * _x:             Port connected method
+ *                 (bt_component_class_port_connected_method).
+ */
+#define BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
+       __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_CONNECTED_METHOD, _id, _comp_class_id, filter, _x)
+
+/*
+ * Defines a port connected method attribute attached to a specific
+ * sink component class descriptor.
+ *
+ * _id:            Plugin descriptor ID (C identifier).
+ * _comp_class_id: Component class descriptor ID (C identifier).
+ * _x:             Port connected method
+ *                 (bt_component_class_port_connected_method).
+ */
+#define BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(_id, _comp_class_id, _x) \
+       __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE(port_connected_method, BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTE_TYPE_PORT_CONNECTED_METHOD, _id, _comp_class_id, sink, _x)
+
 /*
  * Defines a port disconnected method attribute attached to a specific
  * source component class descriptor.
@@ -831,13 +863,11 @@ struct __bt_plugin_component_class_descriptor_attribute {
  * C identifier in this version.
  *
  * _name:                   Component class name (C identifier).
- * _notif_iter_get_method:  Component class's iterator get method
- *                          (bt_component_class_notification_iterator_get_method).
  * _notif_iter_next_method: Component class's iterator next method
  *                          (bt_component_class_notification_iterator_next_method).
  */
-#define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _notif_iter_get_method, _notif_iter_next_method) \
-       BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _notif_iter_get_method, _notif_iter_next_method)
+#define BT_PLUGIN_SOURCE_COMPONENT_CLASS(_name, _notif_iter_next_method) \
+       BT_PLUGIN_SOURCE_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _notif_iter_next_method)
 
 /*
  * Defines a filter component class attached to the automatic plugin
@@ -845,13 +875,11 @@ struct __bt_plugin_component_class_descriptor_attribute {
  * C identifier in this version.
  *
  * _name:                   Component class name (C identifier).
- * _notif_iter_get_method:  Component class's iterator get method
- *                          (bt_component_class_notification_iterator_get_method).
  * _notif_iter_next_method: Component class's iterator next method
  *                          (bt_component_class_notification_iterator_next_method).
  */
-#define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _notif_iter_get_method, _notif_iter_next_method) \
-       BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _notif_iter_get_method, _notif_iter_next_method)
+#define BT_PLUGIN_FILTER_COMPONENT_CLASS(_name, _notif_iter_next_method) \
+       BT_PLUGIN_FILTER_COMPONENT_CLASS_WITH_ID(auto, _name, #_name, _notif_iter_next_method)
 
 /*
  * Defines a sink component class attached to the automatic plugin
@@ -1059,6 +1087,39 @@ struct __bt_plugin_component_class_descriptor_attribute {
 #define BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD(_name, _x) \
        BT_PLUGIN_SINK_COMPONENT_CLASS_ACCEPT_PORT_CONNECTION_METHOD_WITH_ID(auto, _name, _x)
 
+/*
+ * Defines a port connected method attribute attached to a source
+ * component class descriptor which is attached to the automatic plugin
+ * descriptor.
+ *
+ * _name: Component class name (C identifier).
+ * _x:    Port connected (bt_component_class_port_connected_method).
+ */
+#define BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_CONNECTED_METHOD(_name, _x) \
+       BT_PLUGIN_SOURCE_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
+
+/*
+ * Defines a port connected method attribute attached to a filter
+ * component class descriptor which is attached to the automatic plugin
+ * descriptor.
+ *
+ * _name: Component class name (C identifier).
+ * _x:    Port connected (bt_component_class_port_connected_method).
+ */
+#define BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_CONNECTED_METHOD(_name, _x) \
+       BT_PLUGIN_FILTER_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
+
+/*
+ * Defines a port connected method attribute attached to a sink
+ * component class descriptor which is attached to the automatic plugin
+ * descriptor.
+ *
+ * _name: Component class name (C identifier).
+ * _x:    Port connected (bt_component_class_port_connected_method).
+ */
+#define BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_CONNECTED_METHOD(_name, _x) \
+       BT_PLUGIN_SINK_COMPONENT_CLASS_PORT_CONNECTED_METHOD_WITH_ID(auto, _name, _x)
+
 /*
  * Defines a port disconnected method attribute attached to a source
  * component class descriptor which is attached to the automatic plugin
This page took 0.026274 seconds and 4 git commands to generate.