Commit Graph
14 Commits
Author SHA1 Message Date
Francis Tsui b48b943275 Remove reference to BlePeripheral.
PiperOrigin-RevId: 757830081
2025-05-12 10:55:38 -07:00
Crisrael Lucero acc38a809b [Nearby Presence] Update ScanManager to trigger changed and lost events
PiperOrigin-RevId: 644072733
2024-06-17 11:17:00 -07:00
hai007 734014a841 Add build flag to switch between C++ and rust implemented parser
- Both implementations implement `AdvertisementDecoder` interface and provide the
   concrete implementation for AdvertisementDecoderImpl
 - cleanup missing includes as complained about by clang-tidy

PiperOrigin-RevId: 621187625
2024-04-02 08:43:31 -07:00
hai007 5bc1c83472 Pure Refactor: move filtering logic into AdvertisementFilter class
- this decouples filtering logic from advertisement decoding logic
   in preparation for introducing a Rust backed impl of
   AdvertisementDecoder
 - this change is only a refactor and does not change functionality
   in any way

PiperOrigin-RevId: 618978564
2024-03-25 15:33:20 -07:00
Anay Wadhera c58b45eb50 Rename PublicCredential to SharedCredential and PrivateCredential to LocalCredential
PiperOrigin-RevId: 503221477
2023-01-24 12:09:21 -08:00
Suet-Fei Li 084f7ebd88 Remove location namespace in third_party/nearby.
PiperOrigin-RevId: 500023196
2023-01-06 02:53:57 -08:00
Janusz Sobczak b3f8534226 Use Rand instead of absl::Random
Use Nearby's common Rand() util instead of absl::Random

PiperOrigin-RevId: 495386054
2022-12-14 12:30:56 -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 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
Janusz Sobczak d268b077c9 Save scan callbacks before starting scan session.
This reduces flakiness. We can start receiving advertisements before StartScan() has finished.

PiperOrigin-RevId: 485904791
2022-11-03 10:13:02 -07:00
Anay Wadhera c4dc132f50 Add ScanManager class for bookkeeping BLE v2 scans
PiperOrigin-RevId: 485675999
2022-11-02 13:15:31 -07:00
Suet-Fei Li 55f20775d2 Fix internal flow
PiperOrigin-RevId: 466426960
2022-08-09 12:02:16 -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