YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.share.ReceiverPickResult Class Reference

Decides what the receiver picker does with the user's answer (new layout: play, play-all and share open the device sheet in a pick mode). More...

Collaboration diagram for de.yaacc.share.ReceiverPickResult:
Collaboration graph

Classes

class  Decision
 What the caller has to do after the pick.
 

Static Public Member Functions

static Decision decide (boolean confirmed, Set< String > chosenReceiverIds)
 

Detailed Description

Decides what the receiver picker does with the user's answer (new layout: play, play-all and share open the device sheet in a pick mode).

Plain Java so it can be unit tested on the JVM.

Rules:

  • confirm with at least one receiver: start the playback on exactly those receivers, then clear the receiver selection (the selection is per action, not sticky);
  • confirm with no receiver: do not start and do not clear; the picker stays open so the user can choose (see Decision#keepPickerOpen());
  • cancel: nothing starts, nothing is cleared, the receivers stay as they were. The decision never carries the ids the user had ticked, so a caller cannot apply them by accident.

A null set counts as empty; null or empty ids inside the set are ignored. The returned set is an unmodifiable copy.

Member Function Documentation

◆ decide()

static Decision de.yaacc.share.ReceiverPickResult.decide ( boolean confirmed,
Set< String > chosenReceiverIds )
static
Parameters
confirmedtrue if the user confirmed the pick, false if they cancelled it
chosenReceiverIdsthe receivers ticked in the picker, may be null
Returns
what to do next, never null

Referenced by de.yaacc.share.PickSheetResult.confirm(), and de.yaacc.share.PendingPick.resolve().

Here is the caller graph for this function:

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