+static
+enum bt_component_status writer_component_new_connection(
+ struct bt_port *own_port, struct bt_connection *connection)
+{
+ enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
+ struct bt_component *component;
+ struct writer_component *writer;
+
+ component = bt_port_get_component(own_port);
+ assert(component);
+ writer = bt_component_get_private_data(component);
+ assert(writer);
+ assert(!writer->input_iterator);
+ writer->input_iterator = bt_connection_create_notification_iterator(
+ connection);
+
+ if (!writer->input_iterator) {
+ ret = BT_COMPONENT_STATUS_ERROR;
+ }
+ bt_put(component);
+ return ret;
+}
+