Repository navigation
Remove the API deprecated for removal in v0.11.0 - #307
Merged
Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
🟢 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_senseand 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
on_group_update,on_pairing_started/succeeded/failed,on_display_pairing_code,on_metadata,on_spectrum,on_visualizer_stream_start,on_audio_writeload_blob/save_blob;read_blob/write_blobnow default to nullopt/false inlinepairing_token(),format_pairing_token(),get_server_information(),get_group_state(),PlayerRole::get_current_stream_params(),persistence_keys::record_slot_key()ServerInformationObject,GroupUpdateObject,ServerMetadataStateObject,ServerVisualizerStreamObject,ServerPlayerStreamObjecttime_burst_response_timeout_ms,DEFAULT_BURST_TIMEOUT_MSon_audio_output()is now pure virtual, as the integration guide announcedReservedText, 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
on_track_metadata()keeps the view readable and clears on the next drain.