Commit Graph
17 Commits
Author SHA1 Message Date
Anay Wadhera 1b7142da77 Plumb CredentialManager::UpdateRemotePublicCredentials and CredentialManager::GetPublicCredentials through to PresenceService
PiperOrigin-RevId: 534136547
2023-05-22 11:52:06 -07:00
Anay Wadhera 21d2efbccd Create PresenceDeviceProvider
PiperOrigin-RevId: 528913199
2023-05-02 16:02:36 -07:00
Anay Wadhera fa54c26fcd Plumb CredentialManager::SetLocalDeviceMetadata through to PresenceService
PiperOrigin-RevId: 527257552
2023-04-26 07:16:26 -07:00
Janusz Sobczak ca547df4d7 Subscribe for public credentials update
Nearby Presence scanning sessions may be very long. We need a way to notify the scanner that new credentials were added during scanning.
`SubscribeForPublicCredentials()` allows us to subscribe for such updates.

PiperOrigin-RevId: 502699345
2023-01-17 15:07:14 -08:00
Suet-Fei Li 084f7ebd88 Remove location namespace in third_party/nearby.
PiperOrigin-RevId: 500023196
2023-01-06 02:53:57 -08:00
Anay Wadhera 228e52e979 Refactor broadcasting code into BroadcastManager
PiperOrigin-RevId: 495021310
2022-12-13 07:57:04 -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
Anay Wadhera fb544f7900 Add missing headers to service_controller_impl.h to fix Chrome
PiperOrigin-RevId: 491969884
2022-11-30 11:17:49 -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 c4dc132f50 Add ScanManager class for bookkeeping BLE v2 scans
PiperOrigin-RevId: 485675999
2022-11-02 13:15:31 -07:00
Hai Shang 054f6efe53 Chain scan & broadcast invokes from PresenceClient to ServiceController
PiperOrigin-RevId: 483496670
2022-10-24 15:12:43 -07:00
Suet-Fei Li 55f20775d2 Fix internal flow
PiperOrigin-RevId: 466426960
2022-08-09 12:02:16 -07:00
jsobczak be140a71d5 Make CredentialManager abstract
An abstract CredentialManager will help with unit testing.
Also added an empty CredentialManagerImpl class.

PiperOrigin-RevId: 463651261
2022-07-27 12:34:31 -07:00
hais b6f817274e Initial header files showing class dependency and ownership.
No detailed function signatures nor impl included yet.

PiperOrigin-RevId: 460300058
2022-07-11 14:26:26 -07:00