YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.upnp.server.openhome.RendererOutputSources Class Reference

The source list of the OpenHome renderer as one way into the renderer's output setting (task 12.5). More...

Inheritance diagram for de.yaacc.upnp.server.openhome.RendererOutputSources:
Inheritance graph
Collaboration diagram for de.yaacc.upnp.server.openhome.RendererOutputSources:
Collaboration graph

Classes

interface  PrefWriter
 Stores the preferences all or none; may throw a runtime exception. More...
 
enum  Refusal
 Why a choice was refused. More...
 

Public Member Functions

 RendererOutputSources (SnapcastRendererOutput.StringSource preferences, PrefWriter writer, Supplier< List< SnapcastRendererSources.GroupRef > > groups, SnapcastRendererSources.Labels labels, Consumer< Refusal > refusals)
 
 RendererOutputSources (SnapcastRendererOutput.StringSource preferences, PrefWriter writer, Supplier< List< SnapcastRendererSources.GroupRef > > groups, Supplier< List< SnapcastRendererSources.SendspinRef > > sendspin, SnapcastRendererSources.Labels labels, Consumer< Refusal > refusals)
 As above, with the Sendspin players and groups of this phone's hub (known now) as sources too.
 
SnapcastRendererSources.Snapshot snapshot ()
 The list as it is now (never null).
 
boolean select (SnapcastRendererSources.Entry entry)
 Makes this source the output of the renderer.
 
- Public Member Functions inherited from de.yaacc.upnp.server.openhome.OhSourceProvider

Detailed Description

The source list of the OpenHome renderer as one way into the renderer's output setting (task 12.5).

The list is built at every call from the setting and the groups known now, so it can not drift from the settings screen. Choosing a source writes the same two preferences the settings screen writes (SnapcastRendererOutput#KEY_OUTPUT, and for a group SnapcastRendererOutput#KEY_GROUP with the receiver id) in one step; the rest follows from the listeners of those preferences (the player service stops a player of another output, the hub remembers the server of the group).

The source a controller chooses comes from a list that may be older than the groups: it is checked against the groups of now, and a group that vanished is refused with nothing written (the old output stays, the controller sees the old source, the user is told). Choosing the source that is the current one changes nothing. Pure Java: the preferences, the groups and the message are handed in.

Constructor & Destructor Documentation

◆ RendererOutputSources()

de.yaacc.upnp.server.openhome.RendererOutputSources.RendererOutputSources ( SnapcastRendererOutput.StringSource preferences,
PrefWriter writer,
Supplier< List< SnapcastRendererSources.GroupRef > > groups,
SnapcastRendererSources.Labels labels,
Consumer< Refusal > refusals )
Parameters
preferencesreads a preference as text (the default preferences of the app)
groupsthe groups known now (the Snapcast hub's)
refusalstold when a choice is refused (the app shows a message; it must be quick)

Member Function Documentation

◆ select()

boolean de.yaacc.upnp.server.openhome.RendererOutputSources.select ( SnapcastRendererSources.Entry entry)

Makes this source the output of the renderer.

Parameters
entrya source of an earlier snapshot; it is checked against the facts of now
Returns
true when the output is this source now (also when it already was); false when it was refused (the old output stays, the user was told)

Implements de.yaacc.upnp.server.openhome.OhSourceProvider.

Here is the call graph for this function:

◆ snapshot()

SnapcastRendererSources.Snapshot de.yaacc.upnp.server.openhome.RendererOutputSources.snapshot ( )

The list as it is now (never null).

May throw: the core then keeps what it told the controllers last.

Implements de.yaacc.upnp.server.openhome.OhSourceProvider.

Here is the call graph for this function:

The documentation for this class was generated from the following file: