+enum bt_component_status writer_component_accept_port_connection(
+ struct bt_private_component *component,
+ struct bt_private_port *self_port,
+ struct bt_port *other_port)
+{
+ enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
+ struct bt_private_connection *connection;
+ struct writer_component *writer;
+
+ writer = bt_private_component_get_user_data(component);
+ assert(writer);
+ assert(!writer->input_iterator);
+ connection = bt_private_port_get_private_connection(self_port);
+ assert(connection);
+ writer->input_iterator =
+ bt_private_connection_create_notification_iterator(connection);
+
+ if (!writer->input_iterator) {
+ ret = BT_COMPONENT_STATUS_ERROR;
+ }
+ bt_put(connection);
+ return ret;
+}
+
+static
+enum bt_component_status run(struct bt_private_component *component)