YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.browser.AutoCloseRule Class Reference

The rule "may the app close itself now" of the background idle timer (BackgroundIdleTimer): nothing that serves, plays or listens may be cut off by it. More...

Collaboration diagram for de.yaacc.browser.AutoCloseRule:
Collaboration graph

Classes

class  Facts
 What is running, read when the timer fires.
 
enum  Keep
 What keeps the app open; NONE when nothing does. More...
 

Static Public Member Functions

static boolean mayCloseNow (Facts facts)
 
static Keep reasonToStay (Facts facts)
 

Detailed Description

The rule "may the app close itself now" of the background idle timer (BackgroundIdleTimer): nothing that serves, plays or listens may be cut off by it.

The UPnP services (the media server, the renderer, the media proxy), every player and, since task 11.5 of issue 319, a running Snapcast client session (the listen test, later the renderer client) and a Snapcast feed count as "something is running". Pure: the timer reads the facts when it fires and only asks this class.

This is the rule of the automatic close only. The shutdown (sleep) timer that the user sets and the exit action are the user's own decision and end the app whatever runs (as for the UPnP services); a Snapcast client session that ends that way is recorded first, see Yaacc.exit().

Member Function Documentation

◆ mayCloseNow()

static boolean de.yaacc.browser.AutoCloseRule.mayCloseNow ( Facts facts)
static
Returns
true when nothing runs and the app may close itself; false when something runs, and also for no facts (an unknown state never closes the app)
Here is the call graph for this function:

◆ reasonToStay()

static Keep de.yaacc.browser.AutoCloseRule.reasonToStay ( Facts facts)
static
Returns
the first thing that keeps the app open, Keep#NONE when nothing does; Keep#PLAYER for no facts

Referenced by de.yaacc.browser.AutoCloseRule.mayCloseNow().

Here is the caller graph for this function:

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