YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.fcast.discovery.FCastHub Class Reference

The app-wide FCast part, the counterpart of the Snapcast hub: the directory of receivers, the receivers added by hand, the remembered selection, the service discovery and the gate that runs it only while a receivers page is visible and the switch is on. More...

Inheritance diagram for de.yaacc.fcast.discovery.FCastHub:
Inheritance graph
Collaboration diagram for de.yaacc.fcast.discovery.FCastHub:
Collaboration graph

Public Member Functions

void pageStarted ()
 A receivers page became visible: the scan starts if the switch is on.
 
void pageStopped ()
 A receivers page was hidden: the scan stops when no page needs it.
 
DiscoveryGate.Lease diagnosticsOpened ()
 For a window that wants the scan while it is open (the receivers list of the settings): give the lease back with close().
 
void addChangeListener (FCastDirectory.Listener listener)
 
void removeChangeListener (FCastDirectory.Listener listener)
 
List< FCastDirectory.Known > manualReceivers ()
 The receivers typed in, pasted or scanned (tasks 5.4 to 5.7).
 
FCastStoredReceivers.AddResult addManual (FCastEndpoint endpoint, String name)
 Adds a receiver by hand; the list of receivers is updated at once.
 
FCastStoredReceivers.AddResult addManual (FCastEndpoint endpoint, String name, de.yaacc.fcast.protocol.FCastPin pin)
 Adds a receiver from a link and keeps the key the link carried (task 7.2).
 
de.yaacc.fcast.protocol.FCastPin pinFor (FCastEndpoint endpoint)
 The key a connection to this receiver is pinned to, or null if it is not known to offer the secure protocol (it is then spoken to in v3).
 
boolean removeManual (FCastEndpoint endpoint)
 Removes a receiver that was added by hand.
 
String discoveryReport ()
 The report of the discovery for the user to copy: what was browsed, what the system said, the receivers known.
 
List< FCastDirectory.Entry > entries ()
 The receivers as the directory knows them (found, typed in, remembered), for the list of the settings.
 
synchronized FCastReceiverLinks links ()
 The sessions that the screens open on demand (the volume of an idle card, the settings sheet); one per receiver, closed a short time after the last use, and closed at once when a player takes the receiver.
 
FCastAddReceiver newAddReceiver ()
 The input "Add receiver" with the network of the app behind it (task 5.4).
 
FCastReceiverAdmin.Result removeReceiver (FCastEndpoint endpoint)
 Removes a receiver that was added by hand, and takes it out of the stored selection (task 5.4).
 
List< FCastReceiverDevice > receivers ()
 The receivers as of now: discovered, typed in and remembered ones, sorted by name.
 
FCastReceiverDevice findReceiver (String receiverId)
 
void selectionChanged (Collection< String > receiverIds)
 The stored selection changed (the ids of all selected receivers, of any kind): remember the selected FCast receivers across a restart, forget the others.
 
- Public Member Functions inherited from de.yaacc.fcast.discovery.FCastReceiverSource

Static Public Member Functions

static synchronized FCastHub getShared (Context context)
 The one hub of the process.
 

Additional Inherited Members

- Public Attributes inherited from de.yaacc.fcast.discovery.FCastReceiverSource
FCastReceiverSource NONE
 No receivers; the default of a client that has no hub.
 

Detailed Description

The app-wide FCast part, the counterpart of the Snapcast hub: the directory of receivers, the receivers added by hand, the remembered selection, the service discovery and the gate that runs it only while a receivers page is visible and the switch is on.

It does nothing until a page tells it to (pageStarted()): no thread, no socket, no multicast lock.

The page hooks are connected in task 5.2; until then nothing is browsed and, with nothing added by hand, no FCast receiver is in any list.

Member Function Documentation

◆ findReceiver()

FCastReceiverDevice de.yaacc.fcast.discovery.FCastHub.findReceiver ( String receiverId)
Returns
the receiver with this id (fcast:...), or null if it is not known (any more)

Implements de.yaacc.fcast.discovery.FCastReceiverSource.

◆ newAddReceiver()

FCastAddReceiver de.yaacc.fcast.discovery.FCastHub.newAddReceiver ( )

The input "Add receiver" with the network of the app behind it (task 5.4).

Its calls block: run them on a worker.

Here is the call graph for this function:

◆ receivers()

List< FCastReceiverDevice > de.yaacc.fcast.discovery.FCastHub.receivers ( )

The receivers as of now: discovered, typed in and remembered ones, sorted by name.

Cheap: no network.

Implements de.yaacc.fcast.discovery.FCastReceiverSource.

◆ removeManual()

boolean de.yaacc.fcast.discovery.FCastHub.removeManual ( FCastEndpoint endpoint)

Removes a receiver that was added by hand.

Returns
true if it was in the list

◆ removeReceiver()

FCastReceiverAdmin.Result de.yaacc.fcast.discovery.FCastHub.removeReceiver ( FCastEndpoint endpoint)

Removes a receiver that was added by hand, and takes it out of the stored selection (task 5.4).

Blocking: run it on a worker.

◆ selectionChanged()

void de.yaacc.fcast.discovery.FCastHub.selectionChanged ( Collection< String > receiverIds)

The stored selection changed (the ids of all selected receivers, of any kind): remember the selected FCast receivers across a restart, forget the others.

Does not block on the network.

Implements de.yaacc.fcast.discovery.FCastReceiverSource.


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