pub struct PeerHandlerProxy { /* private fields */ }
Implementations§
Source§impl PeerHandlerProxy
impl PeerHandlerProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.bluetooth.hfp/PeerHandler.
Sourcepub fn take_event_stream(&self) -> PeerHandlerEventStream
pub fn take_event_stream(&self) -> PeerHandlerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn watch_network_information(
&self,
) -> QueryResponseFut<NetworkInformation, DefaultFuchsiaResourceDialect>
pub fn watch_network_information( &self, ) -> QueryResponseFut<NetworkInformation, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<NextCall, DefaultFuchsiaResourceDialect>
pub fn watch_next_call( &self, ) -> QueryResponseFut<NextCall, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<PeerHandlerRequestOutgoingCallResult, DefaultFuchsiaResourceDialect>
pub fn request_outgoing_call( &self, action: &CallAction, ) -> QueryResponseFut<PeerHandlerRequestOutgoingCallResult, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<Option<String>, DefaultFuchsiaResourceDialect>
pub fn query_operator( &self, ) -> QueryResponseFut<Option<String>, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<Vec<String>, DefaultFuchsiaResourceDialect>
pub fn subscriber_number_information( &self, ) -> QueryResponseFut<Vec<String>, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<PeerHandlerSetNrecModeResult, DefaultFuchsiaResourceDialect>
pub fn set_nrec_mode( &self, enabled: bool, ) -> QueryResponseFut<PeerHandlerSetNrecModeResult, DefaultFuchsiaResourceDialect>
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 Clone for PeerHandlerProxy
impl Clone for PeerHandlerProxy
Source§fn clone(&self) -> PeerHandlerProxy
fn clone(&self) -> PeerHandlerProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PeerHandlerProxy
impl Debug for PeerHandlerProxy
Source§impl PeerHandlerProxyInterface for PeerHandlerProxy
impl PeerHandlerProxyInterface for PeerHandlerProxy
type WatchNetworkInformationResponseFut = QueryResponseFut<NetworkInformation>
type WatchNextCallResponseFut = QueryResponseFut<NextCall>
type RequestOutgoingCallResponseFut = QueryResponseFut<Result<(), i32>>
type QueryOperatorResponseFut = QueryResponseFut<Option<String>>
type SubscriberNumberInformationResponseFut = QueryResponseFut<Vec<String>>
type SetNrecModeResponseFut = QueryResponseFut<Result<(), i32>>
fn watch_network_information(&self) -> Self::WatchNetworkInformationResponseFut
fn watch_next_call(&self) -> Self::WatchNextCallResponseFut
fn request_outgoing_call( &self, action: &CallAction, ) -> Self::RequestOutgoingCallResponseFut
fn query_operator(&self) -> Self::QueryOperatorResponseFut
fn subscriber_number_information( &self, ) -> Self::SubscriberNumberInformationResponseFut
fn set_nrec_mode(&self, enabled: bool) -> Self::SetNrecModeResponseFut
fn report_headset_battery_level(&self, level: u8) -> Result<(), Error>
fn gain_control( &self, control: ClientEnd<HeadsetGainMarker>, ) -> Result<(), Error>
Source§impl Proxy for PeerHandlerProxy
impl Proxy for PeerHandlerProxy
Source§type Protocol = PeerHandlerMarker
type Protocol = PeerHandlerMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for PeerHandlerProxy
impl !RefUnwindSafe for PeerHandlerProxy
impl Send for PeerHandlerProxy
impl Sync for PeerHandlerProxy
impl Unpin for PeerHandlerProxy
impl !UnwindSafe for PeerHandlerProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)