pub enum ConnectionRequest {
GetCodecLocalDelayRange {
payload: CodecDelayGetCodecLocalDelayRangeRequest,
responder: ConnectionGetCodecLocalDelayRangeResponder,
},
RequestGattClient {
client: ServerEnd<ClientMarker>,
control_handle: ConnectionControlHandle,
},
AcceptCis {
payload: ConnectionAcceptCisRequest,
control_handle: ConnectionControlHandle,
},
ConnectL2cap {
payload: ConnectionConnectL2capRequest,
control_handle: ConnectionControlHandle,
},
}
Expand description
Protocol that represents the connection to a peer. This can be used to interact with GATT services and establish L2CAP channels.
This lifetime of this capability is tied to that of the LE connection it represents. Closing the channel results in a disconnection if no other clients hold a Connection to the same peer.
Variants§
GetCodecLocalDelayRange
Retrieve the range of controller delay for the codec specified with the provided stream attributes.
On success, returns the minimum and maximum allowed delay.
Returns ZX_ERR_NOT_SUPPORTED if reading the delay is not supported. Returns ZX_ERR_INTERNAL for all other failures.
Fields
responder: ConnectionGetCodecLocalDelayRangeResponder
RequestGattClient
The following epitaphs may be sent by the server on error:
ZX_ERR_ALREADY_BOUND
: A Client server has already been bound in this Connection protocol. The existing Client should be used.
AcceptCis
Accept a future CIS request from the peer with the specified CIG/CIS values. All CIS requests that have not explicitly been allowed will be rejected.
The provided IsochronousStream will be used for future notification of established connections.
The host may wait for multiple incoming connections simultaneously, although each must have a combination of CIG/CIS values that is unique to this connection.
If we are not operating in the peripheral role in this connection, connection_stream will be closed with a ZX_ERR_NOT_SUPPORTED epitaph.
If we are already waiting for another connection with the same combination of CIG/CIS values, connection_stream will be closed with a ZX_ERR_INVALID_ARGS epitaph.
ConnectL2cap
Connect to an L2CAP LE connection-oriented channel.
Implementations§
Source§impl ConnectionRequest
impl ConnectionRequest
pub fn into_get_codec_local_delay_range( self, ) -> Option<(CodecDelayGetCodecLocalDelayRangeRequest, ConnectionGetCodecLocalDelayRangeResponder)>
pub fn into_request_gatt_client( self, ) -> Option<(ServerEnd<ClientMarker>, ConnectionControlHandle)>
pub fn into_accept_cis( self, ) -> Option<(ConnectionAcceptCisRequest, ConnectionControlHandle)>
pub fn into_connect_l2cap( self, ) -> Option<(ConnectionConnectL2capRequest, ConnectionControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL