fidl_fuchsia_bluetooth_leTrait 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;
}