Skip to main content

Module services

Module services 

Source
Expand description

Service modules with enhanced UPnP operations

This module contains service definitions using the new enhanced operation framework. Each service provides operations with composability, validation, and builder patterns.

§Usage

Import services individually to avoid naming conflicts:

use sonos_api::services::av_transport;
use sonos_api::services::rendering_control;

// Service-specific operations
let play_op = av_transport::play("1".to_string()).build()?;
let volume_op = rendering_control::set_volume("Master".to_string(), 50).build()?;

// Service-specific subscriptions
let av_subscription = av_transport::subscribe(&client, "192.168.1.100", "http://callback")?;
let rc_subscription = rendering_control::subscribe(&client, "192.168.1.100", "http://callback")?;

Modules§

av_transport
AVTransport service for playback control and transport events
events
UPnP event subscription operations
group_management
GroupManagement service for speaker group membership operations
group_rendering_control
GroupRenderingControl service for group-wide audio rendering operations
rendering_control
RenderingControl service for audio rendering operations and events
zone_group_topology
ZoneGroupTopology service for topology operations and events