Commit Graph
51 Commits
Author SHA1 Message Date
hai007 419fb08a8f Internal change
PiperOrigin-RevId: 621013420
2024-04-01 19:01:59 -07:00
Copybara-Service ac887e55a9 Merge pull request #2125 from google:dependabot/pub/fastpair/rust/demo/archive-3.3.8
PiperOrigin-RevId: 572967743
2023-10-12 11:38:39 -07:00
Anay Wadhera 0d8ffabe08 Lock flutter_rust_bridge to 1.80.1 2023-10-12 05:03:19 +00:00
dependabot[bot] 8b20e22414 Bump archive from 3.3.7 to 3.3.8 in /fastpair/rust/demo
Bumps [archive](https://github.com/brendan-duncan/archive) from 3.3.7 to 3.3.8.
- [Changelog](https://github.com/brendan-duncan/archive/blob/main/CHANGELOG.md)
- [Commits](https://github.com/brendan-duncan/archive/compare/3.3.7...3.3.8)

---
updated-dependencies:
- dependency-name: archive
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-15 17:22:19 +00:00
Lucas Silva Shepard 22e7900bb3 [fp-rs] Fixing Presubmit linter issues for autogenerated Flutter code. 2023-08-18 20:12:00 -07:00
Lucas Silva Shepard 02e9cda698 [fp-rs] Comment cleanup. 2023-08-18 19:56:55 -07:00
Lucas Silva Shepard 5f255f1ff5 [fp-rs] Fixing build warnings by removing or annotating unused imports. 2023-08-18 18:11:16 -07:00
Lucas Silva Shepard 90812bfe73 [fp-rs] Making some values const rather than static or inlined. 2023-08-18 17:49:34 -07:00
Lucas Silva Shepard d89d1af459 [fp-rs] Added custom FP error type to Rust code. 2023-08-18 17:49:31 -07:00
Lucas Silva Shepard fb95e26bf5 [fp-rs] Added FP Advertisement unit tests in Rust. 2023-08-15 16:44:48 -07:00
Lucas Silva Shepard 169c04c430 [fp-rs] Split fetcher.rs into directory module, added mock. 2023-08-15 16:44:46 -07:00
Lucas Silva Shepard b1fa76f560 [fp-rs] Wrote unit tests for Fast Pair Decoder in Rust. 2023-08-15 16:44:04 -07:00
Lucas Silva Shepard 748bf9fb18 [fp-rs] Added unit tests to cover common portion of Rust Bluetooth library. 2023-08-15 16:44:04 -07:00
Lucas Silva Shepard bdc109324b [fp-rs] Fixing Presubmit Lint warnings for windows/ C++ files. 2023-08-15 15:24:33 -07:00
Lucas Silva Shepard 41be4cca57 [fp-rs] Adding copyright notice under windows/ and bindgen files. 2023-08-15 14:36:39 -07:00
Lucas Silva Shepard f2326f107e [fp-rs] Removing unused macOS, iOS, Android, web and Linux builds. These can be re-added in the future as needed. 2023-08-15 14:00:51 -07:00
Lucas Silva Shepard 3379d0ca3e [fp-rs] Providing second device JSON to test multi-device setup. 2023-08-14 13:36:24 -07:00
Lucas Silva Shepard a683ed6789 [fp-rs] Added device dismissing functionality. The Seeker will ignore a dismissed device's advertisements until a 10s timeout expires. 2023-08-14 13:33:46 -07:00
Lucas Silva Shepard 57373a80c3 [fp-rs] Displaying device image retrieved from model ID. 2023-08-14 13:33:44 -07:00
Lucas Silva Shepard 329e1b298e [fp-rs] Retrieving device information from model ID by parsing local file with serde. 2023-08-14 13:32:25 -07:00
Lucas Silva Shepard a57b55ad98 [fp-rs] Now using model ID instead of BLE address for keeping track of unique devices. 2023-08-14 13:32:22 -07:00
Lucas Silva Shepard f8fb8d4b52 [fp-rs] Flutter UI now only displays the closest discovered device. 2023-08-13 16:52:28 -07:00
Lucas Silva Shepard 0505a23b3f [fp-rs] Added bluetooth pairing button, result displayed in alert dialog. 2023-08-13 16:52:28 -07:00
Lucas Silva Shepard bf05ab5db4 [fp-rs] Invoking Rust code from Dart, retrieving stream of incoming bluetooth advertisements. 2023-08-13 16:52:26 -07:00
Lucas Silva Shepard 2c8809c1e1 [fp-rs] Converted bluetooth module into standalone crate, with fastpair UI provided as an example. 2023-08-13 16:51:16 -07:00
Lucas Silva Shepard 6074e1beba [fp-rs] Set up basic demo for calling Rust from Flutter 2023-08-13 16:51:13 -07:00
Lucas Silva Shepard 80a3b508fa [fp-rs] Providing constructs for generating Rust-side bridge code 2023-08-02 12:25:49 -07:00
Lucas Silva Shepard d7aedea815 [fp-rs] Initial Rust dummy commit for Flutter UI demo 2023-08-02 12:25:48 -07:00
Lucas Silva Shepard c45dd7467d [fp-rs] Initial flutter create commit 2023-08-02 12:25:48 -07:00
Lucas Silva Shepard 20e55d6d78 [fp-rs] Migrating from fastpair/rust to fastpair/rust/bluetooth. 2023-08-02 12:25:48 -07:00
Lucas Silva Shepard e73a9bb9a8 [fp-rs] Updated API for accessing platform-specific structs.
Previously, `Device` trait was implemented by both Classic and BLE
Devices. This forced usage of associated types for choosing the type of
address employed, bringing about limitations of Rust's type system. By
ensuring cross-platform traits are only used for shared cross-platform
behavior, there are no longer type annotation issues in the application
layer.

Changes:
* Split the `Device` trait into `ClassicDevice` and `BleDevice`.
* Migrated these to an `api/` module to avoid name clashes and clearly
  differentiate common structs (under `common/) from common traits (under
  `api/)`.
* Removed shared `Address` enum in order to get rid of device's address
  associated type.
* Application layer can now only talk to impl traits rather than the concrete
  platform-specific type. This ensures compile-time behavior guarantees.
  Constructors for cross-platform impls provided under the `Platform`
  unit struct.
* Updated `unsupported` module for unsupported platforms. Previously,
  dummy inherent impls would've been necessary for calling the `new()`
  method. This is now part of the `ClassicDevice` and `BleDevice` API,
  so cross-platform behavior is guaranteed to work.
2023-07-29 17:23:45 -07:00
Lucas Silva Shepard 25a3257880 [fp-rs] Moving service data and advertisement information into separate BleAdvertisement struct. 2023-07-29 17:23:13 -07:00
Lucas Silva Shepard f42fdb4186 [fp-rs] Temporarily removing bluetooth lib abstraction layer, applications now talk directly to platform code.
Rust's type system is causing issues with notating associated types. For
now, concrete types will be used, but this will be fixed when the API is
updated with splitting Device into ClassicDevice and BleDevice.
2023-07-29 17:22:16 -07:00
Lucas Silva Shepard ba945aa360 [fp-rs] Implemented device selection CLI. 2023-07-29 17:22:14 -07:00
Lucas Silva Shepard 7730a0f1db [fp-rs] Updating Fast Pair Seeker to filter out non-FP advertisements. 2023-07-29 17:18:46 -07:00
Lucas Silva Shepard 81592cc4c5 [fp-rs] Device now holds 16bit UUID service data, collected by Adapter. 2023-07-29 17:18:46 -07:00
Lucas Silva Shepard 4be9872f6d [fp-rs] Updated device scanning interface to facilitate adding more functionality to device constructor. 2023-07-29 17:18:46 -07:00
Lucas Silva Shepard fc07423925 [fp-rs] Implemented classic device pairing 2023-07-29 17:18:46 -07:00
Lucas Silva Shepard 9da0bf2987 [fp-rs] Implemented address API 2023-07-29 17:18:46 -07:00
Lucas Silva Shepard 494eb66027 [fp-rs] Implemented custom error types for Bluetooth library. 2023-07-29 17:18:39 -07:00
Lucas Silva Shepard 251740d010 [fp-rs] Renaming folder windows_ble to windows, moving common to folder 2023-07-19 12:10:21 -07:00
Anay Wadhera daed4f5f62 Revert "Revert "Fast Pair BLE Device Discovery for Windows in Rust"" 2023-07-14 15:53:52 -04:00
suetfei 15d3341e34 Revert "Fast Pair BLE Device Discovery for Windows in Rust" 2023-07-14 12:50:20 -07:00
Lucas Silva Shepard a855dd19e1 [fp-rs] Cross-platform Bluetooth now interfaces with impl trait rather than concrete per-platform type. 2023-07-13 16:09:37 -07:00
Lucas Silva Shepard aeed049d58 [fp-rs] Updating device scanning interface, split into start/stop/next. 2023-07-13 16:08:44 -07:00
Lucas Silva Shepard 1375066f74 [fp-rs] Adding line width formatting to Fast Pair Rust. 2023-07-13 16:08:23 -07:00
Lucas Silva Shepard 07b5750f07 [fp-rs] Implemented device discovery for FP Windows in Rust. 2023-07-13 16:08:22 -07:00
Lucas Silva Shepard 4e8c66e88b [fp-rs] Setting up boilerplate for multiplatform FP Rust. 2023-07-13 16:06:31 -07:00
Lucas Silva Shepard 5306df9251 [fp-rs] Adding Rust and IntelliJ to .gitignore 2023-07-12 12:42:45 -07:00
Suet-Fei Li 7aa1d852f1 Use public link for MessageStream.
PiperOrigin-RevId: 536516027
2023-05-30 14:52:10 -07:00