typedef enum bt_notification_iterator_status
(*bt_component_class_notification_iterator_init_method)(
struct bt_component *component,
- struct bt_notification_iterator *iterator);
+ struct bt_notification_iterator *iterator, void *init_method_data);
typedef void (*bt_component_class_notification_iterator_destroy_method)(
struct bt_notification_iterator *iterator);
struct bt_notification_iterator *bt_component_filter_create_iterator(
struct bt_component *component);
+extern
+struct bt_notification_iterator *bt_component_filter_create_iterator_with_init_method_data(
+ struct bt_component *component, void *init_method_data);
+
/* Defaults to 1. */
extern enum bt_component_status
bt_component_filter_set_minimum_input_count(struct bt_component *filter,
BT_HIDDEN
struct bt_notification_iterator *bt_component_create_iterator(
- struct bt_component *component);
+ struct bt_component *component, void *init_method_data);
#endif /* BABELTRACE_COMPONENT_COMPONENT_INTERNAL_H */
struct bt_notification_iterator *bt_component_source_create_iterator(
struct bt_component *component);
+extern
+struct bt_notification_iterator *bt_component_source_create_iterator_with_init_method_data(
+ struct bt_component *component, void *init_method_data);
+
#ifdef __cplusplus
}
#endif
BT_HIDDEN
struct bt_notification_iterator *bt_component_create_iterator(
- struct bt_component *component)
+ struct bt_component *component, void *init_method_data)
{
enum bt_notification_iterator_status ret_iterator;
enum bt_component_class_type type;
source_class = container_of(class, struct bt_component_class_source, parent);
assert(source_class->methods.iterator.init);
status = source_class->methods.iterator.init(component,
- iterator);
+ iterator, init_method_data);
if (status < 0) {
goto error;
}
filter_class = container_of(class, struct bt_component_class_filter, parent);
assert(filter_class->methods.iterator.init);
status = filter_class->methods.iterator.init(component,
- iterator);
+ iterator, init_method_data);
if (status < 0) {
goto error;
}
struct bt_notification_iterator *bt_component_filter_create_iterator(
struct bt_component *component)
{
- return bt_component_create_iterator(component);
+ return bt_component_create_iterator(component, NULL);
+}
+
+struct bt_notification_iterator *bt_component_filter_create_iterator_with_init_method_data(
+ struct bt_component *component, void *init_method_data)
+{
+ return bt_component_create_iterator(component, init_method_data);
}
static
struct bt_notification_iterator *bt_component_source_create_iterator(
struct bt_component *component)
{
- return bt_component_create_iterator(component);
+ return bt_component_create_iterator(component, NULL);
+}
+
+struct bt_notification_iterator *bt_component_source_create_iterator_with_init_method_data(
+ struct bt_component *component, void *init_method_data)
+{
+ return bt_component_create_iterator(component, init_method_data);
}
}
enum bt_notification_iterator_status ctf_fs_iterator_init(struct bt_component *source,
- struct bt_notification_iterator *it)
+ struct bt_notification_iterator *it,
+ UNUSED_VAR void *init_method_data)
{
struct ctf_fs_iterator *ctf_it;
struct ctf_fs_component *ctf_fs;
BT_HIDDEN
enum bt_notification_iterator_status ctf_fs_iterator_init(
struct bt_component *source,
- struct bt_notification_iterator *it);
+ struct bt_notification_iterator *it,
+ void *init_method_data);
void ctf_fs_iterator_destroy(struct bt_notification_iterator *it);
#include <babeltrace/ctf-ir/trace.h>
#include <babeltrace/ctf-ir/fields.h>
#include <assert.h>
+#include <plugins-common.h>
BT_HIDDEN
void trimmer_iterator_destroy(struct bt_notification_iterator *it)
BT_HIDDEN
enum bt_notification_iterator_status trimmer_iterator_init(
struct bt_component *component,
- struct bt_notification_iterator *iterator)
+ struct bt_notification_iterator *iterator,
+ UNUSED_VAR void *init_method_data)
{
enum bt_notification_iterator_status ret =
BT_NOTIFICATION_ITERATOR_STATUS_OK;
BT_HIDDEN
enum bt_notification_iterator_status trimmer_iterator_init(
struct bt_component *component,
- struct bt_notification_iterator *iterator);
+ struct bt_notification_iterator *iterator, void *init_method_data);
BT_HIDDEN
void trimmer_iterator_destroy(struct bt_notification_iterator *it);
static enum bt_notification_iterator_status dummy_iterator_init_method(
struct bt_component *component,
- struct bt_notification_iterator *iterator)
+ struct bt_notification_iterator *iterator,
+ void *init_method_data)
{
return BT_NOTIFICATION_ITERATOR_STATUS_OK;
}