Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7d26c219 authored by Sonny Sasaka's avatar Sonny Sasaka
Browse files

Floss: Implement (Un)RegisterScannerCallback

Implement the front-end of RegisterScannerCallback and
UnregisterScannerCallback, which only contain the registration and
unregistration of the callbacks. Follow up will be adding
RegisterScanner and UnregisterScanner for (un)registration of the
scanner itself.

This change also adds a reusable `Callbacks` utility in the `callbacks`
module. This utility provides callback logic common to many APIs:
* Adding a callback: generating an id, watching for disconnect.
* Removing a callback: stopping disconnect watcher, removing from
  storage.
* Utility to execute function on all callbacks (`for_all_callbacks`).

Future patch will refactor existing callback management using this
module to avoid code duplication and make sure consistent behavior.

Bug: 217273154
Tag: #floss
Test: Manual - Build Floss on Linux

Change-Id: Ie93287954298600155feaa0987a4f9c7e24253fe
parent c1bc8e16
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment