StreamLink for iOS  8.0.0.233163-35883203
<SLSubscriptionListener > Protocol Reference

Defines the protocol that should be implemented by the application to receive updates to subscribed data from the Liberator. More...

Inheritance diagram for <SLSubscriptionListener >:

Instance Methods

(void) - recordUpdatedForSubscription:data:
 Handles the event raised when updates are received to the data in a record-based subject. More...
 
(void) - recordType2UpdatedForSubscription:data:
 Handles the event raised when updates are received to the type2 data in a record-based subject. More...
 
(void) - recordType3UpdatedForSubscription:data:
 Handles the event raised when updates are received to the type3 data in a record-based subject. More...
 
(void) - permissionUpdatedForSubscription:data:
 Handles the event raised when updates are received for a permission subject. More...
 
(void) - newsUpdatedForSubscription:data:
 Handles the event raised when updates are received for a news headline. More...
 
(void) - storyUpdatedForSubscription:data:
 Handles the event raised when updates are received for a story. More...
 
(void) - jsonUpdatedForSubscription:data:
 Handles the event raised when updates are received for a JSON object. More...
 
(void) - directoryUpdatedForSubscription:data:
 Handles the event raised when updates are received for a directory. More...
 
(void) - containerUpdatedForSubscription:data:
 Handles the event raised when updates are received for a container. More...
 
(void) - errorForSubscription:error:
 Handles the event raised when there is an error relating to an SLSubscription. More...
 
(void) - statusForSubscription:status:
 Handles the event raised when there is a change in the status of a subscribed subject. More...
 

Detailed Description

Defines the protocol that should be implemented by the application to receive updates to subscribed data from the Liberator.

You must implement this protocol so that your application can receive and process the relevant updates.

Note: Your application may need to update the GUI using the information received by one or more of SLSubscriptionListener'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 SLSubscriptionListener in an instance of the SLSubscriptionListenerWrapper class, and then supply this wrapped implementation to StreamLink.subscribeToSubject(). The wrapper ensures that GUI updates in the SLSubscriptionListener methods are performed on the GUI thread.

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

See also
SLSubscriptionListenerWrapper

Method Documentation

- (void SLSubscriptionListener) containerUpdatedForSubscription: (id< SLSubscription >)  subscription
data: (id< SLContainerDataEvent >)  data 
optional

Handles the event raised when updates are received for a container.

Parameters
subscription- The SLSubscription for which the update occurred.
data- An SLContainerDataEvent object containing the container update.
- (void SLSubscriptionListener) directoryUpdatedForSubscription: (id< SLSubscription >)  subscription
data: (id< SLDirectoryDataEvent >)  data 
optional

Handles the event raised when updates are received for a directory.

Parameters
subscription- The SLSubscription for which the update occurred.
data- An SLDirectoryDataEvent object containing the story update.
- (void SLSubscriptionListener) errorForSubscription: (id< SLSubscription >)  subscription
error: (id< SLSubscriptionErrorEvent >)  error 
optional

Handles the event raised when there is an error relating to an SLSubscription.

Parameters
subscription- The SLSubscription for which the error occurred.
error- The reason for the error.
- (void SLSubscriptionListener) jsonUpdatedForSubscription: (id< SLSubscription >)  subscription
data: (id< SLJsonDataEvent >)  data 
optional

Handles the event raised when updates are received for a JSON object.

Parameters
subscription- The SLSubscription for which the update occurred.
data- An SLJsonDataEvent object containing the JSON update.
- (void SLSubscriptionListener) newsUpdatedForSubscription: (id< SLSubscription >)  subscription
data: (id< SLNewsDataEvent >)  data 
optional

Handles the event raised when updates are received for a news headline.

Parameters
subscription- The SLSubscription for which the update occurred.
data- An SLNewsDataEvent object containing the news headline update.
- (void SLSubscriptionListener) permissionUpdatedForSubscription: (id< SLSubscription >)  subscription
data: (id< SLPermissionDataEvent >)  data 
optional

Handles the event raised when updates are received for a permission subject.

Parameters
subscription- The subscription for which the update occurred.
data- An SLPermissionDataEvent object containing the permission update.
- (void SLSubscriptionListener) recordType2UpdatedForSubscription: (id< SLSubscription >)  subscription
data: (id< SLRecordType2DataEvent >)  data 
optional

Handles the event raised when updates are received to the type2 data in a record-based subject.

Parameters
subscription- The subscription for which the update occurred.
data- An SLRecordType2DataEvent object containing the record update.
- (void SLSubscriptionListener) recordType3UpdatedForSubscription: (id< SLSubscription >)  subscription
data: (id< SLRecordType3DataEvent >)  data 
optional

Handles the event raised when updates are received to the type3 data in a record-based subject.

Parameters
subscription- The subscription for which the update occurred.
data- An SLRecordType3DataEvent object containing the record update.
- (void SLSubscriptionListener) recordUpdatedForSubscription: (id< SLSubscription >)  subscription
data: (id< SLRecordDataEvent >)  data 
optional

Handles the event raised when updates are received to the data in a record-based subject.

Parameters
subscription- The subscription for which the update occurred.
data- An SLRecordDataEvent object containing the record update.
- (void SLSubscriptionListener) statusForSubscription: (id< SLSubscription >)  subscription
status: (id< SLSubscriptionStatusEvent >)  status 
optional

Handles the event raised when there is a change in the status of a subscribed subject.

Parameters
subscription- The SLSubscription whose status has changed.
status- The new status of the subscription.
- (void SLSubscriptionListener) storyUpdatedForSubscription: (id< SLSubscription >)  subscription
data: (id< SLStoryDataEvent >)  data 
optional

Handles the event raised when updates are received for a story.

Parameters
subscription- The SLSubscription for which the update occurred.
data- An SLStoryDataEvent object containing the story update.

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