aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Dlna/IEventManager.cs
blob: 4abf623a91b459328e2d1ce2b83f6efc8031f4e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using MediaBrowser.Model.Dlna;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace MediaBrowser.Controller.Dlna
{
    public interface IEventManager
    {
        /// <summary>
        /// Cancels the event subscription.
        /// </summary>
        /// <param name="subscriptionId">The subscription identifier.</param>
        EventSubscriptionResponse CancelEventSubscription(string subscriptionId);

        /// <summary>
        /// Renews the event subscription.
        /// </summary>
        /// <param name="subscriptionId">The subscription identifier.</param>
        /// <param name="timeoutSeconds">The timeout seconds.</param>
        /// <returns>EventSubscriptionResponse.</returns>
        EventSubscriptionResponse RenewEventSubscription(string subscriptionId, int? timeoutSeconds);

        /// <summary>
        /// Creates the event subscription.
        /// </summary>
        /// <param name="notificationType">Type of the notification.</param>
        /// <param name="timeoutSeconds">The timeout seconds.</param>
        /// <param name="callbackUrl">The callback URL.</param>
        /// <returns>EventSubscriptionResponse.</returns>
        EventSubscriptionResponse CreateEventSubscription(string notificationType, int? timeoutSeconds, string callbackUrl);

        /// <summary>
        /// Gets the subscription.
        /// </summary>
        /// <param name="id">The identifier.</param>
        /// <returns>EventSubscription.</returns>
        EventSubscription GetSubscription(string id);

        /// <summary>
        /// Triggers the event.
        /// </summary>
        /// <param name="notificationType">Type of the notification.</param>
        /// <param name="stateVariables">The state variables.</param>
        /// <returns>Task.</returns>
        Task TriggerEvent(string notificationType, IDictionary<string,string> stateVariables);
    }
}