pub struct PeerHandlerSynchronousProxy { /* private fields */ }
Implementations§
Source§impl PeerHandlerSynchronousProxy
impl PeerHandlerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<PeerHandlerEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<PeerHandlerEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn watch_network_information(
&self,
___deadline: MonotonicInstant,
) -> Result<NetworkInformation, Error>
pub fn watch_network_information( &self, ___deadline: MonotonicInstant, ) -> Result<NetworkInformation, Error>
Hanging get to provide the Hfp service with an update
on the
NetworkInformation
. Any fields in update
that are not present will
be treated as unmodified by the update.
The call manager or audio gateway peer should provide a fully
populated update
when it is called for the first time.
The most up-to-date NetworkInformation
is used during the connection
initialization process of the peer, and updates are propagated to the
peer if it supports AG Indicators.
Sourcepub fn watch_next_call(
&self,
___deadline: MonotonicInstant,
) -> Result<NextCall, Error>
pub fn watch_next_call( &self, ___deadline: MonotonicInstant, ) -> Result<NextCall, Error>
Hanging get which returns when a new call is initiated by the call
manager or audio gateway peer, or an ongoing call is transferred to the
headset. RequestOutgoingCall
can be called before or after
WatchNextCall
.
Sourcepub fn request_outgoing_call(
&self,
action: &CallAction,
___deadline: MonotonicInstant,
) -> Result<PeerHandlerRequestOutgoingCallResult, Error>
pub fn request_outgoing_call( &self, action: &CallAction, ___deadline: MonotonicInstant, ) -> Result<PeerHandlerRequestOutgoingCallResult, Error>
Used to request an outgoing call be initiated by the call manager or
audio gateway peer. RequestOutgoingCall
shall complete after the
outgoing call has been initiated and the corresponding Call
protocol
has been returned via a WatchNextCall
result.
An error is returned if the call could not be placed as requested.
-
ZX_ERR_NOT_SUPPORTED can be used if the system does not support the requested action.
-
ZX_ERR_ALREADY_EXISTS can be used if there is alreadya call in progress and the system does not support additional calls.
Sourcepub fn query_operator(
&self,
___deadline: MonotonicInstant,
) -> Result<Option<String>, Error>
pub fn query_operator( &self, ___deadline: MonotonicInstant, ) -> Result<Option<String>, Error>
Request the name of the network operator for the call manager or audio gateway peer. A null value is returned if there is no operator name available.
Sourcepub fn subscriber_number_information(
&self,
___deadline: MonotonicInstant,
) -> Result<Vec<String>, Error>
pub fn subscriber_number_information( &self, ___deadline: MonotonicInstant, ) -> Result<Vec<String>, Error>
Request subscriber numbers from the call manager or audio gateway peer. There can be zero or more numbers returned. Sending more than 128 numbers is not supported at this time.
Sourcepub fn set_nrec_mode(
&self,
enabled: bool,
___deadline: MonotonicInstant,
) -> Result<PeerHandlerSetNrecModeResult, Error>
pub fn set_nrec_mode( &self, enabled: bool, ___deadline: MonotonicInstant, ) -> Result<PeerHandlerSetNrecModeResult, Error>
Request by the HF to enable or disable the Noise Reduction/Echo Cancellation
functionality on the AG based on the enabled
boolean.
A ZX_ERR_NOT_SUPPORTED
error is returned if Noice Reduction/Echo
Cancellation is not supported by the device.
Sourcepub fn report_headset_battery_level(&self, level: u8) -> Result<(), Error>
pub fn report_headset_battery_level(&self, level: u8) -> Result<(), Error>
Headset battery level from 0 ~ 100 See https://www.bluetooth.com/specifications/assigned-numbers/hands-free-profile/
Sourcepub fn gain_control(
&self,
control: ClientEnd<HeadsetGainMarker>,
) -> Result<(), Error>
pub fn gain_control( &self, control: ClientEnd<HeadsetGainMarker>, ) -> Result<(), Error>
Tear off protocol for Headset Gain.
Only one HeadsetGain protocol can be active for a PeerHandler protocol at any given time. Older HeadsetGain protocols are given preference. If a HeadsetGain protocol is active when a new GainControl request is made, the new HeadsetGain protocol will be closed immediately.
Trait Implementations§
Source§impl Debug for PeerHandlerSynchronousProxy
impl Debug for PeerHandlerSynchronousProxy
Source§impl SynchronousProxy for PeerHandlerSynchronousProxy
impl SynchronousProxy for PeerHandlerSynchronousProxy
Source§type Proxy = PeerHandlerProxy
type Proxy = PeerHandlerProxy
Source§type Protocol = PeerHandlerMarker
type Protocol = PeerHandlerMarker
Proxy
controls.