jellyfin/Emby.Dlna/MediaReceiverRegistrar/MediaReceiverRegistrar.cs

38 lines
1.2 KiB
C#
Raw Normal View History

2016-10-29 22:22:20 +00:00
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Dlna;
2016-10-29 22:34:54 +00:00
using Emby.Dlna.Service;
2016-10-29 22:22:20 +00:00
using MediaBrowser.Model.Logging;
using System;
using System.Collections.Generic;
2016-11-04 08:31:05 +00:00
using MediaBrowser.Model.Xml;
2016-10-29 22:22:20 +00:00
2016-10-29 22:34:54 +00:00
namespace Emby.Dlna.MediaReceiverRegistrar
2016-10-29 22:22:20 +00:00
{
2017-09-05 19:49:02 +00:00
public class MediaReceiverRegistrar : BaseService, IMediaReceiverRegistrar
2016-10-29 22:22:20 +00:00
{
private readonly IServerConfigurationManager _config;
2016-11-04 08:31:05 +00:00
protected readonly IXmlReaderSettingsFactory XmlReaderSettingsFactory;
2016-10-29 22:22:20 +00:00
2016-11-04 08:31:05 +00:00
public MediaReceiverRegistrar(ILogger logger, IHttpClient httpClient, IServerConfigurationManager config, IXmlReaderSettingsFactory xmlReaderSettingsFactory)
2016-10-29 22:22:20 +00:00
: base(logger, httpClient)
{
_config = config;
2016-11-04 08:31:05 +00:00
XmlReaderSettingsFactory = xmlReaderSettingsFactory;
2016-10-29 22:22:20 +00:00
}
public string GetServiceXml(IDictionary<string, string> headers)
{
return new MediaReceiverRegistrarXmlBuilder().GetXml();
}
public ControlResponse ProcessControlRequest(ControlRequest request)
{
return new ControlHandler(
_config,
2016-11-04 08:31:05 +00:00
Logger, XmlReaderSettingsFactory)
2016-10-29 22:22:20 +00:00
.ProcessControlRequest(request);
}
}
}