Modules§
- alarm_
clock - Request and Response types for the
AlarmClockservice. - audio_
in - Request and Response types for the
AudioInservice. - av_
transport - Request and Response types for the
AVTransportservice. - connection_
manager - Request and Response types for the
ConnectionManagerservice. - content_
directory - Request and Response types for the
ContentDirectoryservice. - device_
properties - Request and Response types for the
DevicePropertiesservice. - group_
management - Request and Response types for the
GroupManagementservice. - group_
rendering_ control - Request and Response types for the
GroupRenderingControlservice. - ht_
control - Request and Response types for the
HTControlservice. - music_
services - Request and Response types for the
MusicServicesservice. - 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
QPlayservice. - queue
- Request and Response types for the
Queueservice. - rendering_
control - Request and Response types for the
RenderingControlservice. - system_
properties - Request and Response types for the
SystemPropertiesservice. - virtual_
line_ in - Request and Response types for the
VirtualLineInservice. - zone_
group_ topology - Request and Response types for the
ZoneGroupTopologyservice.
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
unsubscribemethod 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
discoverfunction 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
SonosDeviceinstances as responses to discovery requests are detected. Note that it is possible (likely) for duplicates to be returned. - duration_
to_ hms - Convert a
Durationinto 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:SSinto a Duration.