Expand description
Convenience functions and types for working with the BR/EDR Profile API
Structs§
- Attribute
- A generic attribute used for protocol information.
Corresponds directly to the FIDL
Attribute
definition - with the extra properties of Clone and PartialEq. See [fuchsia.bluetooth.bredr.Attribute] for more documentation. - Channel
Parameters - Preferred L2CAP channel parameters for an advertised service.
Corresponds directly to the FIDL
ChannelParameters
definition - with the extra properties of Clone and PartialEq. The invariants of the FIDL definition are enforced - the max SDU size must be >= 48. See [fuchsia.bluetooth.bredr.ChannelParameters] for more documentation. - Data
Element Conversion Error - Information
- Human-readable information about a service.
Corresponds directly to the FIDL
Information
definition - with the extra properties of Clone and PartialEq. See [fuchsia.bluetooth.bredr.Information] for more documentation. - Protocol
Descriptor - Information about a communications protocol.
Corresponds directly to the FIDL
ProtocolDescriptor
definition - with the extra properties of Clone and PartialEq. See [fuchsia.bluetooth.bredr.ProtocolDescriptor] for more documentation. - Psm
- The Protocol and Service Multiplexer (PSM) for L2cap connections.
- Security
Requirements - Authentication and permission requirements for an advertised service.
Corresponds directly to the FIDL
SecurityRequirements
definition - with the extra properties of Clone and PartialEq. See [fuchsia.bluetooth.bredr.SecurityRequirements] for more documentation. - Service
Definition - Definition of a service that is to be advertised via Bluetooth BR/EDR.
Corresponds directly to the FIDL
ServiceDefinition
definition - with the extra properties of Clone and PartialEq. See [fuchsia.bluetooth.bredr.ServiceDefinition] for more documentation. - Valid
ScoConnection Parameters
Enums§
- Data
Element - The basic building block for elements in a SDP record.
Corresponds directly to the FIDL
DataElement
definition - with the extra properties of Clone and PartialEq. See [fuchsia.bluetooth.bredr.DataElement] for more documentation. - ScoConnection
Parameters Missing Field Error - Missing fields in
ScoConnectionParameters
. - ScoConnection
Parameters Validation Error - Errors validating
ScoConnectionParameters
.
Functions§
- combine_
channel_ parameters - Given two ChannelParameters, combines both into a set of ChannelParameters with the least requesting of resources. This is defined as:
- combine_
security_ requirements - Given two SecurityRequirements, combines both into requirements as strict as either. A stricter SecurityRequirements is defined as:
- elem_
to_ profile_ descriptor - Try to interpret a DataElement as a ProfileDesciptor. Returns None if the DataElement is not in the correct format to represent a ProfileDescriptor.
- find_
profile_ descriptors - Find an element representing the Bluetooth Profile Descriptor List in
attributes
, and convert the elements in the list into ProfileDescriptors. Returns an Error if no matching element was found, or if any element of the list couldn’t be converted into a ProfileDescriptor. - find_
service_ classes - Search for a Service Class UUID from a list of attributes (such as returned via Service Search)
- l2cap_
connect_ parameters - profile_
descriptor_ to_ assigned - psm_
from_ protocol - Returns the PSM from the provided
protocol
. Returns None if the protocol is not L2CAP or does not contain a PSM.