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

The clients of a server as rows with the group they are in, and the member list that the link sheet's change needs. More...

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

Classes

class  Candidate
 A client of another group of the same server.
 
interface  Words
 The localized labels for nameless clients and groups. More...
 

Static Public Member Functions

static List< String > wantedAfter (SnapcastGroup group, java.util.Collection< String > addedIds, java.util.Collection< String > removedIds)
 The full member list for Group.SetClients after one change that adds and removes members at once (the link sheet): the current members in their order without the removed ones, then the added ones.
 

Detailed Description

The clients of a server as rows with the group they are in, and the member list that the link sheet's change needs.

Pure.

The rule of Group.SetClients. The call takes the full list of members the group should have. Clients of the group that are not in the list leave it, and each of them gets a group of its own; clients in the list are moved in from their groups (a group that loses its last client disappears). So a change is the current members minus the removed ones plus the added ones (wantedAfter), and the last member can not be removed (an empty list would dissolve the group; the library refuses it).

Only clients of the same server are listed: a status is one server's.

Member Function Documentation

◆ wantedAfter()

static List< String > de.yaacc.snapcast.ui.SnapcastClientCandidates.wantedAfter ( SnapcastGroup group,
java.util.Collection< String > addedIds,
java.util.Collection< String > removedIds )
static

The full member list for Group.SetClients after one change that adds and removes members at once (the link sheet): the current members in their order without the removed ones, then the added ones.

An id that is no member (it left meanwhile) is not removed, one that is a member already is not added again, empty ids are skipped. A client that is both removed and added stays.

Parameters
groupthe group as the server has it now, so that a client another controller added is kept
Returns
the list, or null when it would be empty (an empty list would dissolve the group) or longer than SnapcastLimits#MAX_CLIENTS_PER_GROUP

Referenced by de.yaacc.snapcast.ui.SnapcastControls.changeMembers().

Here is the caller graph for this function:

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