[−][src]Struct sonos::Speaker
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]
pub fn from_ip(ip: IpAddr) -> Result<Speaker>
[src]
Create a new instance of this struct from an IP address
pub fn coordinator(&self) -> Result<IpAddr>
[src]
Broken on Sonos 9.1
Get the coordinator for this speaker.
pub 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
pub fn play(&self) -> Result<()>
[src]
Play the current track
pub fn pause(&self) -> Result<()>
[src]
Pause the current track
pub fn stop(&self) -> Result<()>
[src]
Stop the current queue
pub fn next(&self) -> Result<()>
[src]
Skip the current track
pub fn previous(&self) -> Result<()>
[src]
Go to the previous track
pub fn seek(&self, time: &Duration) -> Result<()>
[src]
Seek to a time on the current track
pub fn play_queue_item(&self, track: &u64) -> Result<()>
[src]
Change the track, beginning at 1
pub fn remove_track(&self, track: &u64) -> Result<()>
[src]
Remove track at index from queue, beginning at 1
pub fn queue_track(&self, uri: &str) -> Result<()>
[src]
Add a new track to the end of the queue
pub fn queue_next(&self, uri: &str) -> Result<()>
[src]
Add a track to the queue to play next
pub fn play_track(&self, uri: &str) -> Result<()>
[src]
Replace the current track with a new one
pub fn clear_queue(&self) -> Result<()>
[src]
Remove every track from the queue
pub fn volume(&self) -> Result<u8>
[src]
Get the current volume
pub fn set_volume(&self, volume: u8) -> Result<()>
[src]
Set a new volume from 0-100.
pub fn muted(&self) -> Result<bool>
[src]
Check if this player is currently muted
pub fn mute(&self) -> Result<()>
[src]
Mute the current player
pub fn unmute(&self) -> Result<()>
[src]
Unmute the current player
pub fn transport_state(&self) -> Result<TransportState>
[src]
Get the transport state of the current player
pub fn track(&self) -> Result<Track>
[src]
Get information about the current track
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Speaker
impl Send for Speaker
impl Sync for Speaker
impl Unpin for Speaker
impl UnwindSafe for Speaker
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,