2016-10-29 22:34:54 +00:00
|
|
|
using Emby.Dlna.Service;
|
2019-01-13 19:16:19 +00:00
|
|
|
using MediaBrowser.Common.Net;
|
|
|
|
using MediaBrowser.Controller.Configuration;
|
|
|
|
using Microsoft.Extensions.Logging;
|
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;
|
|
|
|
|
2019-02-01 16:43:31 +00:00
|
|
|
public MediaReceiverRegistrar(ILogger logger, IHttpClient httpClient, IServerConfigurationManager config)
|
2016-10-29 22:22:20 +00:00
|
|
|
: base(logger, httpClient)
|
|
|
|
{
|
|
|
|
_config = config;
|
|
|
|
}
|
|
|
|
|
2019-02-27 13:23:39 +00:00
|
|
|
public string GetServiceXml()
|
2016-10-29 22:22:20 +00:00
|
|
|
{
|
|
|
|
return new MediaReceiverRegistrarXmlBuilder().GetXml();
|
|
|
|
}
|
|
|
|
|
|
|
|
public ControlResponse ProcessControlRequest(ControlRequest request)
|
|
|
|
{
|
|
|
|
return new ControlHandler(
|
|
|
|
_config,
|
2019-02-01 16:43:31 +00:00
|
|
|
Logger)
|
2016-10-29 22:22:20 +00:00
|
|
|
.ProcessControlRequest(request);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|