YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.snapcast.ui.SnapcastClientServerChoice Class Reference

Which server the phone's Snapcast client uses (task 12.10, the owner's rule of 2026-11-16): the server it was last connected to; if it was connected to none (or that one is not known any more), the first known server, in the order of SnapcastServerChoices (last used, typed in, remembered, found); none when no server is known. More...

Collaboration diagram for de.yaacc.snapcast.ui.SnapcastClientServerChoice:
Collaboration graph

Static Public Member Functions

static SnapcastServerChoices.Choice resolve (String lastConnectedKey, List< SnapcastServerChoices.Choice > known)
 
static int currentIndex (String lastConnectedKey, List< SnapcastServerChoices.Choice > known)
 
static boolean sameServer (String hostText, String otherHostText)
 

Detailed Description

Which server the phone's Snapcast client uses (task 12.10, the owner's rule of 2026-11-16): the server it was last connected to; if it was connected to none (or that one is not known any more), the first known server, in the order of SnapcastServerChoices (last used, typed in, remembered, found); none when no server is known.

No automatic failover: a server that does not answer is retried by the client, and the user chooses another one. Pure.

The "known servers" are the choices that SnapcastServerChoices#of builds from the server list: the host only, the client connects to the stream port 1704 (a server on another stream port has to be typed in the listen test). The remembered key is validated here, on read: a text that is no server is the same as none.

Member Function Documentation

◆ currentIndex()

static int de.yaacc.snapcast.ui.SnapcastClientServerChoice.currentIndex ( String lastConnectedKey,
List< SnapcastServerChoices.Choice > known )
static
Returns
the position of the server that resolve returns, to mark it in the list; -1 when none is known

Referenced by de.yaacc.snapcast.client.SnapcastClientPowers.currentServerIndex(), and de.yaacc.snapcast.ui.SnapcastClientServerChoice.resolve().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resolve()

static SnapcastServerChoices.Choice de.yaacc.snapcast.ui.SnapcastClientServerChoice.resolve ( String lastConnectedKey,
List< SnapcastServerChoices.Choice > known )
static
Parameters
lastConnectedKeythe remembered text of the server the client was last connected to (may be null or damaged)
knownthe known servers in their order (may be null)
Returns
the server to use; null when none is known

Referenced by de.yaacc.snapcast.client.SnapcastClientPowers.currentServer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sameServer()

static boolean de.yaacc.snapcast.ui.SnapcastClientServerChoice.sameServer ( String hostText,
String otherHostText )
static
Returns
true when both texts are valid server addresses with the same target (the default stream port when none is written, the name or number as the endpoint parser reads it); false when either is not a server

Referenced by de.yaacc.snapcast.ui.SnapcastClientServerChoice.currentIndex(), and de.yaacc.snapcast.client.SnapcastClientServerSwitch.decide().

Here is the call graph for this function:
Here is the caller graph for this function:

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