jellyfin/Emby.Dlna/MediaReceiverRegistrar/MediaReceiverRegistrarXmlBuilder.cs

91 lines
2.8 KiB
C#
Raw Normal View History

2019-01-13 12:16:19 -07:00
using System.Collections.Generic;
using Emby.Dlna.Common;
2016-10-29 15:34:54 -07:00
using Emby.Dlna.Service;
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
{
2020-09-13 06:36:10 -07:00
/// <summary>
/// Defines the <see cref="MediaReceiverRegistrarXmlBuilder" />.
/// See https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-drmnd/5d37515e-7a63-4709-8258-8fd4e0ed4482.
/// </summary>
public static class MediaReceiverRegistrarXmlBuilder
2016-10-29 15:22:20 -07:00
{
2020-09-13 06:36:10 -07:00
/// <summary>
/// Retrieves an XML description of the X_MS_MediaReceiverRegistrar.
/// </summary>
/// <returns>An XML representation of this service.</returns>
public static string GetXml()
2016-10-29 15:22:20 -07:00
{
2020-09-13 06:36:10 -07:00
return new ServiceXmlBuilder().GetXml(ServiceActionListBuilder.GetActions(), GetStateVariables());
2016-10-29 15:22:20 -07:00
}
2020-09-13 06:36:10 -07:00
/// <summary>
/// The a list of all the state variables for this invocation.
/// </summary>
/// <returns>The <see cref="IEnumerable{StateVariable}"/>.</returns>
private static IEnumerable<StateVariable> GetStateVariables()
2016-10-29 15:22:20 -07:00
{
2020-09-13 06:36:10 -07:00
var list = new List<StateVariable>
2016-10-29 15:22:20 -07:00
{
2020-09-13 06:36:10 -07:00
new StateVariable
{
Name = "AuthorizationGrantedUpdateID",
DataType = "ui4",
SendsEvents = true
},
2016-10-29 15:22:20 -07:00
2020-09-13 06:36:10 -07:00
new StateVariable
{
Name = "A_ARG_TYPE_DeviceID",
DataType = "string",
SendsEvents = false
},
2016-10-29 15:22:20 -07:00
2020-09-13 06:36:10 -07:00
new StateVariable
{
Name = "AuthorizationDeniedUpdateID",
DataType = "ui4",
SendsEvents = true
},
2016-10-29 15:22:20 -07:00
2020-09-13 06:36:10 -07:00
new StateVariable
{
Name = "ValidationSucceededUpdateID",
DataType = "ui4",
SendsEvents = true
},
2016-10-29 15:22:20 -07:00
2020-09-13 06:36:10 -07:00
new StateVariable
{
Name = "A_ARG_TYPE_RegistrationRespMsg",
DataType = "bin.base64",
SendsEvents = false
},
2016-10-29 15:22:20 -07:00
2020-09-13 06:36:10 -07:00
new StateVariable
{
Name = "A_ARG_TYPE_RegistrationReqMsg",
DataType = "bin.base64",
SendsEvents = false
},
2016-10-29 15:22:20 -07:00
2020-09-13 06:36:10 -07:00
new StateVariable
{
Name = "ValidationRevokedUpdateID",
DataType = "ui4",
SendsEvents = true
},
2016-10-29 15:22:20 -07:00
2020-09-13 06:36:10 -07:00
new StateVariable
{
Name = "A_ARG_TYPE_Result",
DataType = "int",
SendsEvents = false
}
};
2016-10-29 15:22:20 -07:00
return list;
}
}
}