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

Which key a receiver is pinned to (task 7.2, decision D24), and how a link's key is stored. More...

Collaboration diagram for de.yaacc.fcast.discovery.FCastPins:
Collaboration graph

Classes

interface  Directory
 The directory lookup the discovery key needs. More...
 

Public Member Functions

 FCastPins (FCastPinStore store, Directory directory)
 
 FCastPins (FCastPinStore store, Directory directory, java.util.function.BooleanSupplier enabled)
 
FCastPin pinFor (FCastEndpoint endpoint)
 
FCastStoredReceivers.AddResult remember (FCastEndpoint endpoint, FCastPin pin, FCastStoredReceivers.AddResult listed)
 The result of adding a receiver together with the key of its link.
 
void forget (FCastEndpoint endpoint)
 Forgets the key of a receiver that was removed.
 

Detailed Description

Which key a receiver is pinned to (task 7.2, decision D24), and how a link's key is stored.

Pure; the network and the storage are behind the constructor arguments.

The order of trust: (1) the key from an fcast://r/ link that the user added (FCastPin.Source#LINK); (2) the key in the mDNS record of a receiver that is found now and announces version 4 or more (FCastPin.Source#DISCOVERY); (3) none, and then the receiver is spoken to in v3. A stored key wins over an announced one: if they differ the receiver made a new key (or somebody else announces at its address), the connection is refused and the user decides (remove and add the receiver again).

Constructor & Destructor Documentation

◆ FCastPins()

de.yaacc.fcast.discovery.FCastPins.FCastPins ( FCastPinStore store,
Directory directory,
java.util.function.BooleanSupplier enabled )
Parameters
enabledthe switch "use the encrypted version 4": off, no receiver has a key to connect with (everything is spoken in v3)

Member Function Documentation

◆ pinFor()

FCastPin de.yaacc.fcast.discovery.FCastPins.pinFor ( FCastEndpoint endpoint)
Returns
the key to pin the connection to, or null if the receiver is not known to offer v4
Here is the call graph for this function:

◆ remember()

FCastStoredReceivers.AddResult de.yaacc.fcast.discovery.FCastPins.remember ( FCastEndpoint endpoint,
FCastPin pin,
FCastStoredReceivers.AddResult listed )

The result of adding a receiver together with the key of its link.

The key is stored when the receiver is in the list (new or already there: a receiver that was typed in by its address gets its key when the user scans its code); a key that replaces or adds one makes an already listed receiver count as added.

Parameters
pinmay be null (no key in the link: nothing is stored)

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