spotifywebapipython.spotifyconnect.spotifyconnectzeroconflistener
Spotify Connect Zeroconf service type identifier.
Spotify Connect Zeroconf Listener class.
Listens for Chromecast device connection updates for devices that support Spotify Connect.
Initializes a new instance of the class.
Arguments:
- parentDirectory (SpotifyConnectDirectoryTask): Parent SpotifyConnectDirectoryTask instance.
- zeroconf_RLock (threading.RLock): Lock object used to enforce thread-safe updates.
Called by the spotify connect zeroconf ServiceBrowser when an mDNS service state has changed (e.g. added, removed, or updated).
Arguments:
- zeroconf (Zeroconf): Zeroconf instance that raised the notification.
- service_type (str): Service type that was affected.
- name (str): Service name that was affected.
- state_change (ServiceStateChange): The type of service state change (add, remove, update).
Called when an mDNS service is discovered.
Arguments:
- zeroconf (Zeroconf): Zeroconf instance that raised the notification.
- serviceType (str): Service type that was affected.
- serviceName (str): Service name that was affected.
- serviceStateChange (ServiceStateChange): A description of the type of service state change (add, remove, update).
This method will be called in a thread-safe manner, as the caller is using
the Zeroconf_RLock object to control access.
Called when an mDNS service is lost.
Arguments:
- zeroconf (Zeroconf): Zeroconf instance that raised the notification.
- serviceType (str): Service type that was affected.
- serviceName (str): Service name that was affected.
- serviceStateChange (ServiceStateChange): A description of the type of service state change (add, remove, update).
This method will be called in a thread-safe manner, as the caller is using
the Zeroconf_RLock object to control access.
Called when an mDNS service is updated.
Arguments:
- zeroconf (Zeroconf): Zeroconf instance that raised the notification.
- serviceType (str): Service type that was affected.
- serviceName (str): Service name that was affected.
- serviceStateChange (ServiceStateChange): A description of the type of service state change (add, remove, update).
This method will be called in a thread-safe manner, as the caller is using
the Zeroconf_RLock object to control access.