2020-01-22 13:00:07 -07:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
#pragma warning disable SA1600
|
|
|
|
|
2020-01-21 09:59:41 -07:00
|
|
|
using System.Threading.Tasks;
|
2016-10-29 15:34:54 -07:00
|
|
|
using Emby.Dlna.Service;
|
2019-01-13 12:16:19 -07:00
|
|
|
using MediaBrowser.Common.Net;
|
|
|
|
using MediaBrowser.Controller.Configuration;
|
|
|
|
using Microsoft.Extensions.Logging;
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2016-10-29 15:34:54 -07:00
|
|
|
namespace Emby.Dlna.MediaReceiverRegistrar
|
2016-10-29 15:22:20 -07:00
|
|
|
{
|
2017-09-05 12:49:02 -07:00
|
|
|
public class MediaReceiverRegistrar : BaseService, IMediaReceiverRegistrar
|
2016-10-29 15:22:20 -07:00
|
|
|
{
|
|
|
|
private readonly IServerConfigurationManager _config;
|
|
|
|
|
2019-02-01 09:43:31 -07:00
|
|
|
public MediaReceiverRegistrar(ILogger logger, IHttpClient httpClient, IServerConfigurationManager config)
|
2016-10-29 15:22:20 -07:00
|
|
|
: base(logger, httpClient)
|
|
|
|
{
|
|
|
|
_config = config;
|
|
|
|
}
|
|
|
|
|
2020-01-21 09:59:41 -07:00
|
|
|
/// <inheritdoc />
|
2019-02-27 06:23:39 -07:00
|
|
|
public string GetServiceXml()
|
2016-10-29 15:22:20 -07:00
|
|
|
{
|
|
|
|
return new MediaReceiverRegistrarXmlBuilder().GetXml();
|
|
|
|
}
|
|
|
|
|
2020-01-21 09:59:41 -07:00
|
|
|
/// <inheritdoc />
|
|
|
|
public Task<ControlResponse> ProcessControlRequestAsync(ControlRequest request)
|
2016-10-29 15:22:20 -07:00
|
|
|
{
|
|
|
|
return new ControlHandler(
|
|
|
|
_config,
|
2019-02-01 09:43:31 -07:00
|
|
|
Logger)
|
2020-01-21 09:59:41 -07:00
|
|
|
.ProcessControlRequestAsync(request);
|
2016-10-29 15:22:20 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|