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, DefaultFuchsiaResourceDialect>
pub fn watch_speaker_gain( &self, ) -> QueryResponseFut<u8, DefaultFuchsiaResourceDialect>
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, DefaultFuchsiaResourceDialect>
pub fn watch_microphone_gain( &self, ) -> QueryResponseFut<u8, DefaultFuchsiaResourceDialect>
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
type WatchSpeakerGainResponseFut = QueryResponseFut<u8>
type WatchMicrophoneGainResponseFut = QueryResponseFut<u8>
fn set_speaker_gain(&self, requested: u8) -> Result<(), Error>
fn watch_speaker_gain(&self) -> Self::WatchSpeakerGainResponseFut
fn set_microphone_gain(&self, requested: u8) -> Result<(), Error>
fn watch_microphone_gain(&self) -> Self::WatchMicrophoneGainResponseFut
Source§impl Proxy for HeadsetGainProxy
impl Proxy for HeadsetGainProxy
Source§type Protocol = HeadsetGainMarker
type Protocol = HeadsetGainMarker
Proxy
controls.