Expand description
GroupManagement service for speaker group membership operations
This service handles group membership operations (add/remove members, track buffering) for Sonos speaker groups. Operations should only be sent to the group coordinator.
§Control Operations
ⓘ
use sonos_api::services::group_management;
let add_op = group_management::add_member("RINCON_123".to_string(), 1).build()?;
client.execute("192.168.1.100", add_op)?;§Event Subscriptions
ⓘ
let subscription = group_management::subscribe(&client, "192.168.1.100", "http://callback")?;§Event Handling
ⓘ
use sonos_api::services::group_management::events::{GroupManagementEventParser, create_enriched_event};
use sonos_api::events::EventSource;
let parser = GroupManagementEventParser;
let event_data = parser.parse_upnp_event(xml_content)?;
let enriched = create_enriched_event(speaker_ip, event_source, event_data);§Important Notes
- Operations should only be sent to the group coordinator
Re-exports§
pub use events::create_enriched_event;pub use events::create_enriched_event_with_registration_id;pub use events::GroupManagementEvent;pub use events::GroupManagementEventParser;pub use state::GroupManagementState;pub use operations::*;
Modules§
- events
- GroupManagement service event types and parsing
- operations
- GroupManagement service operations
- state
- Canonical GroupManagement service state type.
Constants§
- SERVICE
- Service constant for GroupManagement
Functions§
- subscribe
- Subscribe to GroupManagement events
- subscribe_
with_ timeout - Subscribe to GroupManagement events with custom timeout