StreamLink.NET  6.2.10-3513-c11dd52
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Public Member Functions | List of all members
Caplin.StreamLink.Alerts.INotificationListener Interface Reference

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

Public Member Functions

void OnNotification (Caplin.StreamLink.Alerts.INotification notification)
 Received when notification gets added to the container. More...
 
void OnNotificationRemoved (Caplin.StreamLink.Alerts.INotification notification)
 Received when notification is removed from the container. More...
 
void OnServiceStatus (Caplin.StreamLink.ServiceStatus status)
 Received when the notification service availability changes. More...
 

Detailed Description

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

A trivial implementation of NotificationListener would be:

using Caplin.StreamLink;
using Caplin.StreamLink.Alerts;
using System;
namespace caplin.streamlink.examplesnippets.alerts
{
public class NotificationListenerSnippet
{
private NotificationService notificationService;
public NotificationListenerSnippet( IStreamLink streamLink )
{
this.notificationService = new NotificationService(streamLink);
this.notificationService.AddListener(new ExampleNotificationListener());
}
class ExampleNotificationListener : INotificationListener
{
public void OnNotificationRemoved( INotification notification )
{
Console.WriteLine("OnNotificationRemoved(" + notification.ToString() + ")");
}
public void OnNotification( INotification notification )
{
Console.WriteLine("OnNotification(" + notification.ToString() + ")");
}
public void OnServiceStatus( ServiceStatus status )
{
Console.WriteLine("OnServiceStatus(" + status + ")");
}
}
}
}

Member Function Documentation

void Caplin.StreamLink.Alerts.INotificationListener.OnNotification ( Caplin.StreamLink.Alerts.INotification  notification)

Received when notification gets added to the container.

Parameters
notificationINotification
void Caplin.StreamLink.Alerts.INotificationListener.OnNotificationRemoved ( Caplin.StreamLink.Alerts.INotification  notification)

Received when notification is removed from the container.

Parameters
notificationINotification
void Caplin.StreamLink.Alerts.INotificationListener.OnServiceStatus ( Caplin.StreamLink.ServiceStatus  status)

Received when the notification service availability changes.

Parameters
statusthe updated com.caplin.streamlink.ServiceStatus.

Generated on Thu Apr 27 2017 14:05:46 for StreamLink.NET