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

A short list of receivers that is stored as one string: the receivers the user added by hand (cap 16) or the ones that were selected in the last run (cap 16). More...

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

Classes

enum  AddResult
 The outcome of an add. More...
 

Public Member Functions

 FCastStoredReceivers (StringStore storage, int maxItems)
 
synchronized List< FCastDirectory.Known > list ()
 The stored receivers in the order they were added.
 
synchronized AddResult add (String hostText, String name)
 Adds a receiver typed in as host[:port].
 
synchronized AddResult add (FCastEndpoint endpoint, String name)
 
synchronized boolean remove (FCastEndpoint endpoint)
 
synchronized void replaceAll (List< FCastDirectory.Known > receivers)
 Replaces the whole list (the remembered selection); duplicates and what does not fit are left out.
 

Static Public Attributes

static final int MAX_MANUAL = 16
 The cap of the manual list.
 
static final int MAX_REMEMBERED = 16
 The cap of the remembered selection.
 

Detailed Description

A short list of receivers that is stored as one string: the receivers the user added by hand (cap 16) or the ones that were selected in the last run (cap 16).

One line per receiver, <canonical endpoint> and, after a tab, the name; the name has no control characters, so no line can contain another line. A damaged line is skipped on reading, the list never grows over its cap, an endpoint is in it once. No credentials are ever stored. Thread safe.

Member Function Documentation

◆ remove()

synchronized boolean de.yaacc.fcast.discovery.FCastStoredReceivers.remove ( FCastEndpoint endpoint)
Returns
true if the receiver was in the list

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