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

The keys and defaults of the FCast settings (the keys are the names of the string resources of the preference screen, task 5.1). More...

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

Classes

interface  BooleanSource
 Reads a boolean preference (the shape of SharedPreferences.getBoolean). More...
 

Static Public Member Functions

static boolean isSupportEnabled (BooleanSource source)
 
static boolean isSearchEnabled (BooleanSource source)
 
static boolean isV4Enabled (BooleanSource source)
 
static boolean isSupportKey (String key)
 True if a changed preference key is the support switch.
 
static Map< String, Boolean > migration (BooleanSource source, boolean hasManualReceivers)
 What to write once for an install of the versions with the discovery switch: FCast is on if the search was on (it was by default) or if the user had added a receiver by hand (that receiver keeps working); off only for an install that used neither.
 

Static Public Attributes

static final String KEY_SUPPORT = "settings_fcast_enabled"
 The key of the support switch in the default preferences (it was the discovery switch of the first versions).
 
static final boolean SUPPORT_DEFAULT = true
 The default of the support switch: on (FCast was always usable; decision D7).
 
static final String LEGACY_KEY_DISCOVERY = "settings_fcast_discovery"
 The key of the discovery switch of the versions before the support switch (read once by migration).
 
static final String KEY_MIGRATED = "fcast_settings_migrated"
 Set once the settings were moved to the support switch.
 
static final String KEY_MANUAL_RECEIVERS = "fcast_manual_receivers"
 The key of the list of receivers that the user added by hand.
 
static final String KEY_REMEMBERED_RECEIVERS = "fcast_remembered_receivers"
 The key of the list of the receivers that were selected in the last run (shown as offline until they are seen).
 
static final String KEY_RECEIVER_PINS = "fcast_receiver_pins"
 The key of the keys (fingerprints) that came with the links of receivers, one per receiver (task 7.2).
 
static final String KEY_V4 = "settings_fcast_v4"
 The key of the switch for the encrypted version 4 (task 7.2; the same as the name of its string resource).
 
static final boolean V4_DEFAULT = true
 The default of the version 4 switch: on.
 
static final boolean SUPPORT_UNREADABLE = false
 What a value that can not be read counts as: off (never search because of a damaged value).
 

Detailed Description

The keys and defaults of the FCast settings (the keys are the names of the string resources of the preference screen, task 5.1).

One switch, FCast support, says whether FCast is used at all: it starts the search, lists the receivers and lets the options and the list of receivers of the settings work (the structure of the Sendspin and the Snapcast settings). Pure.

Member Function Documentation

◆ isSearchEnabled()

static boolean de.yaacc.fcast.discovery.FCastSettings.isSearchEnabled ( BooleanSource source)
static
Returns
whether the app searches for receivers: while FCast is on (there is no switch of its own)
Here is the call graph for this function:

◆ isSupportEnabled()

static boolean de.yaacc.fcast.discovery.FCastSettings.isSupportEnabled ( BooleanSource source)
static
Returns
whether FCast is switched on: the stored choice, SUPPORT_DEFAULT if none; false for no source or an unreadable value

Referenced by de.yaacc.fcast.discovery.FCastHub.discoveryReport(), and de.yaacc.fcast.discovery.FCastSettings.isSearchEnabled().

Here is the caller graph for this function:

◆ isV4Enabled()

static boolean de.yaacc.fcast.discovery.FCastSettings.isV4Enabled ( BooleanSource source)
static
Returns
whether receivers whose key is known are spoken to in the encrypted version 4 (on Android 10 and later)

◆ migration()

static Map< String, Boolean > de.yaacc.fcast.discovery.FCastSettings.migration ( BooleanSource source,
boolean hasManualReceivers )
static

What to write once for an install of the versions with the discovery switch: FCast is on if the search was on (it was by default) or if the user had added a receiver by hand (that receiver keeps working); off only for an install that used neither.

Empty if the install was moved before, or if the choices can not be read.

Parameters
hasManualReceiverswhether the user has receivers typed in

Referenced by de.yaacc.fcast.discovery.FCastSettingsMigration.install().

Here is the caller graph for this function:

Member Data Documentation

◆ V4_DEFAULT

final boolean de.yaacc.fcast.discovery.FCastSettings.V4_DEFAULT = true
static

The default of the version 4 switch: on.

A value that can not be read counts as on too (never go back to the plain version because of a damaged value).

Referenced by de.yaacc.fcast.discovery.FCastSettings.isV4Enabled().


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