YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.sendspin.discovery.SendspinNsd Class Reference

The Android side of the player discovery (issue #325): browses {@value SendspinServiceType.TYPE} with NsdManager and gives every resolved service to the SendspinDirectory. More...

Collaboration diagram for de.yaacc.sendspin.discovery.SendspinNsd:
Collaboration graph

Public Member Functions

 SendspinNsd (Context context, SendspinDirectory directory)
 
 SendspinNsd (Context context, SendspinDirectory directory, String serviceType)
 
synchronized boolean isStarted ()
 
SendspinDiscoveryLog log ()
 What the platform said while browsing, for the discovery report.
 
synchronized SendspinDiscoveryReport.LockState lockState ()
 
synchronized void start ()
 Starts browsing.
 
synchronized void stop ()
 Stops browsing, drops the queue and releases the multicast lock.
 

Detailed Description

The Android side of the player discovery (issue #325): browses {@value SendspinServiceType.TYPE} with NsdManager and gives every resolved service to the SendspinDirectory.

Thin on purpose: what to accept (address ranges, ports, the path, caps) is decided by the directory, the order of the resolutions by ResolveQueue and which failures are retried by ResolveRetry (both of the Snapcast discovery, used as they are, as FCast does). It can not be tested on the JVM.

Lifetime. Nothing runs until start(), which the discovery gate calls while a receivers page is visible and the setting is on; stop() ends the browse, the queue and the multicast lock, which is held only between the two. No permission beyond what the app has for UPnP (CHANGE_WIFI_MULTICAST_STATE) is needed. Not in this version: a log and a report for the user as the FCast and Snapcast settings have.

Trust. An announcement is not authenticated: the name is display text, the address comes from the resolution as a number (no name lookup here), the TXT attributes are hints that the directory checks.

Constructor & Destructor Documentation

◆ SendspinNsd()

de.yaacc.sendspin.discovery.SendspinNsd.SendspinNsd ( Context context,
SendspinDirectory directory,
String serviceType )
Parameters
serviceTypeSendspinServiceType#TYPE for players, SendspinServiceType#SERVER_TYPE for servers

Member Function Documentation

◆ start()

synchronized void de.yaacc.sendspin.discovery.SendspinNsd.start ( )

Starts browsing.

Does nothing when it runs already.

Here is the call graph for this function:

◆ stop()

synchronized void de.yaacc.sendspin.discovery.SendspinNsd.stop ( )

Stops browsing, drops the queue and releases the multicast lock.

Does nothing when it is stopped.

Here is the call graph for this function:

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