pub struct PeerProxy { /* private fields */ }
Implementations§
Source§impl PeerProxy
impl PeerProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.bluetooth/Peer.
Sourcepub fn take_event_stream(&self) -> PeerEventStream
pub fn take_event_stream(&self) -> PeerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn assign_connection_status(
&self,
status: HciError,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn assign_connection_status( &self, status: HciError, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Assign a HCI status
for the controller to generate in response to connection requests.
Applies to all successive HCI_Create_Connection and HCI_LE_Create_Connection commands. The
procedure is acknowledged with an empty response.
Sourcepub fn emulate_le_connection_complete(
&self,
role: ConnectionRole,
) -> Result<(), Error>
pub fn emulate_le_connection_complete( &self, role: ConnectionRole, ) -> Result<(), Error>
Emulates a LE connection event. Does nothing if the peer is already connected. The
role
parameter determines the link layer connection role.
Sourcepub fn emulate_disconnection_complete(&self) -> Result<(), Error>
pub fn emulate_disconnection_complete(&self) -> Result<(), Error>
Emulate disconnection. Does nothing if the peer is not connected.
Sourcepub fn watch_connection_states(
&self,
) -> QueryResponseFut<Vec<ConnectionState>, DefaultFuchsiaResourceDialect>
pub fn watch_connection_states( &self, ) -> QueryResponseFut<Vec<ConnectionState>, DefaultFuchsiaResourceDialect>
Returns a vector of the least to most recent controller connection states. This method returns when there has been a state change since the last invocation of this method by this client.
Multiple calls to this method can be outstanding at a given time. All calls will resolve in a response as soon as there is a change to the scan state.
Sourcepub fn set_device_class(
&self,
value: u32,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn set_device_class( &self, value: u32, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Sets the device class reported in the inquiry response for this peer during device
discovery. If the peer is not BR/EDR, the server will close with the ZX_ERR_NOT_SUPPORTED
epitaph.
Sourcepub fn set_service_definitions(
&self,
service_definitions: &[ServiceDefinition],
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn set_service_definitions( &self, service_definitions: &[ServiceDefinition], ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Sets the peer’s services that will be discoverable via Service Discovery Protocol. If the
peer is not BR/EDR, the server will close with the ZX_ERR_NOT_SUPPORTED
epitaph.
pub fn set_le_advertisement( &self, payload: &PeerSetLeAdvertisementRequest, ) -> QueryResponseFut<PeerSetLeAdvertisementResult, DefaultFuchsiaResourceDialect>
Trait Implementations§
Source§impl PeerProxyInterface for PeerProxy
impl PeerProxyInterface for PeerProxy
type AssignConnectionStatusResponseFut = QueryResponseFut<()>
type WatchConnectionStatesResponseFut = QueryResponseFut<Vec<ConnectionState>>
type SetDeviceClassResponseFut = QueryResponseFut<()>
type SetServiceDefinitionsResponseFut = QueryResponseFut<()>
type SetLeAdvertisementResponseFut = QueryResponseFut<Result<(), EmulatorPeerError>>
fn assign_connection_status( &self, status: HciError, ) -> Self::AssignConnectionStatusResponseFut
fn emulate_le_connection_complete( &self, role: ConnectionRole, ) -> Result<(), Error>
fn emulate_disconnection_complete(&self) -> Result<(), Error>
fn watch_connection_states(&self) -> Self::WatchConnectionStatesResponseFut
fn set_device_class(&self, value: u32) -> Self::SetDeviceClassResponseFut
fn set_service_definitions( &self, service_definitions: &[ServiceDefinition], ) -> Self::SetServiceDefinitionsResponseFut
fn set_le_advertisement( &self, payload: &PeerSetLeAdvertisementRequest, ) -> Self::SetLeAdvertisementResponseFut
Source§impl Proxy for PeerProxy
impl Proxy for PeerProxy
Source§type Protocol = PeerMarker
type Protocol = PeerMarker
Proxy
controls.