Crate sonos

Source

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 is use 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§

AlbumArtUri
AlbumTitle
Artist
Creator
DecodeXmlString
This is a wrapper container that can be used to adapt a scalar embedded xml string value into a more rich Rust type representation.
DeviceSpec
DidlLite
EventStream
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.
MimeType
QueueItemId
Res
Satellite
Service
SonosDevice
Title
TrackMetaData
Represents DIDL-Lite information but in a more ergonomic form. This type can be converted to/from the corresponding DIDL-Lite xml form.
TrackMetaDataList
UpnpDuration
UpnpItem
ZoneGroup
ZoneGroupMember
ZoneGroupState

Enums§

AlarmPlayMode
BrowseFlag
ButtonLockState
Channel
ConnectionStatus
CurrentPlayMode
Direction
Error
IRRepeaterState
LEDFeedbackState
LEDState
MuteChannel
ObjectClass
PlaybackStorageMedium
RampType
Recurrence
SeekMode
TransportState
UnresponsiveDeviceActionType
UpdateType

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)
AlarmClock
Control the sonos alarms and times
AudioIn
Control line in
ConnectionManager
Services related to connections and protocols
ContentDirectory
Browse for local content
DecodeSoapResponse
This trait decodes a SOAP response envelope into Self
DecodeXml
A helper trait for parsing a uPNP event stream into a more ergonomic Rust type
DeviceProperties
Modify device properties, like LED status and stereo pairs
EncodeXml
A helper trait for encoding types into an XML representation
GroupManagement
Services related to groups
GroupRenderingControl
Volume related controls for groups
HTControl
Service related to the TV remote control
MusicServices
Access to external music services, like Spotify or Youtube Music
QPlay
Services related to Chinese Tencent Qplay service
Queue
Modify and browse queues
RenderingControl
Volume related controls
SystemProperties
Manage system-wide settings, mainly account stuff
VirtualLineIn
ZoneGroupTopology
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 form HH: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.

Type Aliases§

Result