pub enum PairingRequest {
SetPairingDelegate {
input: InputCapability,
output: OutputCapability,
delegate: ClientEnd<PairingDelegateMarker>,
control_handle: PairingControlHandle,
},
SetDelegate {
input: InputCapability,
output: OutputCapability,
delegate: ClientEnd<PairingDelegate2Marker>,
control_handle: PairingControlHandle,
},
}
Expand description
Allows system clients to enable Bluetooth pairing.
Variants§
SetPairingDelegate
Assign a PairingDelegate to respond to pairing procedures. The provided I/O capabilities will be used to determine the pairing methods used.
Only one PairingDelegate can be set at a time system-wide - if this is called while another delegate is set, the new delegate will be closed immediately. Closing a PairingDelegate after it is set aborts all ongoing pairing procedures without accepting and unsets the delegate.
If no PairingDelegate is set, all pairings will be rejected even if the peer connection was initiated by the local device.
- request
input
Bluetooth input capability, seeInputCapability
- request
output
Bluetooth output capability, seeOutputCapability
- request
delegate
PairingDelegate which will receive pairing requests
Fields
input: InputCapability
output: OutputCapability
delegate: ClientEnd<PairingDelegateMarker>
control_handle: PairingControlHandle
SetDelegate
Assign a PairingDelegate2 to handle pairing procedures. The provided I/O capabilities will be used to determine the methods used.
Only one of PairingDelegate or PairingDelegate2 can be set at a time system-wide. If this is called while another delegate is set, the new delegate will be closed immediately.
Closing a PairingDelegate2 unsets the pairing delegate. Ongoing PairingRequests can still be completed, but new requests will act as if no delegate is set.
If no delegate is set, all pairings will be rejected even if the peer connection was initiated by the local device.
- request
input
Bluetooth input capability, seeInputCapability
- request
output
Bluetooth output capability, seeOutputCapability
- request
delegate
PairingDelegate2 which will receive pairing requests
Fields
input: InputCapability
output: OutputCapability
delegate: ClientEnd<PairingDelegate2Marker>
control_handle: PairingControlHandle
Implementations§
source§impl PairingRequest
impl PairingRequest
pub fn into_set_pairing_delegate( self, ) -> Option<(InputCapability, OutputCapability, ClientEnd<PairingDelegateMarker>, PairingControlHandle)>
pub fn into_set_delegate( self, ) -> Option<(InputCapability, OutputCapability, ClientEnd<PairingDelegate2Marker>, PairingControlHandle)>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL