Fix: add missing void param to bt_clock_class_priority_map_create
[babeltrace.git] / bindings / python / bt2 / native_btcomponent.i
index 6394efd226a315e782eb6197003ea5d98e6b75af..ea3e0f8a869c326accda4306e541b6942bc29dd8 100644 (file)
  * THE SOFTWARE.
  */
 
-%{
-#include <babeltrace/component/component.h>
-#include <babeltrace/component/component-source.h>
-#include <babeltrace/component/component-sink.h>
-#include <babeltrace/component/component-filter.h>
-%}
-
 /* Types */
 struct bt_component;
 
 /* Status */
 enum bt_component_status {
-       BT_COMPONENT_STATUS_OK =                0,
-       BT_COMPONENT_STATUS_END =               1,
-       BT_COMPONENT_STATUS_AGAIN =             2,
-       BT_COMPONENT_STATUS_ERROR =             -1,
-       BT_COMPONENT_STATUS_UNSUPPORTED =       -2,
-       BT_COMPONENT_STATUS_INVALID =           -3,
-       BT_COMPONENT_STATUS_NOMEM =             -4,
+       BT_COMPONENT_STATUS_OK = 0,
+       BT_COMPONENT_STATUS_END = 1,
+       BT_COMPONENT_STATUS_AGAIN = 11,
+       BT_COMPONENT_STATUS_REFUSE_PORT_CONNECTION = 111,
+       BT_COMPONENT_STATUS_ERROR = -1,
+       BT_COMPONENT_STATUS_UNSUPPORTED = -2,
+       BT_COMPONENT_STATUS_INVALID = -22,
+       BT_COMPONENT_STATUS_NOMEM = -12,
+       BT_COMPONENT_STATUS_NOT_FOUND = -19,
+       BT_COMPONENT_STATUS_GRAPH_IS_CANCELED = 125,
 };
 
 /* General functions */
-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);
 const char *bt_component_get_name(struct bt_component *component);
 struct bt_component_class *bt_component_get_class(
                struct bt_component *component);
 enum bt_component_class_type bt_component_get_class_type(
                struct bt_component *component);
+struct bt_graph *bt_component_get_graph(struct bt_component *component);
+struct bt_component *bt_component_from_private_component(
+               struct bt_private_component *private_component);
 
 /* Source component functions */
-struct bt_notification_iterator *bt_component_source_create_notification_iterator_with_init_method_data(
-        struct bt_component *component, void *init_method_data);
-
-/* Filter component functions */
-%{
-static struct bt_notification_iterator *bt_component_filter_get_input_iterator_private(
-               struct bt_component *filter, unsigned int index)
-{
-       struct bt_notification_iterator *iterator = NULL;
+int64_t bt_component_source_get_output_port_count(
+               struct bt_component *component);
+struct bt_port *bt_component_source_get_output_port_by_name(
+               struct bt_component *component, const char *name);
+struct bt_port *bt_component_source_get_output_port_by_index(
+               struct bt_component *component, uint64_t index);
 
-       if (bt_component_filter_get_input_iterator(filter, index, &iterator)) {
-               iterator = NULL;
-               goto end;
-       }
+/* Private source component functions */
+struct bt_private_port *
+bt_private_component_source_get_output_private_port_by_name(
+               struct bt_private_component *private_component,
+               const char *name);
+struct bt_private_port *
+bt_private_component_source_get_output_private_port_by_index(
+               struct bt_private_component *private_component,
+               uint64_t index);
+enum bt_component_status
+bt_private_component_source_add_output_private_port(
+               struct bt_private_component *private_component,
+               const char *name, void *user_data,
+               struct bt_private_port **BTOUTPRIVPORT);
 
-end:
-       return iterator;
-}
-%}
+/* Filter component functions */
+int64_t bt_component_filter_get_input_port_count(
+               struct bt_component *component);
+struct bt_port *bt_component_filter_get_input_port_by_name(
+               struct bt_component *component, const char *name);
+struct bt_port *bt_component_filter_get_input_port_by_index(
+               struct bt_component *component, uint64_t index);
+int64_t bt_component_filter_get_output_port_count(
+               struct bt_component *component);
+struct bt_port *bt_component_filter_get_output_port_by_name(
+               struct bt_component *component, const char *name);
+struct bt_port *bt_component_filter_get_output_port_by_index(
+               struct bt_component *component, uint64_t index);
 
-struct bt_notification_iterator *bt_component_filter_create_notification_iterator_with_init_method_data(
-               struct bt_component *component, void *init_method_data);
-enum bt_component_status bt_component_filter_add_iterator(
-               struct bt_component *component,
-               struct bt_notification_iterator *iterator);
-enum bt_component_status bt_component_filter_set_minimum_input_count(
-               struct bt_component *filter, unsigned int minimum);
-enum bt_component_status bt_component_filter_set_maximum_input_count(
-               struct bt_component *filter, unsigned int maximum);
-enum bt_component_status bt_component_filter_get_input_count(
-               struct bt_component *filter, unsigned int *OUTPUT);
-struct bt_notification_iterator *bt_component_filter_get_input_iterator_private(
-               struct bt_component *filter, unsigned int index);
+/* Private filter component functions */
+struct bt_private_port *
+bt_private_component_filter_get_output_private_port_by_name(
+               struct bt_private_component *private_component,
+               const char *name);
+struct bt_private_port *
+bt_private_component_filter_get_output_private_port_by_index(
+               struct bt_private_component *private_component, uint64_t index);
+enum bt_component_status
+bt_private_component_filter_add_output_private_port(
+               struct bt_private_component *private_component,
+               const char *name, void *user_data,
+               struct bt_private_port **BTOUTPRIVPORT);
+struct bt_private_port *
+bt_private_component_filter_get_input_private_port_by_name(
+               struct bt_private_component *private_component,
+               const char *name);
+struct bt_private_port *
+bt_private_component_filter_get_input_private_port_by_index(
+               struct bt_private_component *private_component, uint64_t index);
+enum bt_component_status
+bt_private_component_filter_add_input_private_port(
+               struct bt_private_component *private_component,
+               const char *name, void *user_data,
+               struct bt_private_port **BTOUTPRIVPORT);
 
 /* Sink component functions */
-%{
-static struct bt_notification_iterator *bt_component_sink_get_input_iterator_private(
-               struct bt_component *sink, unsigned int index)
-{
-       struct bt_notification_iterator *iterator = NULL;
-
-       if (bt_component_sink_get_input_iterator(sink, index, &iterator)) {
-               iterator = NULL;
-               goto end;
-       }
-
-end:
-       return iterator;
-}
-%}
-
-enum bt_component_status bt_component_sink_add_iterator(
-               struct bt_component *component,
-               struct bt_notification_iterator *iterator);
-enum bt_component_status bt_component_sink_consume(
+int64_t bt_component_sink_get_input_port_count(
                struct bt_component *component);
-enum bt_component_status bt_component_sink_set_minimum_input_count(
-               struct bt_component *sink, unsigned int minimum);
-enum bt_component_status bt_component_sink_set_maximum_input_count(
-               struct bt_component *sink, unsigned int maximum);
-enum bt_component_status bt_component_sink_get_input_count(
-               struct bt_component *sink, unsigned int *OUTPUT);
-struct bt_notification_iterator *bt_component_sink_get_input_iterator_private(
-               struct bt_component *sink, unsigned int index);
+struct bt_port *bt_component_sink_get_input_port_by_name(
+               struct bt_component *component, const char *name);
+struct bt_port *bt_component_sink_get_input_port_by_index(
+               struct bt_component *component, uint64_t index);
+
+/* Private sink component functions */
+struct bt_private_port *
+bt_private_component_sink_get_input_private_port_by_name(
+               struct bt_private_component *private_component,
+               const char *name);
+struct bt_private_port *
+bt_private_component_sink_get_input_private_port_by_index(
+               struct bt_private_component *private_component, uint64_t index);
+enum bt_component_status
+bt_private_component_sink_add_input_private_port(
+               struct bt_private_component *private_component,
+               const char *name, void *user_data,
+               struct bt_private_port **BTOUTPRIVPORT);
This page took 0.027433 seconds and 4 git commands to generate.