131 Commits
Author SHA1 Message Date
Nick Bourdakos ae94fa2cdc Refactor SPM
PiperOrigin-RevId: 808549949
2025-09-18 06:23:33 -07:00
hai007 bbecf44a56 Refactor WifiLanBwuHandler test to improve test coverage.
PiperOrigin-RevId: 807379771
2025-09-15 14:17:54 -07:00
Nick Bourdakos 6cf792c9b2 Update Abseil SPM dependency
PiperOrigin-RevId: 806372541
2025-09-12 11:56:00 -07:00
hai007 b56d18d577 Refactor WifiLanBwuHandler test to improve test coverage.
PiperOrigin-RevId: 806350972
2025-09-12 11:01:53 -07:00
Edwin Wu 1b169516cb [NC Apple coverage]add unit tests for Hotspot Medium.
PiperOrigin-RevId: 802798810
2025-09-03 18:55:15 -07:00
Edwin Wu eff9d2d50b [NC Apple coverage] Reorganize BLE medium and test files
PiperOrigin-RevId: 800719731
2025-08-28 20:26:08 -07:00
hai007 40bf056e17 Add p2p_star_pcp_handler_test.cc to improve test coverage.
PiperOrigin-RevId: 799397593
2025-08-25 21:51:55 -07:00
Edwin Wu da266c0025 [NC Apple coverage] Enable WiFiCommon tests.
PiperOrigin-RevId: 799130702
2025-08-25 08:24:11 -07:00
Edwin Wu 8990edee33 [NC Apple coverage] Add test for GNCLogger
PiperOrigin-RevId: 791250955
2025-08-05 09:35:54 -07:00
Edwin Wu 2830705ba9 [NC Apple coverage] Adding iOS unit tests cases for GNCFeatureFlags
PiperOrigin-RevId: 791167785
2025-08-05 05:23:15 -07:00
Mingshiou Wu 54025ad0b0 Add unit tests for awdl.cc
PiperOrigin-RevId: 787395670
2025-07-26 01:17:32 -07:00
Mingshiou Wu fcd3cb0fc3 feat: add ble_v2 test in g3 platform
PiperOrigin-RevId: 786993987
2025-07-25 00:07:27 -07:00
Guogang Li 2e94870593 Cleanup unused files
PiperOrigin-RevId: 783094630
2025-07-14 16:59:26 -07:00
Guogang Li d7a688f415 Create GNCLogger for apple platform
PiperOrigin-RevId: 766393388
2025-06-02 16:45:00 -07:00
Francis Tsui 151ba03d0f Create nearby::FilePath class to replace use of std::filesystem::path.
- Replace filesystem::path in DeviceInfo.

PiperOrigin-RevId: 761224912
2025-05-20 14:12:07 -07:00
Guogang Li f7e96e518c Use DCT flag to control BLE encoding
PiperOrigin-RevId: 756496067
2025-05-08 16:04:44 -07:00
Francis Tsui 83ec6bcece Create MacAddress class for MAC address manipulation.
PiperOrigin-RevId: 752503841
2025-04-28 17:22:45 -07:00
Francis Tsui ce58d19c1a Update swift build to cxx20.
PiperOrigin-RevId: 750724378
2025-04-23 14:26:09 -07:00
hai007 190bb141cc Implement AWDL in connection layer (part 1)
PiperOrigin-RevId: 742925127
2025-04-01 19:11:20 -07:00
Mingshiou Wu 2ea692213d Add BleL2capPacket
PiperOrigin-RevId: 736771387
2025-03-14 00:34:14 -07:00
Guogang Li fdb0f0f351 read endpoint info
PiperOrigin-RevId: 729312008
2025-02-20 17:31:45 -08:00
Guogang Li c3467c0c2a handle new advertisement format
PiperOrigin-RevId: 729140392
2025-02-20 09:24:37 -08:00
Guogang Li 46c0f153fe handle data element
PiperOrigin-RevId: 728727545
2025-02-19 10:38:28 -08:00
Guogang Li eea3441da9 Internal refactor
PiperOrigin-RevId: 727057179
2025-02-14 14:07:18 -08:00
Guogang Li 3de3a9479d Create a help class to generate data
PiperOrigin-RevId: 726714013
2025-02-13 18:25:07 -08:00
Guogang Li 788984f182 read bits from base stream
PiperOrigin-RevId: 726515524
2025-02-13 09:17:14 -08:00
Guogang Li 58eea077e1 support base85 encoding/decoding
PiperOrigin-RevId: 725692677
2025-02-11 10:50:44 -08:00
hai007 42db63c19b Add support for reading multiple frames from one BlockingQueueStream buffer
PiperOrigin-RevId: 709247147
2024-12-23 22:54:08 -08:00
Edwin Wu 2c31d77ea9 Add ErrorOr to Nearby Platform
PiperOrigin-RevId: 697048097
2024-11-15 17:43:19 -08:00
Francis Tsui ab00092c6c Create hard link for latest log files.
PiperOrigin-RevId: 681986911
2024-10-03 12:39:42 -07:00
Guogang Li 6707efeed8 internal refactor
PiperOrigin-RevId: 676552917
2024-09-19 13:58:21 -07:00
Guogang Li d5b5d92f87 Internal logging update
PiperOrigin-RevId: 669420403
2024-08-30 13:08:35 -07:00
Anay Wadhera 6a638f3042 Split core_internal_test into more manageable targets.
PiperOrigin-RevId: 659571860
2024-08-05 09:04:17 -07:00
Guogang Li 52c80303e3 Enhance on advertising
PiperOrigin-RevId: 655044204
2024-07-22 23:57:16 -07:00
hai007 7c72774167 Multiplex implementation - Create Multiplex Socket
PiperOrigin-RevId: 632628955
2024-05-10 16:11:26 -07:00
Anay Wadhera f26d25ed01 Provide a platform abstraction for RandBytes instead of swapping headers
The `RandBytes` functions were being placed in the `crypto` namespace,
which collides with Chromium's namespace of the same name. Within,
`RandBytes` was defined with almost-the-same API. Then in Chromium
builds, the Chromium header would be used instead (though somewhat
inconsistently).

This creates a lot of pain for Chromium development as there's a
third-party repository directly depending on headers from Chromium's
source tree, and is against the third-party policies for that reason.
There are a number of other headers that mirror Chromium and are
swapped out in the Chromium build that will cause similar pain, such as:
```
include "crypto/aead.h"
include "crypto/ec_private_key.h"
include "crypto/hkdf.h"
```

This CL provides a template for how to get rid of these header swaps and
give a platform abstraction in nearby instead.

We provide a platform abstraction in `platform/crypto.h` (really in
`platform/implementation/crypto.h`) which is implemented in
`platform/implementation/shared/crypto.cc`. However that implementation
is removed by `#ifdef` when in the Chromium build.

Then, in the Chromium repo, we will add (separately) an implementation
of the same abstraction in `//third_party/nearby/platform_impl` with GN
rules to include it in the build. It will replace the implementation
from the nearby repo.

Copybara import of the project:

--
6ca8099 by danakj <danakj@chromium.org>:

Provide a platform abstraction for RandBytes instead of swapping headers

The `RandBytes` functions were being placed in the `crypto` namespace,
which collides with Chromium's namespace of the same name. Within,
`RandBytes` was defined with almost-the-same API. Then in Chromium
builds, the Chromium header would be used instead (though somewhat
inconsistently).

This creates a lot of pain for Chromium development as there's a
third-party repository directly depending on headers from Chromium's
source tree, and is against the third-party policies for that reason.
There are a number of other headers that mirror Chromium and are
swapped out in the Chromium build that will cause similar pain, such as:
```
include "crypto/aead.h"
include "crypto/ec_private_key.h"
include "crypto/hkdf.h"
```

