diff options
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Dlna/EventSubscriptionResponse.cs | 17 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Dlna/IContentDirectory.cs | 21 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Dlna/IDlnaManager.cs | 14 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Dlna/IEventManager.cs | 47 | ||||
| -rw-r--r-- | MediaBrowser.Controller/MediaBrowser.Controller.csproj | 3 |
5 files changed, 88 insertions, 14 deletions
diff --git a/MediaBrowser.Controller/Dlna/EventSubscriptionResponse.cs b/MediaBrowser.Controller/Dlna/EventSubscriptionResponse.cs new file mode 100644 index 000000000..8b551c2a7 --- /dev/null +++ b/MediaBrowser.Controller/Dlna/EventSubscriptionResponse.cs @@ -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>(); + } + } +} diff --git a/MediaBrowser.Controller/Dlna/IContentDirectory.cs b/MediaBrowser.Controller/Dlna/IContentDirectory.cs new file mode 100644 index 000000000..e48d498df --- /dev/null +++ b/MediaBrowser.Controller/Dlna/IContentDirectory.cs @@ -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); + } +} diff --git a/MediaBrowser.Controller/Dlna/IDlnaManager.cs b/MediaBrowser.Controller/Dlna/IDlnaManager.cs index e9e2aae54..b7a06b368 100644 --- a/MediaBrowser.Controller/Dlna/IDlnaManager.cs +++ b/MediaBrowser.Controller/Dlna/IDlnaManager.cs @@ -65,20 +65,6 @@ namespace MediaBrowser.Controller.Dlna 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> /// <param name="filename">The filename.</param> diff --git a/MediaBrowser.Controller/Dlna/IEventManager.cs b/MediaBrowser.Controller/Dlna/IEventManager.cs new file mode 100644 index 000000000..4abf623a9 --- /dev/null +++ b/MediaBrowser.Controller/Dlna/IEventManager.cs @@ -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); + } +} diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 235c3c1e5..cc3f3d08b 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -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" /> |
