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

The server list of the Snapcast settings: what the user can type in, and what is listed. More...

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

Classes

enum  Kind
 Why a server is in the list. More...
 
enum  Outcome
 What add did. More...
 
class  Row
 One row of the list.
 

Public Member Functions

 SnapcastServerListModel (ManualServers manualServers, SnapcastDirectory directory, SnapcastServerAdmin admin)
 
boolean canAdd ()
 True while another server can be typed in.
 
Outcome add (String input)
 Checks and stores what the user typed in; the directory lists the server at once when it was added.
 
SnapcastServerAdmin.Result remove (ServerKey key)
 Removes a server, see SnapcastServerAdmin#remove.
 
List< Row > rows ()
 The rows: the typed-in servers first, then the others, each group by endpoint.
 

Detailed Description

The server list of the Snapcast settings: what the user can type in, and what is listed.

Pure Java (the dialog only forwards text and shows the rows).

  • Strict input. The text is trimmed and must be a host name or an address with an optional port (ServerEndpoint#parse); credentials (user:password@host) get their own message and are never stored, a URL is invalid. At most {@value ManualServers.MAX_SERVERS} servers; a server that is in the list already (written another way) is merged, not added twice.
  • One row per server. The typed-in servers and the ones the directory knows (found on the network, or remembered because a selected group lives there) are merged by endpoint. A name that came from the network is cleaned again before it is shown. Only what the user typed in, and what was remembered, can be removed: a server that is announced on the network is not the user's to remove.
  • Remove means removed: see SnapcastServerAdmin.

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