Remove the need to implement the notification iterator's "get" method
[babeltrace.git] / include / babeltrace / component / component-class.h
index 664d7bcf2e153c454905017f54a4ea6629e3ff0a..ea95f4e068a8fe794281583b274ed2765683412e 100644 (file)
  */
 
 #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.
@@ -50,41 +57,70 @@ enum bt_component_class_type {
 };
 
 typedef enum bt_component_status (*bt_component_class_init_method)(
-               struct bt_component *component, struct bt_value *params,
-               void *init_method_data);
+               struct bt_private_component *private_component,
+               struct bt_value *params, void *init_method_data);
 
-typedef void (*bt_component_class_destroy_method)(struct bt_component *component);
+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_component *component,
-               struct bt_notification_iterator *iterator, void *init_method_data);
+               struct bt_private_component *private_component,
+               struct bt_private_port *private_port,
+               struct bt_private_notification_iterator *private_notification_iterator);
 
-typedef void (*bt_component_class_notification_iterator_destroy_method)(
-               struct bt_notification_iterator *iterator);
+typedef void (*bt_component_class_notification_iterator_finalize_method)(
+               struct bt_private_notification_iterator *private_notification_iterator);
 
-typedef struct bt_notification *(*bt_component_class_notification_iterator_get_method)(
-               struct bt_notification_iterator *iterator);
-
-typedef enum bt_notification_iterator_status (*bt_component_class_notification_iterator_next_method)(
-               struct bt_notification_iterator *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_notification_iterator *iterator, int64_t time);
+               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_destroy_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_destroy_method destroy_method);
+               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);
 
@@ -109,6 +145,13 @@ extern const char *bt_component_class_get_name(
 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.
  *
This page took 0.023618 seconds and 4 git commands to generate.