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

The snapservers the user typed in, kept as a plain list of host:port lines in a StringStore (the app's preferences). More...

Collaboration diagram for de.yaacc.snapcast.discovery.ManualServers:
Collaboration graph

Classes

enum  AddResult
 The outcome of add. More...
 

Public Member Functions

 ManualServers (StringStore storage)
 
List< ServerEndpoint > list ()
 
AddResult add (String text)
 Adds a server typed by the user (the text is not trimmed: white space is refused).
 
boolean remove (ServerKey key)
 

Static Public Attributes

static final int MAX_SERVERS = 16
 The most manual servers; the same cap as the directory.
 

Detailed Description

The snapservers the user typed in, kept as a plain list of host:port lines in a StringStore (the app's preferences).

Nothing but the endpoint is stored: no credentials, no names from a server. Whatever is read back is checked again with ServerEndpoint#parse, so a damaged or edited store cannot put anything else into the list. Thread safe; pure (the storage is behind an interface).

Member Function Documentation

◆ list()

List< ServerEndpoint > de.yaacc.snapcast.discovery.ManualServers.list ( )
Returns
the servers in the order they were added

Referenced by de.yaacc.snapcast.SnapcastHub.pageStarted(), and de.yaacc.snapcast.SnapcastHub.wake().

Here is the caller graph for this function:

◆ remove()

boolean de.yaacc.snapcast.discovery.ManualServers.remove ( ServerKey key)
Returns
true if the server was in the list

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