Connection controller.
You’ll never need to create an instance of this class yourself. You’ll find it ready to use as the connection attribute on the Session instance.
The session’s current ConnectionState.
The connection state involves two components, authentication and offline mode. The mapping is as follows
Register listeners for the spotify.SessionEvent.CONNECTION_STATE_UPDATED event to be notified when the connection state changes.
The session’s ConnectionType.
Defaults to ConnectionType.UNKNOWN. Set to a ConnectionType value to tell libspotify what type of connection you’re using.
This is used together with allow_network, allow_network_if_roaming, allow_sync_over_wifi, and allow_sync_over_mobile to control offline syncing and network usage.
Whether or not network access is allowed at all.
Defaults to True. Setting this to False turns on offline mode.
Whether or not network access is allowed if type is set to ConnectionType.MOBILE_ROAMING.
Defaults to False.
Whether or not offline syncing is allowed when type is set to ConnectionType.WIFI.
Defaults to True.
Whether or not offline syncing is allowed when type is set to ConnectionType.MOBILE, or allow_network_if_roaming is True and type is set to ConnectionType.MOBILE_ROAMING.
Defaults to True.