pub enum PeerHandlerRequest {
WatchNetworkInformation {
responder: PeerHandlerWatchNetworkInformationResponder,
},
WatchNextCall {
responder: PeerHandlerWatchNextCallResponder,
},
RequestOutgoingCall {
action: CallAction,
responder: PeerHandlerRequestOutgoingCallResponder,
},
QueryOperator {
responder: PeerHandlerQueryOperatorResponder,
},
SubscriberNumberInformation {
responder: PeerHandlerSubscriberNumberInformationResponder,
},
SetNrecMode {
enabled: bool,
responder: PeerHandlerSetNrecModeResponder,
},
ReportHeadsetBatteryLevel {
level: u8,
control_handle: PeerHandlerControlHandle,
},
GainControl {
control: ClientEnd<HeadsetGainMarker>,
control_handle: PeerHandlerControlHandle,
},
}
Expand description
The call manager or the hands-free server component will serve a call handler protocol for each connected headset that it chooses to manage calls through.
If the peer handler is closed by either channel endpoint, all protocols
associated with this peer handler are closed. This includes any Call, and
HeadsetGain protocols. Channels closed by a server end will include an
epitaph ZX_ERR_HANDLE_CLOSED
in this situation.
Variants§
WatchNetworkInformation
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.
Fields
responder: PeerHandlerWatchNetworkInformationResponder
WatchNextCall
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
.
Fields
responder: PeerHandlerWatchNextCallResponder
RequestOutgoingCall
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.
QueryOperator
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.
Fields
responder: PeerHandlerQueryOperatorResponder
SubscriberNumberInformation
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.
Fields
SetNrecMode
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.
ReportHeadsetBatteryLevel
Headset battery level from 0 ~ 100 See https://www.bluetooth.com/specifications/assigned-numbers/hands-free-profile/
GainControl
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.
Implementations§
Source§impl PeerHandlerRequest
impl PeerHandlerRequest
pub fn into_watch_network_information( self, ) -> Option<PeerHandlerWatchNetworkInformationResponder>
pub fn into_watch_next_call(self) -> Option<PeerHandlerWatchNextCallResponder>
pub fn into_request_outgoing_call( self, ) -> Option<(CallAction, PeerHandlerRequestOutgoingCallResponder)>
pub fn into_query_operator(self) -> Option<PeerHandlerQueryOperatorResponder>
pub fn into_subscriber_number_information( self, ) -> Option<PeerHandlerSubscriberNumberInformationResponder>
pub fn into_set_nrec_mode( self, ) -> Option<(bool, PeerHandlerSetNrecModeResponder)>
pub fn into_report_headset_battery_level( self, ) -> Option<(u8, PeerHandlerControlHandle)>
pub fn into_gain_control( self, ) -> Option<(ClientEnd<HeadsetGainMarker>, PeerHandlerControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL