aboutsummaryrefslogtreecommitdiff
path: root/Emby.Dlna/MediaReceiverRegistrar/ControlHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Dlna/MediaReceiverRegistrar/ControlHandler.cs')
-rw-r--r--Emby.Dlna/MediaReceiverRegistrar/ControlHandler.cs58
1 files changed, 0 insertions, 58 deletions
diff --git a/Emby.Dlna/MediaReceiverRegistrar/ControlHandler.cs b/Emby.Dlna/MediaReceiverRegistrar/ControlHandler.cs
deleted file mode 100644
index d8fb127420..0000000000
--- a/Emby.Dlna/MediaReceiverRegistrar/ControlHandler.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Xml;
-using Emby.Dlna.Service;
-using MediaBrowser.Common.Extensions;
-using MediaBrowser.Controller.Configuration;
-using Microsoft.Extensions.Logging;
-
-namespace Emby.Dlna.MediaReceiverRegistrar
-{
- /// <summary>
- /// Defines the <see cref="ControlHandler" />.
- /// </summary>
- public class ControlHandler : BaseControlHandler
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="ControlHandler"/> class.
- /// </summary>
- /// <param name="config">The <see cref="IServerConfigurationManager"/> for use with the <see cref="ControlHandler"/> instance.</param>
- /// <param name="logger">The <see cref="ILogger"/> for use with the <see cref="ControlHandler"/> instance.</param>
- public ControlHandler(IServerConfigurationManager config, ILogger logger)
- : base(config, logger)
- {
- }
-
- /// <inheritdoc />
- protected override void WriteResult(string methodName, IReadOnlyDictionary<string, string> methodParams, XmlWriter xmlWriter)
- {
- if (string.Equals(methodName, "IsAuthorized", StringComparison.OrdinalIgnoreCase))
- {
- HandleIsAuthorized(xmlWriter);
- return;
- }
-
- if (string.Equals(methodName, "IsValidated", StringComparison.OrdinalIgnoreCase))
- {
- HandleIsValidated(xmlWriter);
- return;
- }
-
- throw new ResourceNotFoundException("Unexpected control request name: " + methodName);
- }
-
- /// <summary>
- /// Records that the handle is authorized in the xml stream.
- /// </summary>
- /// <param name="xmlWriter">The <see cref="XmlWriter"/>.</param>
- private static void HandleIsAuthorized(XmlWriter xmlWriter)
- => xmlWriter.WriteElementString("Result", "1");
-
- /// <summary>
- /// Records that the handle is validated in the xml stream.
- /// </summary>
- /// <param name="xmlWriter">The <see cref="XmlWriter"/>.</param>
- private static void HandleIsValidated(XmlWriter xmlWriter)
- => xmlWriter.WriteElementString("Result", "1");
- }
-}