Commit Graph
12 Commits
Author SHA1 Message Date
Anay Wadhera fa54c26fcd Plumb CredentialManager::SetLocalDeviceMetadata through to PresenceService
PiperOrigin-RevId: 527257552
2023-04-26 07:16:26 -07:00
Janusz Sobczak a29be214a3 Migrate to absl::AnyInvocable in NP.
Replaces a bunch of std::function uses with absl::AnyInvocable.

PiperOrigin-RevId: 502960326
2023-01-18 13:16:29 -08:00
Anay Wadhera 228e52e979 Refactor broadcasting code into BroadcastManager
PiperOrigin-RevId: 495021310
2022-12-13 07:57:04 -08:00
Janusz Sobczak 337e1f41b0 Clarify CredentialStorage interface.
SaveCredentials does not to return the credentials that it has just saved. Returning a status will do.
Improved documentation.

PiperOrigin-RevId: 494280108
2022-12-09 15:41:12 -08:00
Janusz Sobczak a92abac83a Update advertisement encoder/decoder
1. Update the API to accept the credentials on input instead of credential manager.
2. Update the test with values using the LDT encryption.

These changes allow us to have a more asynchronous implementaion.
When broadcasting we can:
1. Fetch the private credentials asynchronously.
2. Create the advertisement and start broadcasting when the credentials have been fetched.

When scanning we can:
1. Fetch public credentials asynchronously.
2. Start scanning for advertisements.
3. Update the decoder when new credentials are fetched.

PiperOrigin-RevId: 493998041
2022-12-08 14:36:44 -08:00
Janusz Sobczak 255bdb6139 Add StopScan method.
Add StopScan and refactor StartScan to return a sesssion id.
Move handling of StartScan, StopScan and NotifyFoundBle to the same thread to avoid race conditions.
Implement start advertising in service controller.

PiperOrigin-RevId: 492016697
2022-11-30 14:21:26 -08:00
Janusz Sobczak e44f7eac61 Aynchronous start and stop broadcast
PiperOrigin-RevId: 491772964
2022-11-29 16:59:41 -08:00
Janusz Sobczak f0d36f8d8d Add StopBroadcast
Use explicit StopBroadcast API instead of a callback in BoroadcastSession.

PiperOrigin-RevId: 491759852
2022-11-29 16:00:28 -08:00
Janusz Sobczak a11733988f Implement start advertising in service controller.
PiperOrigin-RevId: 489584407
2022-11-18 16:17:55 -08:00
Anay Wadhera beb67fc02a Call StopScan() when ScanSession goes out of scope and make sure stop can only be called once.
PiperOrigin-RevId: 488717591
2022-11-15 11:46:34 -08:00
Hai Shang de4e7a66dc Utilize ScanManager for scan operation in service controller.
PiperOrigin-RevId: 486208283
2022-11-04 12:50:19 -07:00
Hai Shang 054f6efe53 Chain scan & broadcast invokes from PresenceClient to ServiceController
PiperOrigin-RevId: 483496670
2022-10-24 15:12:43 -07:00