StreamLink for iOS  8.0.0.233163-35883203
<SLConnectionListener > Protocol Reference

Defines the protocol for receiving information about changes in the state of the StreamLink connection, the data services available from the Liberator, and the DataSources that are normally connected to the Liberator. More...

Inheritance diagram for <SLConnectionListener >:

Instance Methods

(void) - connectionStatus:
 Invoked when the state of the StreamLink connection changes. More...
 
(void) - serviceStatus:
 Invoked when the state of a DataService available from the Liberator changes. More...
 
(void) - sourceStatus:
 Invoked when the state of one of the DataSources connected to Liberator changes. More...
 
(void) - statistics:
 Invoked when new connection statistics are available. Once a connection has been established, this callback is invoked at intervals defined by the StatisticsPeriod configuration item (see SLConfiguration.setStatisticsPeriod()). More...
 

Detailed Description

Defines the protocol for receiving information about changes in the state of the StreamLink connection, the data services available from the Liberator, and the DataSources that are normally connected to the Liberator.

You should implement this protocol if your application needs to take particular actions when such state changes occur.

Your application should not call into StreamLink when the connection status changes; StreamLink manages the connection state and will recover the connection to the Liberator without your application intervening.

Note
Your application may need to update the GUI using the information received by one or more of SLConnectionListener's callback methods. However, these callback methods are called on an anonymous thread, and updates to the GUI should not be attempted from this thread; GUI updates must only be performed on the GUI thread.

A simple solution is to wrap your implementation of SLConnectionListener in an instance of the SLConnectionListenerWrapper class, and then supply this wrapped implementation to StreamLink.addConnectionListener(). The wrapper ensures that GUI updates in the SLConnectionListener methods are performed in the GUI thread.

However, if application performance is a priority, you may need to handle the GUI thread processing directly in your implementation of SLConnectionListener.

See also
SLConnectionListenerWrapper

Method Documentation

- (void SLConnectionListener) connectionStatus: (id< SLConnectionStatusEvent >)  connectionStatusEvent
optional

Invoked when the state of the StreamLink connection changes.

Parameters
connectionStatusEvent- The new status of the connection.
- (void SLConnectionListener) serviceStatus: (id< SLConnectionServiceStatusEvent >)  serviceStatusEvent
optional

Invoked when the state of a DataService available from the Liberator changes.

Parameters
serviceStatusEvent- The new status of the DataService.
- (void SLConnectionListener) sourceStatus: (id< SLConnectionSourceStatusEvent >)  sourceStatusEvent
optional

Invoked when the state of one of the DataSources connected to Liberator changes.

Parameters
sourceStatusEvent- The new status of the DataSource.
- (void SLConnectionListener) statistics: (id< SLConnectionStatisticsEvent >)  statisticsEvent
optional

Invoked when new connection statistics are available. Once a connection has been established, this callback is invoked at intervals defined by the StatisticsPeriod configuration item (see SLConfiguration.setStatisticsPeriod()).

Parameters
statisticsEvent- The new connection statistics.

Generated on Tue Apr 23 2024 11:14:03 for StreamLink for iOS