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
Loading
Please register or sign in to comment