|
YAACC - UPNP Client and Server
|
application which holds the global state More...


Public Member Functions | |
| void | onCreate () |
| void | userStarted () |
The user starts the app (any screen created fresh, see UserStartCallbacks): whatever starts after this is a normal start, and what was held back after an exit is started now. | |
| boolean | dropRestoredScreen () |
| A browser activity that the system recreates from its saved state right after an explicit exit is left over from before the exit: it finishes instead of bringing the app back. | |
| ShareRegistry | getShareRegistry () |
| The shares the media proxy serves (links and held files), process wide. | |
| UnclaimedShares | getUnclaimedShares () |
| The shares that no player has claimed yet. | |
| LaunchNonces | getLaunchNonces () |
| The single-use tokens that the launcher puts into a forwarded file share. | |
| PendingShare | getPendingShare () |
| The one pending shared file (waiting for the receiver pick). | |
| Executor | getContentLoadExecutor () |
| UpnpClient | getUpnpClient () |
| boolean | isUnplugged () |
| void | exit () |
| Ends the app: the exit button and the notification action, the shutdown (sleep) timer and the idle timer. | |
| void | createNotificationChannel () |
| void | createYaaccGroupNotification () |
| void | cancelYaaccGroupNotification () |
| void | startShutdownTimer (long duration) |
| Starts the shutdown timer. | |
| void | stopShutdownTimer () |
| boolean | isShutdownTimerRunning () |
| long | getShutdownTimerRemainingMillis () |
| void | addShutdownTimerListener (ShutdownTimerListener listener) |
| Adds a listener that is called on the main thread on every tick. | |
| void | removeShutdownTimerListener (ShutdownTimerListener listener) |
Static Public Member Functions | |
| static long | shareClockMillis () |
The clock of the share registry (monotonic milliseconds), for the code that must agree with it; see ShareRegistry#createDefault(). | |
Static Public Attributes | |
| static final String | NOTIFICATION_CHANNEL_ID = "YaaccNotifications" |
| static final String | NOTIFICATION_GROUP_KEY = "Yaacc" |
application which holds the global state
| void de.yaacc.Yaacc.addShutdownTimerListener | ( | ShutdownTimerListener | listener | ) |
Adds a listener that is called on the main thread on every tick.
The application keeps it until removeShutdownTimerListener(ShutdownTimerListener), so remove it when the UI that owns it stops. Adding the same listener twice has no effect.
Referenced by de.yaacc.browser.ShutdownTimerController.attach().

| void de.yaacc.Yaacc.exit | ( | ) |
Ends the app: the exit button and the notification action, the shutdown (sleep) timer and the idle timer.
The order is the point (tasks 12.2 and 12.9): mark the exit (persisted, so that a restart the system does afterwards is recognised), close the shares, end the players (media session, player notification, the Snapcast feed gives the group its stream back), stop the services and let go of the bindings, cancel the notifications, finish the tasks, then wait (bounded, without blocking the main thread, which the releases need) for the services and the feeds to end, cancel the notifications once more and end the process. A step that fails does not keep the others from running (ExitSequence).
The main thread never waits for a player (review W2 of Group 12A): ending a remote player sleeps and polls on the thread that does it, so every player is ended on a thread of its own (ExitHandoff) and the rest of the exit continues on the main thread when they ended or after EXIT_PLAYERS_MAX_WAIT_MILLIS.

| LaunchNonces de.yaacc.Yaacc.getLaunchNonces | ( | ) |
The single-use tokens that the launcher puts into a forwarded file share.
Never null.
| PendingShare de.yaacc.Yaacc.getPendingShare | ( | ) |
The one pending shared file (waiting for the receiver pick).
Never null.
| ShareRegistry de.yaacc.Yaacc.getShareRegistry | ( | ) |
The shares the media proxy serves (links and held files), process wide.
Never null.
| long de.yaacc.Yaacc.getShutdownTimerRemainingMillis | ( | ) |
| UnclaimedShares de.yaacc.Yaacc.getUnclaimedShares | ( | ) |
The shares that no player has claimed yet.
Never null.
| boolean de.yaacc.Yaacc.isShutdownTimerRunning | ( | ) |
Referenced by de.yaacc.browser.ShutdownTimerController.setConfiguredMillis().

| void de.yaacc.Yaacc.startShutdownTimer | ( | long | duration | ) |
Starts the shutdown timer.
The timer and its listener calls run on the main thread; a call from another thread is posted there.
Referenced by de.yaacc.browser.ShutdownTimerController.setConfiguredMillis(), and de.yaacc.browser.ShutdownTimerController.start().

| void de.yaacc.Yaacc.userStarted | ( | ) |
The user starts the app (any screen created fresh, see UserStartCallbacks): whatever starts after this is a normal start, and what was held back after an exit is started now.
Main thread.
