|
YAACC - UPNP Client and Server
|
Monitors UPnP renderer status (transport state and track) by polling the AVTransport service. More...

Classes | |
| interface | StatusListener |
Public Member Functions | |
| void | subscribe (StatusListener listener, Collection<? extends Device > devices) |
| Registers the listener and starts polling every given device that isn't polled yet. | |
| void | unsubscribe (StatusListener listener) |
| Removes the listener; it is not called again, even for results already queued. | |
| RendererStatus | getStatus (Device device) |
Static Public Member Functions | |
| static RendererStatusMonitor | getShared () |
| The app-wide monitor. | |
Monitors UPnP renderer status (transport state and track) by polling the AVTransport service.
Volume and mute are polled by ReceiverVolumeLiveUpdater, per host and only for the rows on screen.
One app-wide instance (getShared()) serves the Receiver tab and the device sheet, so opening the sheet doesn't start a second poller. Polling runs while at least one listener is subscribed; each device is polled by at most one chain. Unsubscribing the last listener bumps a generation counter, so requests still in flight neither notify anyone nor reschedule themselves. All public methods must be called on the main thread.
|
static |
The app-wide monitor.
Holds no Context; listeners are held only until they unsubscribe.
| void de.yaacc.browser.RendererStatusMonitor.subscribe | ( | StatusListener | listener, |
| Collection<? extends Device > | devices ) |
Registers the listener and starts polling every given device that isn't polled yet.
Subscribing an already subscribed listener only adds devices.
| void de.yaacc.browser.RendererStatusMonitor.unsubscribe | ( | StatusListener | listener | ) |
Removes the listener; it is not called again, even for results already queued.
Polling stops once no listener is left.