Module profile

Source
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.
ChannelParameters
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.
DataElementConversionError
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.
ProtocolDescriptor
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.
SecurityRequirements
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.
ServiceDefinition
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.
ValidScoConnectionParameters

Enums§

DataElement
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.
ScoConnectionParametersMissingFieldError
Missing fields in ScoConnectionParameters.
ScoConnectionParametersValidationError
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.