Modules§
- alarm_
clock - Request and Response types for the
AlarmClock
service. - audio_
in - Request and Response types for the
AudioIn
service. - av_
transport - Request and Response types for the
AVTransport
service. - connection_
manager - Request and Response types for the
ConnectionManager
service. - content_
directory - Request and Response types for the
ContentDirectory
service. - device_
properties - Request and Response types for the
DeviceProperties
service. - group_
management - Request and Response types for the
GroupManagement
service. - group_
rendering_ control - Request and Response types for the
GroupRenderingControl
service. - ht_
control - Request and Response types for the
HTControl
service. - music_
services - Request and Response types for the
MusicServices
service. - prelude
- The prelude makes it convenient to use the methods of
SonosDevice
. Intended usage isuse sonos::prelude::*;
and then you don’t have to worry about importing the individual service traits. - q_play
- Request and Response types for the
QPlay
service. - queue
- Request and Response types for the
Queue
service. - rendering_
control - Request and Response types for the
RenderingControl
service. - system_
properties - Request and Response types for the
SystemProperties
service. - virtual_
line_ in - Request and Response types for the
VirtualLineIn
service. - zone_
group_ topology - Request and Response types for the
ZoneGroupTopology
service.
Structs§
- Album
ArtUri - Album
Title - Artist
- Creator
- Decode
XmlString - This is a wrapper container that can be used to adapt a scalar embedded xml string value into a more rich Rust type representation.
- Device
Spec - Didl
Lite - Event
Stream - Manages a live subscription to an event stream for a service.
While this object is live, the event stream will be renewed
every minute.
The stream isn’t automatically cancelled on Drop because there
is no async-Drop, but you can call the
unsubscribe
method to explicitly cancel it. The stream dispatching machinery has liveness checking that will ping the internal receiver and will cancel the subscription after about a minute or so of the EventStream being dropped. - Mime
Type - Queue
Item Id - Res
- Satellite
- Service
- Sonos
Device - Title
- Track
Meta Data - Represents DIDL-Lite information but in a more ergonomic form. This type can be converted to/from the corresponding DIDL-Lite xml form.
- Track
Meta Data List - Upnp
Duration - Upnp
Item - Zone
Group - Zone
Group Member - Zone
Group State
Enums§
- Alarm
Play Mode - Browse
Flag - Button
Lock State - Channel
- Connection
Status - Current
Play Mode - Direction
- Error
- IRRepeater
State - LEDFeedback
State - LEDState
- Mute
Channel - Object
Class - Playback
Storage Medium - Ramp
Type - Recurrence
- Seek
Mode - Transport
State - Unresponsive
Device Action Type - Update
Type
Constants§
- SONOS_
URN - URN identifying Sonos ZonePlayer compatible products.
This is used internally by the
discover
function but is made available to you in case you plan to implement your own custom discovery functionality.
Traits§
- AVTransport
- Service that controls stuff related to transport (play/pause/next/special URLs)
- Alarm
Clock - Control the sonos alarms and times
- AudioIn
- Control line in
- Connection
Manager - Services related to connections and protocols
- Content
Directory - Browse for local content
- Decode
Soap Response - This trait decodes a SOAP response envelope into Self
- Decode
Xml - A helper trait for parsing a uPNP event stream into a more ergonomic Rust type
- Device
Properties - Modify device properties, like LED status and stereo pairs
- Encode
Xml - A helper trait for encoding types into an XML representation
- Group
Management - Services related to groups
- Group
Rendering Control - Volume related controls for groups
- HTControl
- Service related to the TV remote control
- Music
Services - Access to external music services, like Spotify or Youtube Music
- QPlay
- Services related to Chinese Tencent Qplay service
- Queue
- Modify and browse queues
- Rendering
Control - Volume related controls
- System
Properties - Manage system-wide settings, mainly account stuff
- Virtual
Line In - Zone
Group Topology - Zone config stuff, eg getting all the configured sonos zones
Functions§
- discover
- Discover SonosDevices on the network, stopping once the specified
timeout is reached.
Returns a channel that will yield
SonosDevice
instances as responses to discovery requests are detected. Note that it is possible (likely) for duplicates to be returned. - duration_
to_ hms - Convert a
Duration
into a string of the formHH:MM:SS
, which is used in parts of UPNP to represent a duration. - hms_
to_ duration - Convert a string of the form
HH:MM:SS
into a Duration.