fidl_fuchsia_bluetooth_gatt

Trait RemoteServiceProxyInterface

Source
pub trait RemoteServiceProxyInterface: Send + Sync {
    type DiscoverCharacteristicsResponseFut: Future<Output = Result<(Status, Vec<Characteristic>), Error>> + Send;
    type ReadCharacteristicResponseFut: Future<Output = Result<(Status, Vec<u8>), Error>> + Send;
    type ReadLongCharacteristicResponseFut: Future<Output = Result<(Status, Vec<u8>), Error>> + Send;
    type WriteCharacteristicResponseFut: Future<Output = Result<Status, Error>> + Send;
    type WriteLongCharacteristicResponseFut: Future<Output = Result<Status, Error>> + Send;
    type ReadDescriptorResponseFut: Future<Output = Result<(Status, Vec<u8>), Error>> + Send;
    type ReadLongDescriptorResponseFut: Future<Output = Result<(Status, Vec<u8>), Error>> + Send;
    type WriteDescriptorResponseFut: Future<Output = Result<Status, Error>> + Send;
    type WriteLongDescriptorResponseFut: Future<Output = Result<Status, Error>> + Send;
    type ReadByTypeResponseFut: Future<Output = Result<RemoteServiceReadByTypeResult, Error>> + Send;
    type NotifyCharacteristicResponseFut: Future<Output = Result<Status, Error>> + Send;

    // Required methods
    fn discover_characteristics(
        &self,
    ) -> Self::DiscoverCharacteristicsResponseFut;
    fn read_characteristic(
        &self,
        id: u64,
    ) -> Self::ReadCharacteristicResponseFut;
    fn read_long_characteristic(
        &self,
        id: u64,
        offset: u16,
        max_bytes: u16,
    ) -> Self::ReadLongCharacteristicResponseFut;
    fn write_characteristic(
        &self,
        id: u64,
        value: &[u8],
    ) -> Self::WriteCharacteristicResponseFut;
    fn write_long_characteristic(
        &self,
        id: u64,
        offset: u16,
        value: &[u8],
        write_options: &WriteOptions,
    ) -> Self::WriteLongCharacteristicResponseFut;
    fn write_characteristic_without_response(
        &self,
        id: u64,
        value: &[u8],
    ) -> Result<(), Error>;
    fn read_descriptor(&self, id: u64) -> Self::ReadDescriptorResponseFut;
    fn read_long_descriptor(
        &self,
        id: u64,
        offset: u16,
        max_bytes: u16,
    ) -> Self::ReadLongDescriptorResponseFut;
    fn write_descriptor(
        &self,
        id: u64,
        value: &[u8],
    ) -> Self::WriteDescriptorResponseFut;
    fn write_long_descriptor(
        &self,
        id: u64,
        offset: u16,
        value: &[u8],
    ) -> Self::WriteLongDescriptorResponseFut;
    fn read_by_type(&self, uuid: &Uuid) -> Self::ReadByTypeResponseFut;
    fn notify_characteristic(
        &self,
        id: u64,
        enable: bool,
    ) -> Self::NotifyCharacteristicResponseFut;
}

Required Associated Types§

Source

type DiscoverCharacteristicsResponseFut: Future<Output = Result<(Status, Vec<Characteristic>), Error>> + Send

Source

type ReadCharacteristicResponseFut: Future<Output = Result<(Status, Vec<u8>), Error>> + Send

Source

type ReadLongCharacteristicResponseFut: Future<Output = Result<(Status, Vec<u8>), Error>> + Send

Source

type WriteCharacteristicResponseFut: Future<Output = Result<Status, Error>> + Send

Source

type WriteLongCharacteristicResponseFut: Future<Output = Result<Status, Error>> + Send

Source

type ReadDescriptorResponseFut: Future<Output = Result<(Status, Vec<u8>), Error>> + Send

Source

type ReadLongDescriptorResponseFut: Future<Output = Result<(Status, Vec<u8>), Error>> + Send

Source

type WriteDescriptorResponseFut: Future<Output = Result<Status, Error>> + Send

Source

type WriteLongDescriptorResponseFut: Future<Output = Result<Status, Error>> + Send

Source

type ReadByTypeResponseFut: Future<Output = Result<RemoteServiceReadByTypeResult, Error>> + Send

Source

type NotifyCharacteristicResponseFut: Future<Output = Result<Status, Error>> + Send

Required Methods§

Source

fn discover_characteristics(&self) -> Self::DiscoverCharacteristicsResponseFut

Source

fn read_characteristic(&self, id: u64) -> Self::ReadCharacteristicResponseFut

Source

fn read_long_characteristic( &self, id: u64, offset: u16, max_bytes: u16, ) -> Self::ReadLongCharacteristicResponseFut

Source

fn write_characteristic( &self, id: u64, value: &[u8], ) -> Self::WriteCharacteristicResponseFut

Source

fn write_long_characteristic( &self, id: u64, offset: u16, value: &[u8], write_options: &WriteOptions, ) -> Self::WriteLongCharacteristicResponseFut

Source

fn write_characteristic_without_response( &self, id: u64, value: &[u8], ) -> Result<(), Error>

Source

fn read_descriptor(&self, id: u64) -> Self::ReadDescriptorResponseFut

Source

fn read_long_descriptor( &self, id: u64, offset: u16, max_bytes: u16, ) -> Self::ReadLongDescriptorResponseFut

Source

fn write_descriptor( &self, id: u64, value: &[u8], ) -> Self::WriteDescriptorResponseFut

Source

fn write_long_descriptor( &self, id: u64, offset: u16, value: &[u8], ) -> Self::WriteLongDescriptorResponseFut

Source

fn read_by_type(&self, uuid: &Uuid) -> Self::ReadByTypeResponseFut

Source

fn notify_characteristic( &self, id: u64, enable: bool, ) -> Self::NotifyCharacteristicResponseFut

Implementors§

Source§

impl RemoteServiceProxyInterface for RemoteServiceProxy

Source§

type DiscoverCharacteristicsResponseFut = QueryResponseFut<(Status, Vec<Characteristic>)>

Source§

type ReadCharacteristicResponseFut = QueryResponseFut<(Status, Vec<u8>)>

Source§

type ReadLongCharacteristicResponseFut = QueryResponseFut<(Status, Vec<u8>)>

Source§

type WriteCharacteristicResponseFut = QueryResponseFut<Status>

Source§

type WriteLongCharacteristicResponseFut = QueryResponseFut<Status>

Source§

type ReadDescriptorResponseFut = QueryResponseFut<(Status, Vec<u8>)>

Source§

type ReadLongDescriptorResponseFut = QueryResponseFut<(Status, Vec<u8>)>

Source§

type WriteDescriptorResponseFut = QueryResponseFut<Status>

Source§

type WriteLongDescriptorResponseFut = QueryResponseFut<Status>

Source§

type ReadByTypeResponseFut = QueryResponseFut<Result<Vec<ReadByTypeResult>, Error>>

Source§

type NotifyCharacteristicResponseFut = QueryResponseFut<Status>