mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 22:38:30 +01:00
support sending upnp events
This commit is contained in:
17
MediaBrowser.Controller/Dlna/EventSubscriptionResponse.cs
Normal file
17
MediaBrowser.Controller/Dlna/EventSubscriptionResponse.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Controller.Dlna
|
||||
{
|
||||
public class EventSubscriptionResponse
|
||||
{
|
||||
public string Content { get; set; }
|
||||
public string ContentType { get; set; }
|
||||
|
||||
public Dictionary<string, string> Headers { get; set; }
|
||||
|
||||
public EventSubscriptionResponse()
|
||||
{
|
||||
Headers = new Dictionary<string, string>();
|
||||
}
|
||||
}
|
||||
}
|
||||
21
MediaBrowser.Controller/Dlna/IContentDirectory.cs
Normal file
21
MediaBrowser.Controller/Dlna/IContentDirectory.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Controller.Dlna
|
||||
{
|
||||
public interface IContentDirectory
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the content directory XML.
|
||||
/// </summary>
|
||||
/// <param name="headers">The headers.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
string GetContentDirectoryXml(IDictionary<string, string> headers);
|
||||
|
||||
/// <summary>
|
||||
/// Processes the control request.
|
||||
/// </summary>
|
||||
/// <param name="request">The request.</param>
|
||||
/// <returns>ControlResponse.</returns>
|
||||
ControlResponse ProcessControlRequest(ControlRequest request);
|
||||
}
|
||||
}
|
||||
@@ -64,20 +64,6 @@ namespace MediaBrowser.Controller.Dlna
|
||||
/// <returns>System.String.</returns>
|
||||
string GetServerDescriptionXml(IDictionary<string, string> headers, string serverUuId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the content directory XML.
|
||||
/// </summary>
|
||||
/// <param name="headers">The headers.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
string GetContentDirectoryXml(IDictionary<string, string> headers);
|
||||
|
||||
/// <summary>
|
||||
/// Processes the control request.
|
||||
/// </summary>
|
||||
/// <param name="request">The request.</param>
|
||||
/// <returns>ControlResponse.</returns>
|
||||
ControlResponse ProcessControlRequest(ControlRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the icon.
|
||||
/// </summary>
|
||||
|
||||
47
MediaBrowser.Controller/Dlna/IEventManager.cs
Normal file
47
MediaBrowser.Controller/Dlna/IEventManager.cs
Normal file
@@ -0,0 +1,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);
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,10 @@
|
||||
<Compile Include="Collections\ICollectionManager.cs" />
|
||||
<Compile Include="Dlna\ControlRequest.cs" />
|
||||
<Compile Include="Dlna\DlnaIconResponse.cs" />
|
||||
<Compile Include="Dlna\EventSubscriptionResponse.cs" />
|
||||
<Compile Include="Dlna\IContentDirectory.cs" />
|
||||
<Compile Include="Dlna\IDlnaManager.cs" />
|
||||
<Compile Include="Dlna\IEventManager.cs" />
|
||||
<Compile Include="Drawing\IImageProcessor.cs" />
|
||||
<Compile Include="Drawing\ImageFormat.cs" />
|
||||
<Compile Include="Drawing\ImageProcessingOptions.cs" />
|
||||
|
||||
Reference in New Issue
Block a user