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

One speaker of a Snapcast server (a snapclient). More...

Collaboration diagram for de.yaacc.snapcast.control.SnapcastClient:
Collaboration graph

Public Member Functions

 SnapcastClient (String id, String name, String hostName, boolean connected, SnapcastVolume volume, int latencyMs)
 
 SnapcastClient (String id, String name, String hostName, boolean connected, SnapcastVolume volume, int latencyMs, long lastSeenMicros)
 
String getId ()
 
String getName ()
 The name set for the client; empty when none was set.
 
String getHostName ()
 The host name the client reported; empty when unknown.
 
String getDisplayName ()
 The name to show: the set name, else the host name, else the id.
 
boolean isConnected ()
 
SnapcastVolume getVolume ()
 
int getLatencyMs ()
 The latency setting in milliseconds, 0 to 10,000.
 
SnapcastClient withName (String newName)
 
SnapcastClient withConnected (boolean newConnected)
 
SnapcastClient withVolume (SnapcastVolume newVolume)
 
SnapcastClient withLatencyMs (int newLatencyMs)
 
long getLastSeenMicros ()
 When the server last saw the client (lastSeen of the status: seconds and microseconds), as microseconds since 1970; 0 when the status does not say (a missing or unreadable value).
 
boolean equals (Object other)
 
int hashCode ()
 
String toString ()
 No host or name: the text of a server does not go to logs.
 

Detailed Description

One speaker of a Snapcast server (a snapclient).

The id is the server's (the MAC address of the machine, with #instance appended for a second client on it); name and host name are display text of the server and are never used as an identity. Immutable.

Constructor & Destructor Documentation

◆ SnapcastClient()

de.yaacc.snapcast.control.SnapcastClient.SnapcastClient ( String id,
String name,
String hostName,
boolean connected,
SnapcastVolume volume,
int latencyMs,
long lastSeenMicros )
Parameters
lastSeenMicroswhen the server last saw the client, in microseconds since 1970 (0 when it does not say)

Member Function Documentation

◆ getLastSeenMicros()

long de.yaacc.snapcast.control.SnapcastClient.getLastSeenMicros ( )

When the server last saw the client (lastSeen of the status: seconds and microseconds), as microseconds since 1970; 0 when the status does not say (a missing or unreadable value).

Only used to decide which server shows a client that is connected nowhere (task 12.12).


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