Path: blob/main/devices/src/usb/xhci/xhci_backend_device_provider.rs
5394 views
// Copyright 2019 The ChromiumOS Authors1// Use of this source code is governed by a BSD-style license that can be2// found in the LICENSE file.34use std::sync::Arc;56use base::RawDescriptor;78use super::usb_hub::UsbHub;9use crate::usb::backend::error::Result;10use crate::utils::EventLoop;11use crate::utils::FailHandle;1213/// Xhci backend provider will run on an EventLoop and connect new devices to usb ports.14pub trait XhciBackendDeviceProvider: Send + Sync {15/// Start the provider on EventLoop.16fn start(17&mut self,18fail_handle: Arc<dyn FailHandle>,19event_loop: Arc<EventLoop>,20hub: Arc<UsbHub>,21) -> Result<()>;2223/// Keep raw descriptors that should be kept open.24fn keep_rds(&self) -> Vec<RawDescriptor>;25}262728