YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.snapcast.feed.FeedServer Interface Reference

What SnapcastFeedController needs to know about the server and its control connection: whether it is up, its peer address, the group as the model has it, and the group's volume and mute. More...

Inheritance diagram for de.yaacc.snapcast.feed.FeedServer:
Inheritance graph
Collaboration diagram for de.yaacc.snapcast.feed.FeedServer:
Collaboration graph

Public Member Functions

boolean awaitControl (long timeoutMillis)
 Waits until the control connection is up (and asks it to connect if it is not).
 
default long connectionGeneration ()
 A number that changes whenever the control connection is replaced (a reconnect), and never goes back.
 
InetAddress peerAddress ()
 The address that the control connection is connected to, or null while there is none.
 
SnapcastGroup findGroup (String groupId)
 The group as the model has it now (no network), or null if the server has no such group.
 
void setGroupVolume (SnapcastGroup current, Map< String, Integer > startLevels, int percent) throws SnapcastException
 See SnapcastOperations#setGroupVolume(SnapcastGroup, Map, int).
 
void setGroupMuted (String groupId, boolean muted) throws SnapcastException
 Group.SetMute.
 

Detailed Description

What SnapcastFeedController needs to know about the server and its control connection: whether it is up, its peer address, the group as the model has it, and the group's volume and mute.

The session of the app implements it; a test brings a fake.

Member Function Documentation

◆ awaitControl()

boolean de.yaacc.snapcast.feed.FeedServer.awaitControl ( long timeoutMillis)

Waits until the control connection is up (and asks it to connect if it is not).

Returns
true if it is up now; false after the time is over

◆ connectionGeneration()

default long de.yaacc.snapcast.feed.FeedServer.connectionGeneration ( )

A number that changes whenever the control connection is replaced (a reconnect), and never goes back.

The feed target is the peer address of the connection that was there when the stream was made: the controller reads this after the control connection came up and again right after it read peerAddress(), and aborts when it changed. A server without such a number answers 0 for ever (a fake).

◆ peerAddress()

InetAddress de.yaacc.snapcast.feed.FeedServer.peerAddress ( )

The address that the control connection is connected to, or null while there is none.

Read it right before the feed connects, after the last control call: it is the only address a feed may connect to. It is an address of the local network: never log it, never put it into a message.

◆ setGroupMuted()

void de.yaacc.snapcast.feed.FeedServer.setGroupMuted ( String groupId,
boolean muted ) throws SnapcastException

Group.SetMute.

Blocks.

Referenced by de.yaacc.snapcast.feed.SnapcastFeedController.setMuted().

Here is the caller graph for this function:

◆ setGroupVolume()

void de.yaacc.snapcast.feed.FeedServer.setGroupVolume ( SnapcastGroup current,
Map< String, Integer > startLevels,
int percent ) throws SnapcastException

See SnapcastOperations#setGroupVolume(SnapcastGroup, Map, int).

Blocks.


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