This CL provides a template for how to get rid of these header swaps and
give a platform abstraction in nearby instead.

We provide a platform abstraction in `platform/crypto.h` (really in
`platform/implementation/crypto.h`) which is implemented in
`platform/implementation/shared/crypto.cc`. However that implementation
is removed by `#ifdef` when in the Chromium build.

Then, in the Chromium repo, we will add (separately) an implementation
of the same abstraction in `//third_party/nearby/platform_impl` with GN
rules to include it in the build. It will replace the implementation
from the nearby repo.

--
9c2654b by danakj <danakj@chromium.org>:

Remove CryptoSpan, use absl::Span

The header swapping of Chromium crypto libraries is
problematic, but absl::Span will convert to base::span
so there's no need for the typedef even without
removing the header swapping yet.

--
df1135d by danakj <danakj@chromium.org>:

Add missing files

--
ab18a15 by danakj <danakj@chromium.org>:

Remove the random_unittest.cc from Swift build

The file moved, so the Swift package needs its path
updated.

--
2038f78 by danakj <danakj@chromium.org>:

Combine crypto unittests into crypto_test.cc

--
f7ad176 by danakj <danakj@chromium.org>:

Add stdint and stddef includes for uint8_t and size_t

--
9f04590 by danakj <danakj@chromium.org>:

Mark the shared crypto implementation compatable_with non_prod

--
18eeafd by danakj <danakj@chromium.org>:

Add IWYU pragma for crypto implementation

PiperOrigin-RevId: 632150866
2024-05-09 08:02:50 -07:00
hai007 1e1d841965 Multiplex implementation - Create Virtual Output Stream
PiperOrigin-RevId: 623540454
2024-04-10 10:44:50 -07:00
hai007 419fb08a8f Internal change
PiperOrigin-RevId: 621013420
2024-04-01 19:01:59 -07:00
Nick Bourdakos aa0a1bdfb8 Update Package.swift 2024-03-31 21:36:38 -04:00
hai007 a633a940f4 Multiplex implementation - Frame generation
PiperOrigin-RevId: 616247739
2024-03-15 14:45:01 -07:00
Guogang Li 61f71c6ce0 Added Nearby Context class
PiperOrigin-RevId: 615497408
2024-03-13 12:00:02 -07:00
hai007 16cb7f70b3 Implement Auto-reconnect after disconnection [1]
PiperOrigin-RevId: 592344338
2023-12-19 14:27:40 -08:00
Anay Wadhera 7022e6c5d9 Create instant on loss advertisement format
PiperOrigin-RevId: 590680562
2023-12-13 12:33:12 -08:00
Nick Bourdakos 387393f1d6 Delete old BLE code for Apple platforms
PiperOrigin-RevId: 559515626
2023-08-23 12:54:15 -07:00
Nick Bourdakos 9998093366 Add Objective-C++ BLE Medium wrapper
PiperOrigin-RevId: 558278732
2023-08-18 16:37:09 -07:00
Nick Bourdakos 07a94a950d Add Objective-C++ GATT client wrapper
PiperOrigin-RevId: 557925490
2023-08-17 13:48:48 -07:00
Nick Bourdakos 9d2cfc19c9 Add Objective-C++ GATT server wrapper
PiperOrigin-RevId: 552636264
2023-07-31 17:20:14 -07:00
Nick Bourdakos a42cdc7346 Move Server Socket and its dependencies to their own files
PiperOrigin-RevId: 551330682
2023-07-26 15:21:46 -07:00
Crisrael Lucero 0e44ed626d Refactor crypto/ directory into crypto_cros/ and crypto/
PiperOrigin-RevId: 549467911
2023-07-19 17:12:52 -07:00
Anay Wadhera d6d5310389 Weave port [8/n]: Introduce server socket implementation
PiperOrigin-RevId: 549446494
2023-07-19 15:43:57 -07:00