Class
caplin.streamlink.alerts

NotificationListener

Interface that should be implemented to receive notification change callbacks from the NotificationProvider

A trivial implementation of NotificationListener would be:

// A caplin.streamlink.alerts.NotificationListener that can handle
// every possible callback.
//
// This trivial implementation just logs the callbacks
//

var notificationService = new caplin.streamlink.alerts.NotificationService(streamlink);

notificationService.addListener(
{
        onNotification: function(notification)
        {
                console.log("onNotification()(" + notification.toString() + ")");
        },
        
        onNotificationRemoved: function(notification)
        {
                console.log("onNotificationRemoved(" + notification.toString() + ")");
        },
        
        onServiceStatus: function(status)
        {
                console.log("onServiceStatus(" + status + ")");
        }
});

Constructor Summary

Attributes Name and Description
caplin.streamlink.alerts.NotificationListener()

Method Summary

Attributes Name and Description
void onNotification( notification)

*

Received when notification gets added to the container.

void onNotificationRemoved( notification)

*

Received when notification is removed from the container.

void onServiceStatus( status)

*

Received when the notification service availability changes.

Constructor Detail

caplin.streamlink.alerts.NotificationListener()

Method Detail

void onNotification( notification)

*

Received when notification gets added to the container.

*@param {caplin.streamlink.alerts.Notification} notification caplin.streamlink.alerts.Notification

Parameters
notification

void onNotificationRemoved( notification)

*

Received when notification is removed from the container.

*@param {caplin.streamlink.alerts.Notification} notification caplin.streamlink.alerts.Notification

Parameters
notification

void onServiceStatus( status)

*

Received when the notification service availability changes.

*@param {caplin.streamlink.ServiceStatus} status the updated caplin.streamlink.ServiceStatus.

Parameters
status