[roll] Roll fuchsia [bt] Convert Status<hci_spec::StatusCode> to fitx::result<Error<hci_spec::StatusCode>>

Add alias hci::Error for bt::Error<hci_spec::StatusCode>.
Add alias hci::Result<…> for
fitx::result<bt::Error<hci_spec::StatusCode>, …>.
Add alias hci::ResultFunction<…> for
fit::function<void(fitx::result<bt::Error<hci_spec::StatusCode>, …>)>.

Replace hci::Status, hci::StatusCallback with hci::Result and
hci::ResultFunction<>, respectively.
In hci::Connection, refactor EnableEncryptionCallback to be
hci::ResultFunction<bool>, i.e. holds the success value in the result
parameter rather than a separate parameter. Other refactors are possible
but not performed as this particular change is a proof-of-concept.

In LowEnergyConnectionManager, LowEnergyConnectionRequest,
LowEnergyConnector, hci::CommandHandler, l2cap and transport classes
that have RequestAclPriority and SetBrEdrAutomaticFlushTimeout, convert
the use of fpromise::result to fitx::result. The fpromise::result
occurrences in l2cap::LogicalLink are kept because they are actually the
results of fpromise::promise computations.

Add HostErrorToFidl(bt::Error<…>) overload.
Add fpromise<void, f.b.s.Error> ResultToFidl(fitx::result<bt::Error<…>)
FIDL conversion helper.

Rename EventPacket::ToStatus to EventPacket::ToResult.
Add EventPacket::ToStatusCode for EncryptionKeyRefreshComplete, in order
to use it with hci_is_error and EventPacket.ToResult.

Where appropriate, rename some |status| identifiers to |result|.

Original-Bug: 86900, 90772
Test: fx test //src/connectivity/bluetooth
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/623783
Original-Revision: eb0a71a6164acf55e1d94cc14df3e223f940ad06
GitOrigin-RevId: 05a2640161cd18c453fac1efce01fbe2dce12ca2
Change-Id: Ic8c1356c47b309972f141abbfd62ce4f8bba2cd7
1 file changed
tree: b23453971f65056f83b8dce585de39ba6c161a1d
  1. infra/
  2. third_party/
  3. cts
  4. firmware
  5. flower
  6. jiri.lock
  7. minimal
  8. prebuilts
  9. README.md
  10. stem
  11. test_durations
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.