Fix: src.ctf.lttng-live: emitting stream end msg with no stream
[babeltrace.git] / include / babeltrace2 / graph / component-class-sink.h
index f4b2bb8c6fae1059a4fd3e7d69d4e1de86598584..aa56d2665fd5156f4d5ae9dd876236a49b39809c 100644 (file)
@@ -1,9 +1,8 @@
-#ifndef BABELTRACE_GRAPH_COMPONENT_CLASS_SINK_H
-#define BABELTRACE_GRAPH_COMPONENT_CLASS_SINK_H
+#ifndef BABELTRACE2_GRAPH_COMPONENT_CLASS_SINK_H
+#define BABELTRACE2_GRAPH_COMPONENT_CLASS_SINK_H
 
 /*
- * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
- * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
  * SOFTWARE.
  */
 
-#include <stdint.h>
+#ifndef __BT_IN_BABELTRACE_H
+# error "Please include <babeltrace2/babeltrace.h> instead."
+#endif
 
-/* For bt_self_component_status */
-#include <babeltrace2/graph/self-component.h>
+#include <stdint.h>
 
-/* For bt_query_status */
 #include <babeltrace2/graph/component-class.h>
-
-/* For bt_component_class_status */
-#include <babeltrace2/graph/component-class-const.h>
-
-/*
- * For bt_component_class, bt_component_class_sink, bt_port_output,
- * bt_query_executor, bt_self_component_class_sink,
- * bt_self_component_sink, bt_self_component_port_input, bt_value,
- * __BT_UPCAST
- */
 #include <babeltrace2/types.h>
-
-/* For bt_logging_level */
 #include <babeltrace2/logging.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-typedef bt_self_component_status (*bt_component_class_sink_init_method)(
+typedef bt_component_class_get_supported_mip_versions_method_status
+(*bt_component_class_sink_get_supported_mip_versions_method)(
+               bt_self_component_class_sink *comp_class,
+               const bt_value *params, void *init_method_data,
+               bt_logging_level log_level,
+               bt_integer_range_set_unsigned *supported_versions);
+
+typedef bt_component_class_initialize_method_status
+(*bt_component_class_sink_initialize_method)(
                bt_self_component_sink *self_component,
+               bt_self_component_sink_configuration *config,
                const bt_value *params, void *init_method_data);
 
 typedef void (*bt_component_class_sink_finalize_method)(
                bt_self_component_sink *self_component);
 
-typedef bt_query_status
+typedef bt_component_class_query_method_status
 (*bt_component_class_sink_query_method)(
                bt_self_component_class_sink *comp_class,
-               const bt_query_executor *query_executor,
+               bt_private_query_executor *query_executor,
                const char *object, const bt_value *params,
-               bt_logging_level logging_level,
-               const bt_value **result);
+               void *method_data, const bt_value **result);
 
-typedef bt_self_component_status
+typedef bt_component_class_port_connected_method_status
 (*bt_component_class_sink_input_port_connected_method)(
                bt_self_component_sink *self_component,
                bt_self_component_port_input *self_port,
                const bt_port_output *other_port);
 
-typedef bt_self_component_status
+typedef enum bt_component_class_sink_graph_is_configured_method_status {
+       BT_COMPONENT_CLASS_SINK_GRAPH_IS_CONFIGURED_METHOD_STATUS_OK            = __BT_FUNC_STATUS_OK,
+       BT_COMPONENT_CLASS_SINK_GRAPH_IS_CONFIGURED_METHOD_STATUS_ERROR         = __BT_FUNC_STATUS_ERROR,
+       BT_COMPONENT_CLASS_SINK_GRAPH_IS_CONFIGURED_METHOD_STATUS_MEMORY_ERROR  = __BT_FUNC_STATUS_MEMORY_ERROR,
+} bt_component_class_sink_graph_is_configured_method_status;
+
+typedef bt_component_class_sink_graph_is_configured_method_status
 (*bt_component_class_sink_graph_is_configured_method)(
                bt_self_component_sink *self_component);
 
-typedef bt_self_component_status (*bt_component_class_sink_consume_method)(
-       bt_self_component_sink *self_component);
+typedef enum bt_component_class_sink_consume_method_status {
+       BT_COMPONENT_CLASS_SINK_CONSUME_METHOD_STATUS_OK                = __BT_FUNC_STATUS_OK,
+       BT_COMPONENT_CLASS_SINK_CONSUME_METHOD_STATUS_ERROR             = __BT_FUNC_STATUS_ERROR,
+       BT_COMPONENT_CLASS_SINK_CONSUME_METHOD_STATUS_MEMORY_ERROR      = __BT_FUNC_STATUS_MEMORY_ERROR,
+       BT_COMPONENT_CLASS_SINK_CONSUME_METHOD_STATUS_AGAIN             = __BT_FUNC_STATUS_AGAIN,
+       BT_COMPONENT_CLASS_SINK_CONSUME_METHOD_STATUS_END               = __BT_FUNC_STATUS_END,
+} bt_component_class_sink_consume_method_status;
+
+typedef bt_component_class_sink_consume_method_status
+(*bt_component_class_sink_consume_method)(
+               bt_self_component_sink *self_component);
 
 static inline
 bt_component_class *bt_component_class_sink_as_component_class(
@@ -85,30 +95,43 @@ bt_component_class *bt_component_class_sink_as_component_class(
        return __BT_UPCAST(bt_component_class, comp_cls_sink);
 }
 
+extern bt_component_class_set_method_status
+bt_component_class_sink_set_get_supported_mip_versions_method(
+               bt_component_class_sink *comp_class,
+               bt_component_class_sink_get_supported_mip_versions_method method);
+
 extern
 bt_component_class_sink *bt_component_class_sink_create(
                const char *name,
                bt_component_class_sink_consume_method method);
 
-extern bt_component_class_status bt_component_class_sink_set_init_method(
+extern
+bt_component_class_set_method_status
+bt_component_class_sink_set_initialize_method(
                bt_component_class_sink *comp_class,
-               bt_component_class_sink_init_method method);
+               bt_component_class_sink_initialize_method method);
 
-extern bt_component_class_status bt_component_class_sink_set_finalize_method(
+extern
+bt_component_class_set_method_status
+bt_component_class_sink_set_finalize_method(
                bt_component_class_sink *comp_class,
                bt_component_class_sink_finalize_method method);
 
-extern bt_component_class_status
+extern
+bt_component_class_set_method_status
 bt_component_class_sink_set_input_port_connected_method(
                bt_component_class_sink *comp_class,
                bt_component_class_sink_input_port_connected_method method);
 
-extern bt_component_class_status
+extern
+bt_component_class_set_method_status
 bt_component_class_sink_set_graph_is_configured_method(
                bt_component_class_sink *comp_class,
                bt_component_class_sink_graph_is_configured_method method);
 
-extern bt_component_class_status bt_component_class_sink_set_query_method(
+extern
+bt_component_class_set_method_status
+bt_component_class_sink_set_query_method(
                bt_component_class_sink *comp_class,
                bt_component_class_sink_query_method method);
 
@@ -116,4 +139,4 @@ extern bt_component_class_status bt_component_class_sink_set_query_method(
 }
 #endif
 
-#endif /* BABELTRACE_GRAPH_COMPONENT_CLASS_SINK_H */
+#endif /* BABELTRACE2_GRAPH_COMPONENT_CLASS_SINK_H */
This page took 0.02503 seconds and 4 git commands to generate.