Options
All
  • Public
  • Public/Protected
  • All
Menu

Enumeration HiFiConnectionStates

When the state of the connection to the High Fidelity Audio Server changes, the new state will be one of these values.

Index

Enumeration members

Connected

Connected: = "Connected"

The HiFiConnectionState will be "Connected" when the system has an active connection to the High Fidelity servers.

Connecting

Connecting: = "Connecting"

The HiFiConnectionState will be "Connecting" when the system is in the process of trying to establish an initial connection. If the HiFiCommunicator is configured for autoretries of initial connections, the state will remain in "Connecting" until all retry attempts (if needed) have completed. If the connection has not been established once all of the retries have been attempted, the state will then go to "Failed" and finally to "Disconnected".

Disconnected

Disconnected: = "Disconnected"

The HiFiConnectionState will be "Disconnected" when the HiFiCommunicator is not connected to the High Fidelity servers. This is the initial state of a new HiFiCommunicator. For a HiFiCommunicator that has been previously connected and has since disconnected, if the disconnection was due to a failure, the state will first go to "Failed" and will then settle on "Disconnected" once fully disconnected. If the disconnection was triggered by a user action (i.e. as the result of calling `disconnectFromHiFiAudioAPIServer()`), the state will first go to "Disconnecting" and will then settle on "Disconnected" once fully disconnected.

Disconnecting

Disconnecting: = "Disconnecting"

The HiFiConnectionState will be "Disconnecting" when the `disconnectFromHiFiAudioAPIServer()` is called and while the connection is in the process of being disconnected.

Failed

Failed: = "Failed"

The HiFiConnectionState will be "Failed" if the HiFiCommunicator attempted to connect (or reconnect) to the High Fidelity servers and was unable to make a connection, or if an existing connection was disconnected unexpectedly and couldn't be automatically reconnected (if configured). After going to "Failed", the connection state will proceed automatically to "Disconnected". (Failed is a transition state indicating that the disconnection is due to a failure.) Note that if an unexpected disconnect is being automatically retried, the state will be "Reconnecting" instead; the connection state will not go to "Failed" until / unless the reconnection attempt fails completely.

Reconnecting

Reconnecting: = "Reconnecting"

The HiFiConnectionState will be "Reconnecting" if the system is in the process of trying to automatically re-establish a pre-existing connection. If the HiFiCommunicator is configured for autoreconnects of dropped connections, the state will remain in "Reconnecting" until all reconnection attempts have completed. If the connection has not been established once all of the reconnection attempts have been tried, the state will then go to "Failed" and finally to "Disconnected".

Unavailable

Unavailable: = "Unavailable"

The HiFiConnectionState will be "Unavailable" when the API Server is at capacity. This state does not transition to Disconnected, but does mean that the HiFiCommunicator does not have an active connection with the server.