|
YAACC - UPNP Client and Server
|
Navigation that fragments and helpers may ask of the activity that hosts them. More...


Public Member Functions | |
| void | showServers () |
| Shows the list of servers. | |
| void | showContent () |
| Shows the content of the currently selected server. | |
| void | showReceivers () |
| Shows the receivers. | |
| void | showPlayers () |
| Shows the running players. | |
| default boolean | providesShutdownTimer () |
| Whether the host shows the shutdown timer itself (in its toolbar), so the server list leaves its own timer rows out and uses the top-level layout. | |
| default boolean | providesReceiverBar () |
| Whether the host shows the receiver bar itself, at every level (new layout). | |
| default boolean | showsBackAtContentRoot () |
Whether the content list shows the back arrow at the content root too, and its tap calls showServers() there (new layout: the root of a server is one step below the server list). | |
| default boolean | pickReceivers (PickedAction action, String shareName, Collection< String > initialIds) |
Opens the receiver picker ("Play on...", the device sheet in pick mode) and reports the answer through action: exactly one of PickedAction#onConfirmed (with the chosen receiver ids and a done callback to end the single flight) or PickedAction#onCancelled runs, on the main thread, and only if this returns true. | |
| default boolean | isPickOpen (String pickId) |
| Whether the receiver picker with this id is open (a restored sheet asks, then closes itself if not). | |
| default void | onPendingShare (String token, String displayName) |
A shared file is waiting for the user to pick the receivers (see ShareIntentHandler). | |
Navigation that fragments and helpers may ask of the activity that hosts them.
Implemented by the browser activities; callers must tolerate "no host" (the context or activity is not a BrowserHost) and may call from any thread, so implementations hop to the main thread themselves.
| default boolean de.yaacc.browser.BrowserHost.isPickOpen | ( | String | pickId | ) |
Whether the receiver picker with this id is open (a restored sheet asks, then closes itself if not).
Implemented in de.yaacc.browser.BrowserActivity, and de.yaacc.browser.TabBrowserActivity.
| default void de.yaacc.browser.BrowserHost.onPendingShare | ( | String | token, |
| String | displayName ) |
A shared file is waiting for the user to pick the receivers (see ShareIntentHandler).
Called on the main thread. The host shows its receiver picker with displayName (already cleaned, safe for setText) and later calls ShareIntentHandler#confirm or ShareIntentHandler#cancel with the token. The default does nothing: the pending share then waits for its timeout (two minutes) and is dropped.
| token | binds the pending share to its pick; a result with another token changes nothing |
| displayName | the cleaned name of the file |
Implemented in de.yaacc.browser.BrowserActivity, and de.yaacc.browser.TabBrowserActivity.
| default boolean de.yaacc.browser.BrowserHost.pickReceivers | ( | PickedAction | action, |
| String | shareName, | ||
| Collection< String > | initialIds ) |
Opens the receiver picker ("Play on...", the device sheet in pick mode) and reports the answer through action: exactly one of PickedAction#onConfirmed (with the chosen receiver ids and a done callback to end the single flight) or PickedAction#onCancelled runs, on the main thread, and only if this returns true.
Only one picked action may be between its confirm and its done: a confirm while another is still starting is refused with onCancelled. Call it on the main thread.
The new layout uses it for play, play-all, add-to-playlist and a pending share; classic uses it only for a pending shared file (normal classic browsing never shows the sheet). Nothing is stored by the picker: the host's callbacks decide what a confirm sets and clears.
| action | what to do with the answer |
| shareName | the cleaned name of the pending share, or null if the pick is not for a share (an empty name is replaced by a fixed text on the sheet) |
| initialIds | receivers that start ticked, may be null (classic: its tab-based selection) |
Implemented in de.yaacc.browser.BrowserActivity, and de.yaacc.browser.TabBrowserActivity.
Referenced by de.yaacc.browser.ContentListFragment.startPlayAction().

| default boolean de.yaacc.browser.BrowserHost.providesReceiverBar | ( | ) |
Whether the host shows the receiver bar itself, at every level (new layout).
A content list then hides its own footer and opens the device sheet through showReceivers(). False for the classic tabs, where the content list shows the original static footer (current provider, selected receivers) and there is no sheet.
Implemented in de.yaacc.browser.BrowserActivity.
Referenced by de.yaacc.browser.ShareIntentHandler.handle(), and de.yaacc.browser.ContentListFragment.startPlayAction().

| default boolean de.yaacc.browser.BrowserHost.providesShutdownTimer | ( | ) |
Whether the host shows the shutdown timer itself (in its toolbar), so the server list leaves its own timer rows out and uses the top-level layout.
False for the classic tabs.
Implemented in de.yaacc.browser.BrowserActivity.
| void de.yaacc.browser.BrowserHost.showContent | ( | ) |
Shows the content of the currently selected server.
Implemented in de.yaacc.browser.BrowserActivity, and de.yaacc.browser.TabBrowserActivity.
| void de.yaacc.browser.BrowserHost.showPlayers | ( | ) |
Shows the running players.
Implemented in de.yaacc.browser.BrowserActivity, and de.yaacc.browser.TabBrowserActivity.
| void de.yaacc.browser.BrowserHost.showReceivers | ( | ) |
Shows the receivers.
Implemented in de.yaacc.browser.BrowserActivity, and de.yaacc.browser.TabBrowserActivity.
| default boolean de.yaacc.browser.BrowserHost.showsBackAtContentRoot | ( | ) |
Whether the content list shows the back arrow at the content root too, and its tap calls showServers() there (new layout: the root of a server is one step below the server list).
False for the classic tabs, where the root has nothing to go back to.
Implemented in de.yaacc.browser.BrowserActivity.
| void de.yaacc.browser.BrowserHost.showServers | ( | ) |
Shows the list of servers.
Implemented in de.yaacc.browser.BrowserActivity, and de.yaacc.browser.TabBrowserActivity.