|
YAACC - UPNP Client and Server
|
Controls the playlist of an OpenHome device: the device owns the queue, this class reads it, edits it and starts the playback. More...

Classes | |
| interface | Sleeper |
| Waits; replaced in tests. More... | |
| class | State |
| What the device says it is doing. | |
| class | Track |
| A track to put into the queue. | |
Public Member Functions | |
| OhRemote (OhControl control) | |
| OhRemote (OhControl control, Sleeper sleeper) | |
| void | prepare () throws OhControlException |
| Wakes the device from standby and switches it to its playlist source. | |
| List< OhSources.Source > | sources () throws OhControlException |
| boolean | standby () throws OhControlException |
| void | setStandby (boolean standby) throws OhControlException |
Puts the device into standby or wakes it (without waiting for it, see selectSource for that). | |
| int | currentSourceIndex () throws OhControlException |
| void | selectSource (int index) throws OhControlException |
| Switches the device to the source (a device in standby is woken up first). | |
| int | tracksMax () throws OhControlException |
| List< Long > | idArray () throws OhControlException |
| List< OhQueue.Entry > | queue () throws OhControlException |
| The tracks of the queue; only the ones not seen before are read from the device. | |
| long | insert (long afterId, Track track) throws OhControlException |
| List< Long > | append (List< Track > tracks) throws OhControlException |
| Puts the tracks at the end of the queue, one after the other. | |
| List< Long > | replace (List< Track > tracks) throws OhControlException |
Empties the queue and puts the tracks in, at most MAX_TRACKS of them. | |
| long | moveTrack (long id, long afterId) throws OhControlException |
Puts a track at another place of the queue: behind the track afterId (0 for the start). | |
| void | deleteId (long id) throws OhControlException |
| void | deleteAll () throws OhControlException |
| void | play () throws OhControlException |
| void | pause () throws OhControlException |
| void | stop () throws OhControlException |
| void | next () throws OhControlException |
| void | previous () throws OhControlException |
| void | seekId (long id) throws OhControlException |
| void | seekIndex (long index) throws OhControlException |
| void | seekSecondAbsolute (long second) throws OhControlException |
| void | setRepeat (boolean repeat) throws OhControlException |
| void | setShuffle (boolean shuffle) throws OhControlException |
| int | volumePercent () throws OhControlException |
| boolean | muted () throws OhControlException |
| void | setVolumePercent (int percent) throws OhControlException |
| void | setMute (boolean mute) throws OhControlException |
| State | readBrief () throws OhControlException |
| Reads what the device does. | |
| State | readState () throws OhControlException |
Static Public Attributes | |
| static final int | MAX_TRACKS = OhQueue.DEFAULT_TRACKS_MAX |
| The most tracks of a device's queue the app takes in. | |
Controls the playlist of an OpenHome device: the device owns the queue, this class reads it, edits it and starts the playback.
Written against OhControl, so it knows nothing about Cling or Android. Not thread safe: use it from one thread.
| List< Long > de.yaacc.openhome.OhRemote.append | ( | List< Track > | tracks | ) | throws OhControlException |
Puts the tracks at the end of the queue, one after the other.
The queue holds at most MAX_TRACKS tracks: what does not fit is left out (as is everything after a track the device refuses because it is full).
Referenced by de.yaacc.player.OpenHomePlayer.addItems().


| int de.yaacc.openhome.OhRemote.currentSourceIndex | ( | ) | throws OhControlException |
| List< Long > de.yaacc.openhome.OhRemote.idArray | ( | ) | throws OhControlException |
Referenced by de.yaacc.openhome.OhRemote.append(), and de.yaacc.openhome.OhRemote.queue().


| long de.yaacc.openhome.OhRemote.insert | ( | long | afterId, |
| Track | track ) throws OhControlException |
Referenced by de.yaacc.openhome.OhRemote.moveTrack().

| long de.yaacc.openhome.OhRemote.moveTrack | ( | long | id, |
| long | afterId ) throws OhControlException |
Puts a track at another place of the queue: behind the track afterId (0 for the start).
A device with Playlist version 2 has an action for it; with version 1 the track is inserted at the new place and the old entry is deleted, which gives it a new id (a track that plays is better left alone then).
Referenced by de.yaacc.player.OpenHomePlayer.moveInPlayOrder().


| boolean de.yaacc.openhome.OhRemote.muted | ( | ) | throws OhControlException |
| void de.yaacc.openhome.OhRemote.prepare | ( | ) | throws OhControlException |
Wakes the device from standby and switches it to its playlist source.
Waits (a few seconds) for a device that wakes slowly.
| OhControlException | when the device has no playlist source or does not answer |

| State de.yaacc.openhome.OhRemote.readBrief | ( | ) | throws OhControlException |
Reads what the device does.
A service the device does not answer leaves its part of the state as it was empty. The transport state and the current track only (two calls): for a status line of a device that this app does not control. volume, seconds and the like stay at their defaults.

| List< Long > de.yaacc.openhome.OhRemote.replace | ( | List< Track > | tracks | ) | throws OhControlException |
Empties the queue and puts the tracks in, at most MAX_TRACKS of them.
Referenced by de.yaacc.player.OpenHomePlayer.setItems().

| List< OhSources.Source > de.yaacc.openhome.OhRemote.sources | ( | ) | throws OhControlException |

| boolean de.yaacc.openhome.OhRemote.standby | ( | ) | throws OhControlException |
Referenced by de.yaacc.openhome.OhRemote.setStandby().

| int de.yaacc.openhome.OhRemote.volumePercent | ( | ) | throws OhControlException |
