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

Every client id that is THIS phone's on a server (task 12.19): the current id, one for all servers (SnapcastClientIdentity), and the legacy ids of this install, the per-server ids that earlier builds gave each server and that are still on the servers as offline entries (SnapcastLegacyClientIds). More...

Collaboration diagram for de.yaacc.snapcast.client.SnapcastOwnIds:
Collaboration graph

Public Member Functions

String current ()
 
Set< String > legacy ()
 
boolean isCurrent (String id)
 
boolean isLegacy (String id)
 
boolean isOwn (String id)
 The current id or a legacy id: an entry of this phone.
 
String canonical (String id)
 One phone, one client: a legacy id is the current id, any other id stays what it is.
 
String toString ()
 Never an id.
 

Static Public Member Functions

static SnapcastOwnIds none ()
 Nothing is the phone's.
 
static SnapcastOwnIds of (String current, Collection< String > legacy)
 

Detailed Description

Every client id that is THIS phone's on a server (task 12.19): the current id, one for all servers (SnapcastClientIdentity), and the legacy ids of this install, the per-server ids that earlier builds gave each server and that are still on the servers as offline entries (SnapcastLegacyClientIds).

The legacy ids are computed from the install secret, so they are only ever the ones of THIS install; the entries of another YAACC install are not recognised. Immutable; it never prints an id.

Without a current id (this install has no secret, so it never started a client) there is no legacy id either: nothing is own.

Member Function Documentation

◆ current()

String de.yaacc.snapcast.client.SnapcastOwnIds.current ( )
Returns
the current id, null for none

◆ legacy()

Set< String > de.yaacc.snapcast.client.SnapcastOwnIds.legacy ( )
Returns
the legacy ids, never containing the current one

◆ of()

static SnapcastOwnIds de.yaacc.snapcast.client.SnapcastOwnIds.of ( String current,
Collection< String > legacy )
static
Parameters
currentthe id the phone gives every server; null or empty for none (then the legacy ids are dropped too)
legacythe per-server ids of earlier builds; null, empty and the current id entries are left out

Referenced by de.yaacc.snapcast.ui.SnapcastMemberRows.of(), and de.yaacc.snapcast.client.SnapcastClientIdentities.ownIds().

Here is the caller graph for this function:

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