pub struct HeadsetGainProxy { /* private fields */ }
Implementations§
source§impl HeadsetGainProxy
impl HeadsetGainProxy
sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.bluetooth.hfp/HeadsetGain.
sourcepub fn take_event_stream(&self) -> HeadsetGainEventStream
pub fn take_event_stream(&self) -> HeadsetGainEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
sourcepub fn set_speaker_gain(&self, requested: u8) -> Result<(), Error>
pub fn set_speaker_gain(&self, requested: u8) -> Result<(), Error>
Make a request to the headset to set the speaker gain to requested
.
requested
must be in the range [0-15] inclusive. Any values outside of
this range will result in the channel closing with a
ZX_ERR_INVALID_ARGUMENT
epitaph.
sourcepub fn watch_speaker_gain(&self) -> QueryResponseFut<u8>
pub fn watch_speaker_gain(&self) -> QueryResponseFut<u8>
Hanging get to watch for updates to the headset speaker gain. Responses represent the current gain value that is set.
The returned gain
value will always be in the range [0-15] inclusive.
sourcepub fn set_microphone_gain(&self, requested: u8) -> Result<(), Error>
pub fn set_microphone_gain(&self, requested: u8) -> Result<(), Error>
Make a request to the Headset to set the microphone gain to requested
.
requested
must be in the range [0-15] inclusive. Any values outside of
this range will result in the channel closing with a
ZX_ERR_INVALID_ARGUMENT
epitaph.
sourcepub fn watch_microphone_gain(&self) -> QueryResponseFut<u8>
pub fn watch_microphone_gain(&self) -> QueryResponseFut<u8>
Hanging get to watch for updates to the headset microphone gain. Responses represent the current gain value that is set.
The returned gain
value will always be in the range [0-15] inclusive.
Trait Implementations§
source§impl Clone for HeadsetGainProxy
impl Clone for HeadsetGainProxy
source§fn clone(&self) -> HeadsetGainProxy
fn clone(&self) -> HeadsetGainProxy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for HeadsetGainProxy
impl Debug for HeadsetGainProxy
source§impl HeadsetGainProxyInterface for HeadsetGainProxy
impl HeadsetGainProxyInterface for HeadsetGainProxy
fn set_speaker_gain(&self, requested: u8) -> Result<(), Error>
type WatchSpeakerGainResponseFut = QueryResponseFut<u8>
fn watch_speaker_gain(&self) -> Self::WatchSpeakerGainResponseFut
fn set_microphone_gain(&self, requested: u8) -> Result<(), Error>
type WatchMicrophoneGainResponseFut = QueryResponseFut<u8>
fn watch_microphone_gain(&self) -> Self::WatchMicrophoneGainResponseFut
source§impl Proxy for HeadsetGainProxy
impl Proxy for HeadsetGainProxy
§type Protocol = HeadsetGainMarker
type Protocol = HeadsetGainMarker
Proxy
controls.