Skip to content

Remove the API deprecated for removal in v0.11.0 - #307

Merged
kahrendt merged 3 commits into
mainfrom
remove-v0.11-deprecations
Dec 2, 2026
Merged

kahrendt merged 3 commits into
mainfrom
remove-v0.11-deprecations

Conversation

@kahrendt

@kahrendt kahrendt commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Removes every public API deprecated in v0.10.0 for removal in v0.11.0. SourceRoleConfig::line_sense, deprecated for v0.12.0, stays. The JSON strict-mode flags (GROUP_ID_STRICT, METADATA_STRICT) are untouched.

The v0.10.0 migration guide maps each removed form to its replacement.

Change

  • Listener callbacks: on_group_update, on_pairing_started/succeeded/failed, on_display_pairing_code, on_metadata, on_spectrum, on_visualizer_stream_start, on_audio_write
  • Provider: load_blob/save_blob; read_blob/write_blob now default to nullopt/false inline
  • Getters: pairing_token(), format_pairing_token(), get_server_information(), get_group_state(), PlayerRole::get_current_stream_params(), persistence_keys::record_slot_key()
  • Types: ServerInformationObject, GroupUpdateObject, ServerMetadataStateObject, ServerVisualizerStreamObject, ServerPlayerStreamObject
  • Config: time_burst_response_timeout_ms, DEFAULT_BURST_TIMEOUT_MS
  • on_audio_output() is now pure virtual, as the integration guide announced
  • Internals: the storage the deprecated forms needed is gone (ReservedText, the metadata and group string copies, the visualizer stream object). add_metadata() no longer reserves about 3 KB of strings. The server information moves out of the mutex-guarded published state, since nothing reads it off the protocol task any more.

get_server_information() was the only off-main-loop way to read the server; its docs already said that use had no replacement, and it is removed as scheduled.

Tests

  • Deleted the tests that only compared deprecated against view dispatch.
  • Kept their non-deprecated checks: a teardown during on_track_metadata() keeps the view readable and clears on the next drain.
  • Tests that read through deprecated getters now use the view forms.
  • Host library also built with the metadata, visualizer, player and Opus options off.
  • Not yet run: TSan, ESP-IDF compile.

Drops every std::string, std::vector and pointer form the view API replaced
in v0.10.0: the listener, provider and role callbacks, the client and player
getters, their public types, record_slot_key() and the ignored
time_burst_response_timeout_ms. on_audio_output() becomes pure virtual.
SourceRoleConfig::line_sense stays until v0.12.0.
The server information no longer has an any-thread reader, so it leaves the
mutex-guarded published state for a protocol-task-only member. Restores the
teardown-during-on_track_metadata() check the removed forms test carried, and
drops comments that still described the removed forms.
@kahrendt
kahrendt marked this pull request as ready for review December 2, 2026 23:38
@kahrendt
kahrendt requested an adaptive review from Copilot December 2, 2026 23:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain with the removal of deprecated APIs and compatibility storage.

No open issues 🎉

What changed in this PR

Removes sendspin-cpp APIs scheduled for removal in v0.11.0, leaving the current view-based interfaces and eliminating compatibility storage.

Changes:

  • Removes deprecated callbacks, getters, types and configuration; makes on_audio_output() pure virtual.
  • Removes redundant string copies and keeps server identity on the protocol task.
  • Updates tests and documentation while retaining line_sense and leaving strict-mode flags unchanged.
File Description
tests/​test_visualizer_role.cpp Tests current visualizer callbacks only.
tests/​test_record_store.cpp Removes deprecated provider and token checks.
tests/​test_player_role.cpp Removes legacy audio-write tests.
tests/​test_pairing_state_machine.cpp Updates callback names in comments and diagnostics.
tests/​test_encrypted_lifecycle.cpp Uses current APIs; preserves metadata teardown coverage.
tests/​test_connection_lifecycle.cpp Reads server information through the main loop.
tests/​test_client_lifecycle.cpp Removes compatibility tests and updates state access.
tests/​test_allocations.cpp Measures current callback paths only.
tests/​lifecycle_test_fixtures.h Removes deprecated getter comparisons.
src/​visualizer_role.cpp Removes legacy callback dispatch.
src/​visualizer_role_impl.h Removes compatibility stream storage.
src/​reserved_text.h Deletes obsolete string-storage helper.
src/​protocol_messages.h Removes obsolete visualizer constant and updates comments.
src/​player_role.cpp Removes legacy audio forwarding and stream getter.
src/​player_role_impl.h Removes deprecated stream storage.
src/​metadata_role.cpp Removes compatibility string copies and dispatch.
src/​metadata_role_impl.h Removes deprecated metadata storage.
src/​connection_manager.h Makes server identity protocol-task-owned.
src/​connection_manager.cpp Removes locked server getter and relocates identity updates.
src/​client.cpp Removes deprecated adapters, getters and storage.
include/​sendspin/​visualizer_role.h Removes legacy visualizer API.
include/​sendspin/​types.h Removes owning server and group types.
include/​sendspin/​player_role.h Requires audio output; removes legacy stream API.
include/​sendspin/​persistence_keys.h Removes string-returning slot-key helper.
include/​sendspin/​metadata_role.h Removes legacy metadata type and callback.
include/​sendspin/​config.h Removes ignored burst-timeout configuration.
include/​sendspin/​client.h Removes deprecated API and inlines provider defaults.
docs/​internals.md Updates dispatch, storage and locking descriptions.
docs/​integration-guide.md Updates API guidance and memory figures.
docs/​conventions.md Updates shared-state ownership guidance.

Review effort: Balanced (adaptive)

With the deprecated forms gone, apply_current_state() and fire_stream_start()
no longer fill member state, so clang-tidy asks for const.
@kahrendt
kahrendt merged commit 922b821 into main Dec 2, 2026
16 checks passed
@kahrendt
kahrendt deleted the remove-v0.11-deprecations branch December 2, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants