fidl_fuchsia_bluetooth_le

Trait CentralProxyInterface

Source
pub trait CentralProxyInterface: Send + Sync {
    type ListenL2capResponseFut: Future<Output = Result<ChannelListenerRegistryListenL2capResult, Error>> + Send;
    type ScanResponseFut: Future<Output = Result<(), Error>> + Send;
    type GetPeripheralsResponseFut: Future<Output = Result<Vec<RemoteDevice>, Error>> + Send;
    type GetPeripheralResponseFut: Future<Output = Result<Option<Box<RemoteDevice>>, Error>> + Send;
    type StartScanResponseFut: Future<Output = Result<Status, Error>> + Send;
    type ConnectPeripheralResponseFut: Future<Output = Result<Status, Error>> + Send;
    type DisconnectPeripheralResponseFut: Future<Output = Result<Status, Error>> + Send;

    // Required methods
    fn listen_l2cap(
        &self,
        payload: ChannelListenerRegistryListenL2capRequest,
    ) -> Self::ListenL2capResponseFut;
    fn scan(
        &self,
        options: &ScanOptions,
        result_watcher: ServerEnd<ScanResultWatcherMarker>,
    ) -> Self::ScanResponseFut;
    fn connect(
        &self,
        id: &PeerId,
        options: &ConnectionOptions,
        handle: ServerEnd<ConnectionMarker>,
    ) -> Result<(), Error>;
    fn get_peripherals(
        &self,
        service_uuids: Option<&[String]>,
    ) -> Self::GetPeripheralsResponseFut;
    fn get_peripheral(&self, identifier: &str) -> Self::GetPeripheralResponseFut;
    fn start_scan(
        &self,
        filter: Option<&ScanFilter>,
    ) -> Self::StartScanResponseFut;
    fn stop_scan(&self) -> Result<(), Error>;
    fn connect_peripheral(
        &self,
        identifier: &str,
        options: &ConnectionOptions,
        gatt_client: ServerEnd<ClientMarker>,
    ) -> Self::ConnectPeripheralResponseFut;
    fn disconnect_peripheral(
        &self,
        identifier: &str,
    ) -> Self::DisconnectPeripheralResponseFut;
}

Required Associated Types§

Required Methods§

Source

fn listen_l2cap( &self, payload: ChannelListenerRegistryListenL2capRequest, ) -> Self::ListenL2capResponseFut

Source

fn scan( &self, options: &ScanOptions, result_watcher: ServerEnd<ScanResultWatcherMarker>, ) -> Self::ScanResponseFut

Source

fn connect( &self, id: &PeerId, options: &ConnectionOptions, handle: ServerEnd<ConnectionMarker>, ) -> Result<(), Error>

Source

fn get_peripherals( &self, service_uuids: Option<&[String]>, ) -> Self::GetPeripheralsResponseFut

Source

fn get_peripheral(&self, identifier: &str) -> Self::GetPeripheralResponseFut

Source

fn start_scan(&self, filter: Option<&ScanFilter>) -> Self::StartScanResponseFut

Source

fn stop_scan(&self) -> Result<(), Error>

Source

fn connect_peripheral( &self, identifier: &str, options: &ConnectionOptions, gatt_client: ServerEnd<ClientMarker>, ) -> Self::ConnectPeripheralResponseFut

Source

fn disconnect_peripheral( &self, identifier: &str, ) -> Self::DisconnectPeripheralResponseFut

Implementors§