Struct sonos::Speaker
[−]
[src]
pub struct Speaker { pub ip: IpAddr, pub model: String, pub model_number: String, pub software_version: String, pub hardware_version: String, pub serial_number: String, pub name: String, pub uuid: String, }
Fields
ip: IpAddr
model: String
model_number: String
software_version: String
hardware_version: String
serial_number: String
name: String
uuid: String
Methods
impl Speaker
[src]
fn from_ip(ip: IpAddr) -> Result<Speaker>
[src]
Create a new instance of this struct from an IP address
fn coordinator(&self) -> Result<IpAddr>
[src]
Get the coordinator for this speaker.
fn soap(
&self,
endpoint: &str,
service: &str,
action: &str,
payload: &str,
coordinator: bool
) -> Result<Element>
[src]
&self,
endpoint: &str,
service: &str,
action: &str,
payload: &str,
coordinator: bool
) -> Result<Element>
Call the Sonos SOAP endpoint
Arguments
endpoint
- The SOAP endpoint to call (eg. MediaRenderer/AVTransport/Control)service
- The SOAP service to call (eg. urn:schemas-upnp-org:service:AVTransport:1)action
- The action to call on the soap service (eg. Play)payload
- XML doc to pass inside the action call bodycoordinator
- Whether this SOAP call should be performed on the group coordinator or the speaker it was called on
fn play(&self) -> Result<()>
[src]
Play the current track
fn pause(&self) -> Result<()>
[src]
Pause the current track
fn stop(&self) -> Result<()>
[src]
Stop the current queue
fn next(&self) -> Result<()>
[src]
Skip the current track
fn previous(&self) -> Result<()>
[src]
Go to the previous track
fn seek(&self, time: &Duration) -> Result<()>
[src]
Seek to a time on the current track
fn play_queue_item(&self, track: &u64) -> Result<()>
[src]
Change the track, beginning at 1
fn remove_track(&self, track: &u64) -> Result<()>
[src]
Remove track at index from queue, beginning at 1
fn queue_track(&self, uri: &str) -> Result<()>
[src]
Add a new track to the end of the queue
fn queue_next(&self, uri: &str) -> Result<()>
[src]
fn play_track(&self, uri: &str) -> Result<()>
[src]
Replace the current track with a new one
fn clear_queue(&self) -> Result<()>
[src]
Remove every track from the queue
fn volume(&self) -> Result<u8>
[src]
Get the current volume
fn set_volume(&self, volume: u8) -> Result<()>
[src]
Set a new volume from 0-100.
fn muted(&self) -> Result<bool>
[src]
Check if this player is currently muted
fn mute(&self) -> Result<()>
[src]
Mute the current player
fn unmute(&self) -> Result<()>
[src]
Unmute the current player
fn transport_state(&self) -> Result<TransportState>
[src]
Get the transport state of the current player
fn track(&self) -> Result<Track>
[src]
Get information about the current track