|
YAACC - UPNP Client and Server
|
A client facade to the upnp lookup and access framework. More...


Classes | |
| class | LocalDummyDevice |
Public Member Functions | |
| UpnpClient (Context context) | |
| boolean | initialize (Context context) |
| Initialize the Object. | |
| boolean | attach (Context context) |
The first half of initialize: takes the context and registers what needs no service. | |
| boolean | bindServerService () |
The second half of initialize: binds (and so creates) the server service. | |
| boolean | startService () |
| void | onServiceConnected (ComponentName className, IBinder service) |
| YaaccUpnpServerService | getYaaccUpnpServerService () |
| void | onServiceDisconnected (ComponentName componentName) |
| void | remoteDeviceDiscoveryStarted (Registry registry, RemoteDevice remotedevice) |
| void | remoteDeviceDiscoveryFailed (Registry registry, RemoteDevice remotedevice, Exception exception) |
| void | remoteDeviceAdded (Registry registry, RemoteDevice remotedevice) |
| void | remoteDeviceUpdated (Registry registry, RemoteDevice remotedevice) |
| void | remoteDeviceRemoved (Registry registry, RemoteDevice remotedevice) |
| void | localDeviceAdded (Registry registry, LocalDevice localdevice) |
| void | localDeviceRemoved (Registry registry, LocalDevice localdevice) |
| void | beforeShutdown (Registry registry) |
| void | afterShutdown () |
| Service<?, ?> | getAVTransportService (Device<?, ?, ?> device) |
| Returns a Service of type AVTransport. | |
| Service<?, ?> | getRenderingControlService (Device<?, ?, ?> device) |
| Returns a Service of type RenderingControl. | |
| void | addUpnpClientListener (UpnpClientListener listener) |
| Add an listener. | |
| void | removeUpnpClientListener (UpnpClientListener listener) |
Removes a listener added with addUpnpClientListener(UpnpClientListener), so a destroyed screen is no longer called. | |
| Collection< Device<?, ?, ?> > | getDevices () |
| Returns all registered UpnpDevices. | |
| Collection< Device<?, ?, ?> > | getDevicesProvidingContentDirectoryService () |
| Returns all registered UpnpDevices with a ContentDirectory Service. | |
| Collection< Device<?, ?, ?> > | getDevicesProvidingAvTransportService () |
| Returns all registered UpnpDevices with an AVTransport Service, and those that offer an OpenHome playlist without one. | |
| Device<?, ?, ?> | getDevice (String identifier) |
| Returns a registered UpnpDevice. | |
| boolean | isInitialized () |
| True if the client is initialized. | |
| Registry | getRegistry () |
| Returns the upnp registry. | |
| Context | getContext () |
| ContentDirectoryBrowseResult | browseSync (Position pos) |
| Browse ContenDirctory synchronous. | |
| ContentDirectoryBrowseResult | browseSync (Position pos, Long firstResult, Long maxResult, SortCriterion... orderBy) |
| ContentDirectoryBrowseResult | browseSync (Device<?, ?, ?> device, String objectID, BrowseFlag flag, String filter, long firstResult, Long maxResults, SortCriterion... orderBy) |
| Browse ContenDirctory synchronous. | |
| boolean | supportsSearch (Device<?, ?, ?> device) |
| Whether the server can search at all: it has the search action and lists at least one property that a free text is looked for in. | |
| ContentDirectoryBrowseResult | searchSync (Device<?, ?, ?> device, String freeText, long firstResult, Long maxResults) |
Searches the whole server from its root for the free text (issue #336): every word in at least one of the properties the server can search, see SearchCriteria. | |
| HttpRequestSender | getHttpRequestSender () |
| void | addNetworkRecoveryListener (NetworkRecoveryListener listener) |
Registers for "the network is back" (see NetworkRecoveryListener). | |
| void | removeNetworkRecoveryListener (NetworkRecoveryListener listener) |
| NetworkRecoveryListener | getNetworkRecoveryRelay () |
| void | searchDevices () |
| Search asynchronously for all devices. | |
| void | refreshAfterResume () |
| A browser screen came back to the foreground, maybe after the device or the app was suspended (screen off, Doze, a long time in the background): checks the network listener and searches the devices again if the last search is not recent. | |
| Player | attachOpenHomePlayer (Device<?, ?, ?> device) |
| Returns all player instances initialized with the given didl object. | |
| List< Player > | initializePlayers (DIDLObject didlObject) |
| List< Player > | initializePlayers (List< Item > items) |
| Returns all player instances initialized with the given didl object. | |
| List< Player > | initializePlayers (AvTransport transport) |
| Returns all player instances initialized with the given transport object. | |
| Player | initializeLocalPlayer (List< PlayableItem > items) |
| Creates a player on this device for the items (the OpenHome renderer's queue); not started. | |
| Collection< Player > | getCurrentPlayers () |
| Returns all current player instances. | |
| void | addPlayerListChangeListener (PlayerListChangeNotifier.Listener listener) |
Registers a listener for players being added to or removed from the player service; see PlayerService#addPlayerListChangeListener. | |
| void | removePlayerListChangeListener (PlayerListChangeNotifier.Listener listener) |
| long | getPlayerCreationSequence (Player player) |
| Creation sequence of an active player (higher = added later), or 0 if the player isn't active or the player service isn't bound. | |
| List< Player > | getCurrentPlayers (AvTransport transport) |
| Returns all current player instances for the given transport object. | |
| List< Item > | toItemList (DIDLContent didlContent) |
| returns a list of all items including items in containers for the given didlContent | |
| List< Item > | toItemList (DIDLObject didlObject) |
| Converts the content of a didlObject into a list of cling items. | |
| int | getResultSetSize () |
| The setting "result set size": the most items that are loaded from a server to play a folder or the result of a search. | |
| ChildPager.Result | loadAllChildren (Position position, long start, SortCriterion... orderBy) |
All children of a folder from start on, page after page, in the order the server gives them for orderBy (the screen loads a folder in batches of 50; what plays must be the whole folder). | |
| Set< String > | getReceiverDeviceIds () |
| Gets the receiver IDs, if none is defined the local device will be returned. | |
| void | setReceiverDeviceIds (Set< String > receiverDeviceIds) |
| Set the list of receiver device ids. | |
| Collection< Device<?, ?, ?> > | getReceiverDevices () |
| Returns the receiverIds stored in the preferences. | |
| Collection< Device<?, ?, ?> > | awaitReceiverDevices () |
Like getReceiverDevices(), but first gives a selected receiver that is not in the registry right now a few seconds to come back (ReceiverAvailabilityPolicy: three looks, 2.5 s apart, a search before each wait). | |
| void | clearReceiverDevices () |
| Clears the receiver selection: the stored set becomes empty (and stays empty, it is not replaced by the local device) and a "receiver removed" event is fired for every receiver that was selected, so views that follow the selection refresh. | |
| int | getReceiverDevicesReadyCount () |
| void | setReceiverDevices (Collection< Device<?, ?, ?> > receiverDevices) |
| set the receiverDevices to the devices in the given collection. | |
| void | addReceiverDevice (Device<?, ?, ?> receiverDevice) |
| add a receiver device | |
| void | removeReceiverDevice (Device<?, ?, ?> receiverDevice) |
| remove a receiver device | |
| String | getProviderDeviceId () |
| Device<?, ?, ?> | getProviderDevice () |
| void | setProviderDevice (Device<?, ?, ?> provider) |
| void | shutdown () |
| Shutdown the upnp client and all players. | |
| void | unbindServices () |
| Lets go of the bindings to the server service and the player service. | |
| int | getDefaultDuration () |
| Return the configured default duration. | |
| int | getSilenceDuration () |
| Return the configured silence duration. | |
| boolean | isMute () |
| returns the mute state | |
| void | setMute (boolean mute) |
| set the mute state | |
| int | getVolume () |
| returns the current volume level | |
| void | setVolume (int desired) |
| set the volume in the range of 0-100 | |
| void | downloadItem (DIDLObject selectedDIDLObject) |
| List< Player > | initializePlayersWithPlayableItems (List< PlayableItem > items) |
| List< Player > | initializeQueuePlayers (de.yaacc.share.PickedQueue.Result queue) |
Creates the players of a picked queue on the stored receiver selection (one player per receiver and media type, see PlayerService#createQueuePlayers); worker thread. | |
| boolean | getMute (Device<?, ?, ?> device) |
| boolean | hasActionGetMute (Device<?, ?, ?> device) |
| void | setMute (Device<?, ?, ?> device, boolean mute) |
| int | getVolume (Device<?, ?, ?> device) |
| boolean | hasActionGetVolume (Device<?, ?, ?> device) |
| void | setVolume (Device<?, ?, ?> device, int volume) |
| boolean | hasActionSetVolume (Service<?, ?> service) |
| Optional< Player > | getPlayer (int id) |
| void | addToPlaylist (DIDLObject item) |
Adds the item to the chosen receivers: the playlist of a receiver that already has a player gets it, a receiver without a player gets a new one (see PlaylistTargets). | |
| PlayableItem | createPlayableItem (Uri uri) throws IOException |
| Makes the item for a shared http(s) link (shared text). | |
| PlayableItem | createPlayableItem (Uri uri, Set< String > receiverIds) throws IOException |
Same as createPlayableItem(Uri), with the receivers the share is made for given explicitly: the addresses a proxied link is served to are built from exactly these ids, never from the stored selection, which another action may have replaced or cleared during the network work. | |
| ProxyAvailability.Decision | linkProxyDecision () |
How a shared link is handed to the receivers, from the preferences: the media proxy checkbox AND the master switch "UPnP Server" (see ProxyAvailability). | |
| PlayableItem | createLiveStreamShare (boolean audio, Set< String > receiverIds) |
| Makes the live stream of this phone (device audio or screen) available to the chosen receivers as a share: the capture is started for it, a short-lived address under the media proxy path is registered and the item that plays it is returned. | |
| void | discardShareOf (PlayableItem item) |
| Gives up the share an item was made for (no player took it): removes its registry key, which closes the source of a file. | |
| boolean | isHttpServerRunning () |
| Whether the local HTTP server accepts connections (it runs whenever the app process lives, whatever the "local server" setting says). | |
| boolean | isPlayerServiceInitialized () |
Public Member Functions inherited from de.yaacc.upnp.registry.RegistryListener | |
Static Public Member Functions | |
| static boolean | isSearchUnsupported (ContentDirectoryBrowseResult result) |
A client facade to the upnp lookup and access framework.
This class provides all services to manage devices.
| void de.yaacc.upnp.UpnpClient.addNetworkRecoveryListener | ( | NetworkRecoveryListener | listener | ) |
Registers for "the network is back" (see NetworkRecoveryListener).
Held weakly: the caller keeps the listener and calls removeNetworkRecoveryListener when it stops.
| void de.yaacc.upnp.UpnpClient.addPlayerListChangeListener | ( | PlayerListChangeNotifier.Listener | listener | ) |
Registers a listener for players being added to or removed from the player service; see PlayerService#addPlayerListChangeListener.
Works before the service is bound: the listener is attached once it is. Callers must call removePlayerListChangeListener when done.
Referenced by de.yaacc.upnp.UpnpClient.attach().


| void de.yaacc.upnp.UpnpClient.addReceiverDevice | ( | Device<?, ?, ?> | receiverDevice | ) |
add a receiver device
| receiverDevice | receiverDevice |

| void de.yaacc.upnp.UpnpClient.addUpnpClientListener | ( | UpnpClientListener | listener | ) |
Add an listener.
| listener | the listener to be added |
| void de.yaacc.upnp.UpnpClient.afterShutdown | ( | ) |
Implements de.yaacc.upnp.registry.RegistryListener.
| boolean de.yaacc.upnp.UpnpClient.attach | ( | Context | context | ) |
The first half of initialize: takes the context and registers what needs no service.
The application does only this when its process was created right after an explicit exit (task 12.2); bindServerService() follows when the user starts the app.
Referenced by de.yaacc.upnp.UpnpClient.initialize().


Returns all player instances initialized with the given didl object.
| didlObject | the object which describes the content to be played |

| Collection< Device<?, ?, ?> > de.yaacc.upnp.UpnpClient.awaitReceiverDevices | ( | ) |
Like getReceiverDevices(), but first gives a selected receiver that is not in the registry right now a few seconds to come back (ReceiverAvailabilityPolicy: three looks, 2.5 s apart, a search before each wait).
After a suspend the registry may have dropped the renderer; getReceiverDevices() would remove it from the stored selection for good. What is still missing after the last look is dropped as before. A pending Snapcast group (its server has not answered yet) is neither waited for nor dropped; its connection is woken once.
Waits, so worker threads only; on the main thread it does not wait.
Referenced by de.yaacc.upnp.UpnpClient.addToPlaylist(), de.yaacc.player.PlayerService.createPlayer(), and de.yaacc.upnp.UpnpClient.initializeQueuePlayers().


| void de.yaacc.upnp.UpnpClient.beforeShutdown | ( | Registry | registry | ) |
Implements de.yaacc.upnp.registry.RegistryListener.
| ContentDirectoryBrowseResult de.yaacc.upnp.UpnpClient.browseSync | ( | Device<?, ?, ?> | device, |
| String | objectID, | ||
| BrowseFlag | flag, | ||
| String | filter, | ||
| long | firstResult, | ||
| Long | maxResults, | ||
| SortCriterion... | orderBy ) |
Browse ContenDirctory synchronous.
| device | the device to be browsed |
| objectID | the browsing root |
| flag | kind of browsing |
BrowseFlag | filter | a filter |
| firstResult | first result |
| maxResults | max result count |
| orderBy | sorting criteria |
SortCriterion 
| ContentDirectoryBrowseResult de.yaacc.upnp.UpnpClient.browseSync | ( | Position | pos | ) |
Browse ContenDirctory synchronous.
| pos | Position the device and object to be browsed |
| void de.yaacc.upnp.UpnpClient.clearReceiverDevices | ( | ) |
Clears the receiver selection: the stored set becomes empty (and stays empty, it is not replaced by the local device) and a "receiver removed" event is fired for every receiver that was selected, so views that follow the selection refresh.
Does nothing to running players or to the allowed set of an existing share (that was fixed when the share was registered).

| PlayableItem de.yaacc.upnp.UpnpClient.createLiveStreamShare | ( | boolean | audio, |
| Set< String > | receiverIds ) |
Makes the live stream of this phone (device audio or screen) available to the chosen receivers as a share: the capture is started for it, a short-lived address under the media proxy path is registered and the item that plays it is returned.
It needs neither the UPnP Server switch nor the media provider (like a shared file); the capture stops when the share ends, unless the stream setting of the server card keeps it. Null if no share could be made (no network address, the local server is not ready, the registry is full, the capture did not start: the permission of the system is missing). Worker thread only; nothing here logs the key.

| PlayableItem de.yaacc.upnp.UpnpClient.createPlayableItem | ( | Uri | uri | ) | throws IOException |
Makes the item for a shared http(s) link (shared text).
Worker thread only: it reads the link's metadata over the network and, with the media proxy option on, registers the link with the share registry.
The media type comes from the metadata reader; if that fails it comes from a bounded HTTP HEAD (concrete audio, video or image type); only if that fails too the link is assumed to be an image, as before, and a payload-free line says so. With the proxy option on a target the phone must not fetch (loopback, link-local, this phone's own address, see LinkTargetPolicy) is refused. Nothing here logs the link or the exceptions' text.
Referenced by de.yaacc.upnp.UpnpClient.createPlayableItem().


| PlayableItem de.yaacc.upnp.UpnpClient.createPlayableItem | ( | Uri | uri, |
| Set< String > | receiverIds ) throws IOException |
Same as createPlayableItem(Uri), with the receivers the share is made for given explicitly: the addresses a proxied link is served to are built from exactly these ids, never from the stored selection, which another action may have replaced or cleared during the network work.
| receiverIds | the receivers chosen for this share, captured at confirm time |

| void de.yaacc.upnp.UpnpClient.discardShareOf | ( | PlayableItem | item | ) |
Gives up the share an item was made for (no player took it): removes its registry key, which closes the source of a file.
Does nothing for an item without a proxy URL. Never throws.

Returns a Service of type AVTransport.
| device | the device which provides the service |
| Context de.yaacc.upnp.UpnpClient.getContext | ( | ) |
Referenced by de.yaacc.upnp.UpnpClient.browseSync(), de.yaacc.upnp.UpnpClient.createLiveStreamShare(), de.yaacc.upnp.UpnpClient.createPlayableItem(), de.yaacc.player.PlayerService.createPlayer(), de.yaacc.player.AbstractPlayer.getContext(), de.yaacc.upnp.UpnpClient.getDefaultDuration(), de.yaacc.player.LocalImagePlayer.getNotificationIntent(), de.yaacc.player.LocalImagePlayer.getPlayMode(), de.yaacc.upnp.UpnpClient.getProviderDeviceId(), de.yaacc.upnp.UpnpClient.getReceiverDeviceIds(), de.yaacc.upnp.UpnpClient.getSilenceDuration(), de.yaacc.upnp.server.avtransport.AvTransport.getTransportSettings(), de.yaacc.upnp.UpnpClient.getVolume(), de.yaacc.upnp.UpnpClient.isMute(), de.yaacc.upnp.UpnpClient.linkProxyDecision(), de.yaacc.player.LocalImagePlayer.next(), de.yaacc.player.LocalImagePlayer.onDestroy(), de.yaacc.player.LocalImagePlayer.pause(), de.yaacc.player.LocalImagePlayer.play(), de.yaacc.player.LocalImagePlayer.previous(), de.yaacc.upnp.UpnpClient.searchSync(), de.yaacc.player.SendspinPlayer.SendspinPlayer(), de.yaacc.player.LocalImagePlayer.setItems(), de.yaacc.upnp.UpnpClient.setMute(), de.yaacc.upnp.UpnpClient.setReceiverDeviceIds(), de.yaacc.upnp.UpnpClient.setVolume(), de.yaacc.upnp.UpnpClient.shutdown(), de.yaacc.player.LocalImagePlayer.stop(), and de.yaacc.upnp.UpnpClient.unbindServices().

| Collection< Player > de.yaacc.upnp.UpnpClient.getCurrentPlayers | ( | ) |
Returns all current player instances.
Referenced by de.yaacc.upnp.UpnpClient.addToPlaylist(), de.yaacc.upnp.server.openhome.AndroidOpenHomeHost.isAlive(), de.yaacc.browser.BrowserActivity.onKeyDown(), and de.yaacc.upnp.server.avtransport.AvTransportMediaRendererPaused.seek().


| List< Player > de.yaacc.upnp.UpnpClient.getCurrentPlayers | ( | AvTransport | transport | ) |
Returns all current player instances for the given transport object.
| transport | the object which describes the content to be played |

| int de.yaacc.upnp.UpnpClient.getDefaultDuration | ( | ) |
Return the configured default duration.
Referenced by de.yaacc.upnp.UpnpClient.getCurrentPlayers(), and de.yaacc.upnp.server.openhome.AndroidOpenHomeHost.toPlayableItem().


| Device<?, ?, ?> de.yaacc.upnp.UpnpClient.getDevice | ( | String | identifier | ) |
Returns a registered UpnpDevice.
Referenced by de.yaacc.upnp.UpnpClient.getProviderDevice(), de.yaacc.upnp.UpnpClient.getReceiverDevices(), and de.yaacc.share.ShareAddressResolver.resolve().


| Collection< Device<?, ?, ?> > de.yaacc.upnp.UpnpClient.getDevices | ( | ) |
Returns all registered UpnpDevices.
Referenced by de.yaacc.upnp.UpnpClient.getDevices(), de.yaacc.upnp.UpnpClient.getDevicesProvidingAvTransportService(), and de.yaacc.upnp.UpnpClient.getDevicesProvidingContentDirectoryService().


| Collection< Device<?, ?, ?> > de.yaacc.upnp.UpnpClient.getDevicesProvidingAvTransportService | ( | ) |
Returns all registered UpnpDevices with an AVTransport Service, and those that offer an OpenHome playlist without one.

| Collection< Device<?, ?, ?> > de.yaacc.upnp.UpnpClient.getDevicesProvidingContentDirectoryService | ( | ) |
Returns all registered UpnpDevices with a ContentDirectory Service.

| HttpRequestSender de.yaacc.upnp.UpnpClient.getHttpRequestSender | ( | ) |
Referenced by de.yaacc.upnp.UpnpClient.browseSync(), de.yaacc.player.OpenHomePlayer.createControl(), de.yaacc.player.AVTransportPlayer.getHttpRequestSender(), and de.yaacc.upnp.UpnpClient.searchSync().

| NetworkRecoveryListener de.yaacc.upnp.UpnpClient.getNetworkRecoveryRelay | ( | ) |
addNetworkRecoveryListener | Device<?, ?, ?> de.yaacc.upnp.UpnpClient.getProviderDevice | ( | ) |

| String de.yaacc.upnp.UpnpClient.getProviderDeviceId | ( | ) |
Referenced by de.yaacc.upnp.UpnpClient.getProviderDevice().


| Set< String > de.yaacc.upnp.UpnpClient.getReceiverDeviceIds | ( | ) |
Gets the receiver IDs, if none is defined the local device will be returned.
SharedPreferences.getStringSet returns must never be changed); an empty stored set stays empty Referenced by de.yaacc.upnp.UpnpClient.awaitReceiverDevices(), de.yaacc.upnp.UpnpClient.createPlayableItem(), de.yaacc.upnp.UpnpClient.getReceiverDevices(), and de.yaacc.share.ShareAddressResolver.resolve().


| Collection< Device<?, ?, ?> > de.yaacc.upnp.UpnpClient.getReceiverDevices | ( | ) |
Returns the receiverIds stored in the preferences.
If an receiver id is unknown it will be removed.
Referenced by de.yaacc.upnp.UpnpClient.addReceiverDevice(), de.yaacc.upnp.UpnpClient.awaitReceiverDevices(), de.yaacc.upnp.UpnpClient.clearReceiverDevices(), and de.yaacc.upnp.UpnpClient.removeReceiverDevice().


| Registry de.yaacc.upnp.UpnpClient.getRegistry | ( | ) |
Returns the upnp registry.
Referenced by de.yaacc.upnp.UpnpClient.getDevice(), de.yaacc.upnp.UpnpClient.getDevices(), de.yaacc.upnp.UpnpClient.getDevicesProvidingAvTransportService(), and de.yaacc.upnp.UpnpClient.getDevicesProvidingContentDirectoryService().


Returns a Service of type RenderingControl.
| device | the device which provides the service |
| int de.yaacc.upnp.UpnpClient.getSilenceDuration | ( | ) |
Return the configured silence duration.
Referenced by de.yaacc.player.AbstractPlayer.getSilenceDuration().


| int de.yaacc.upnp.UpnpClient.getVolume | ( | ) |
returns the current volume level

| boolean de.yaacc.upnp.UpnpClient.initialize | ( | Context | context | ) |
Initialize the Object.
| context | the context |

| Player de.yaacc.upnp.UpnpClient.initializeLocalPlayer | ( | List< PlayableItem > | items | ) |
Creates a player on this device for the items (the OpenHome renderer's queue); not started.
Referenced by de.yaacc.upnp.server.openhome.AndroidOpenHomeHost.createPlayer().


| List< Player > de.yaacc.upnp.UpnpClient.initializePlayers | ( | AvTransport | transport | ) |
Returns all player instances initialized with the given transport object.
| transport | the object which describes the content to be played |

Returns all player instances initialized with the given didl object.
| items | the items to be played |

| List< Player > de.yaacc.upnp.UpnpClient.initializeQueuePlayers | ( | de.yaacc.share.PickedQueue.Result | queue | ) |
Creates the players of a picked queue on the stored receiver selection (one player per receiver and media type, see PlayerService#createQueuePlayers); worker thread.
Not started.

| boolean de.yaacc.upnp.UpnpClient.isHttpServerRunning | ( | ) |
Whether the local HTTP server accepts connections (it runs whenever the app process lives, whatever the "local server" setting says).
A short loopback connect: call it only off the main thread. See HttpServerProbe.

| boolean de.yaacc.upnp.UpnpClient.isInitialized | ( | ) |
True if the client is initialized.
Referenced by de.yaacc.upnp.UpnpClient.getDevice(), de.yaacc.upnp.UpnpClient.getDevices(), de.yaacc.upnp.UpnpClient.getDevicesProvidingAvTransportService(), de.yaacc.upnp.UpnpClient.getDevicesProvidingContentDirectoryService(), de.yaacc.upnp.UpnpClient.getRegistry(), and de.yaacc.upnp.UpnpClient.searchDevices().

| boolean de.yaacc.upnp.UpnpClient.isMute | ( | ) |
returns the mute state

|
static |

| ProxyAvailability.Decision de.yaacc.upnp.UpnpClient.linkProxyDecision | ( | ) |
How a shared link is handed to the receivers, from the preferences: the media proxy checkbox AND the master switch "UPnP Server" (see ProxyAvailability).
The caller may ask this before building an item to tell the user why a link is refused.
Referenced by de.yaacc.upnp.UpnpClient.createPlayableItem().


| ChildPager.Result de.yaacc.upnp.UpnpClient.loadAllChildren | ( | Position | position, |
| long | start, | ||
| SortCriterion... | orderBy ) |
All children of a folder from start on, page after page, in the order the server gives them for orderBy (the screen loads a folder in batches of 50; what plays must be the whole folder).
Blocks: not for the main thread.
| start | the number of children the caller has already (they are skipped) |
| void de.yaacc.upnp.UpnpClient.localDeviceAdded | ( | Registry | registry, |
| LocalDevice | localdevice ) |
Implements de.yaacc.upnp.registry.RegistryListener.
| void de.yaacc.upnp.UpnpClient.localDeviceRemoved | ( | Registry | registry, |
| LocalDevice | localdevice ) |
Implements de.yaacc.upnp.registry.RegistryListener.
| void de.yaacc.upnp.UpnpClient.refreshAfterResume | ( | ) |
A browser screen came back to the foreground, maybe after the device or the app was suspended (screen off, Doze, a long time in the background): checks the network listener and searches the devices again if the last search is not recent.
Does its work on the client's executor and returns at once.
| void de.yaacc.upnp.UpnpClient.remoteDeviceAdded | ( | Registry | registry, |
| RemoteDevice | remotedevice ) |
Implements de.yaacc.upnp.registry.RegistryListener.
| void de.yaacc.upnp.UpnpClient.remoteDeviceDiscoveryFailed | ( | Registry | registry, |
| RemoteDevice | remotedevice, | ||
| Exception | exception ) |
Implements de.yaacc.upnp.registry.RegistryListener.
| void de.yaacc.upnp.UpnpClient.remoteDeviceDiscoveryStarted | ( | Registry | registry, |
| RemoteDevice | remotedevice ) |
Implements de.yaacc.upnp.registry.RegistryListener.
| void de.yaacc.upnp.UpnpClient.remoteDeviceRemoved | ( | Registry | registry, |
| RemoteDevice | remotedevice ) |
Implements de.yaacc.upnp.registry.RegistryListener.
| void de.yaacc.upnp.UpnpClient.remoteDeviceUpdated | ( | Registry | registry, |
| RemoteDevice | remotedevice ) |
Implements de.yaacc.upnp.registry.RegistryListener.
| void de.yaacc.upnp.UpnpClient.removeReceiverDevice | ( | Device<?, ?, ?> | receiverDevice | ) |
remove a receiver device
| receiverDevice | receiverDevice |

| void de.yaacc.upnp.UpnpClient.removeUpnpClientListener | ( | UpnpClientListener | listener | ) |
Removes a listener added with addUpnpClientListener(UpnpClientListener), so a destroyed screen is no longer called.
Removes one registration; does nothing if the listener is not registered.
| listener | the listener to be removed |
| ContentDirectoryBrowseResult de.yaacc.upnp.UpnpClient.searchSync | ( | Device<?, ?, ?> | device, |
| String | freeText, | ||
| long | firstResult, | ||
| Long | maxResults ) |
Searches the whole server from its root for the free text (issue #336): every word in at least one of the properties the server can search, see SearchCriteria.
Blocking, like browseSync; the result is paged the same way. A server that can not search gives the failure SEARCH_UNSUPPORTED. If a server refuses the criteria with several properties, the first property alone is tried once.

| void de.yaacc.upnp.UpnpClient.setMute | ( | boolean | mute | ) |
set the mute state
| mute | the state |

| void de.yaacc.upnp.UpnpClient.setReceiverDeviceIds | ( | Set< String > | receiverDeviceIds | ) |
Set the list of receiver device ids.
| receiverDeviceIds | the device ids. |
Referenced by de.yaacc.upnp.UpnpClient.clearReceiverDevices(), de.yaacc.upnp.UpnpClient.getReceiverDevices(), de.yaacc.upnp.UpnpClient.setReceiverDevices(), and de.yaacc.browser.ContentListFragment.startPlayAction().


| void de.yaacc.upnp.UpnpClient.setReceiverDevices | ( | Collection< Device<?, ?, ?> > | receiverDevices | ) |
set the receiverDevices to the devices in the given collection.
| receiverDevices | the devices |
Referenced by de.yaacc.upnp.UpnpClient.addReceiverDevice(), and de.yaacc.upnp.UpnpClient.removeReceiverDevice().


| void de.yaacc.upnp.UpnpClient.setVolume | ( | int | desired | ) |
set the volume in the range of 0-100
| desired | volume |

| boolean de.yaacc.upnp.UpnpClient.supportsSearch | ( | Device<?, ?, ?> | device | ) |
Whether the server can search at all: it has the search action and lists at least one property that a free text is looked for in.
Asks the server once per device (blocking: worker thread only).
| List< Item > de.yaacc.upnp.UpnpClient.toItemList | ( | DIDLContent | didlContent | ) |
returns a list of all items including items in containers for the given didlContent
| didlContent | the content |
Referenced by de.yaacc.upnp.UpnpClient.addToPlaylist(), de.yaacc.upnp.UpnpClient.toItemList(), and de.yaacc.upnp.UpnpClient.toItemList().


| List< Item > de.yaacc.upnp.UpnpClient.toItemList | ( | DIDLObject | didlObject | ) |
Converts the content of a didlObject into a list of cling items.
| didlObject | the content |

| void de.yaacc.upnp.UpnpClient.unbindServices | ( | ) |
Lets go of the bindings to the server service and the player service.
A service that is bound does not end when it is stopped, so the exit calls this after shutdown() (task 12.2). One call ends both: the same connection object is registered for both.
