rust/bt-mcs: Add public methods for updating server state

Add high-level public methods on McsServer to update track metadata,
media playback state, position, identity, and optional control
characteristics.

Issue GATT notifications for state updates according to MCS v1.0.1:
 - Order Track Changed notification after track property updates
 - Resolve FromEnd track position offsets into non-negative values
 - Notify TrackPosition as Unavailable on transition to Inactive
 - Treat redundant Media State transitions as no-ops
 - Reject write notifications when state validation fails

Update track position calculation to factor in playback speed and
seeking speed without integer overflow.

Add FakeServerEventsExt assertion helpers in bt-gatt test_utils and
update the MCS server test suite to explicitly assert GATT handles
and notification payloads.

Bug: 540400364
Test: cargo test -p bt-gatt -p bt-mcs, ./presubmit.sh
Change-Id: Ib0d9e20de601d19bce339e332d5256a3f998eb10
Reviewed-on: https://bluetooth-review.googlesource.com/c/bluetooth/+/3900
6 files changed
tree: 14fc2dab4fe768ed60aea23115fc127a480d06ab
  1. .agents/
  2. docs/
  3. infra/
  4. rust/
  5. .gitignore
  6. AUTHORS
  7. CONTRIBUTING.md
  8. GEMINI.md
  9. LICENSE
  10. OWNERS
  11. PATENTS
  12. presubmit.sh
  13. README.md
README.md

Bluetooth Shared Libraries

What is this?

This is a repository for shared libraries and tools that can be useful for multiple Bluetooth stacks.

These tools and libraries are meant to be:

  • Stack-agnostic and platform-agnostic
  • Implement a useful subset of a published Bluetooth specification.

It has been started as a repository for developing Rust crates but can be easily expanded to include libraries and tools written in other languages.

What is this not?

It is not a full Bluetooth stack. Google has two officially open-source Bluetooth stacks:

Structure

  • rust - Rust Crates
  • docs - General documentation (documentation for each library/tool is included in their directories)