2020-01-22 13:00:07 -07:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2019-01-13 12:16:19 -07:00
|
|
|
using System.Collections.Generic;
|
2019-01-06 13:50:43 -07:00
|
|
|
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.ContentDirectory
|
2016-10-29 15:22:20 -07:00
|
|
|
{
|
2020-09-13 06:31:12 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="ContentDirectoryXmlBuilder" />.
|
|
|
|
/// </summary>
|
|
|
|
public static class ContentDirectoryXmlBuilder
|
2016-10-29 15:22:20 -07:00
|
|
|
{
|
2020-09-13 06:31:12 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the ContentDirectory:1 service template.
|
|
|
|
/// See http://upnp.org/specs/av/UPnP-av-ContentDirectory-v1-Service.pdf.
|
|
|
|
/// </summary>
|
|
|
|
/// <returns>An XML description of this service.</returns>
|
|
|
|
public static string GetXml()
|
2016-10-29 15:22:20 -07:00
|
|
|
{
|
2020-09-13 06:31:12 -07:00
|
|
|
return new ServiceXmlBuilder().GetXml(ServiceActionListBuilder.GetActions(), GetStateVariables());
|
2016-10-29 15:22:20 -07:00
|
|
|
}
|
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
/// <summary>
|
|
|
|
/// Get the list of state variables for this invocation.
|
|
|
|
/// </summary>
|
|
|
|
/// <returns>The <see cref="IEnumerable{StateVariable}"/>.</returns>
|
2019-01-06 13:50:43 -07:00
|
|
|
private static IEnumerable<StateVariable> GetStateVariables()
|
2016-10-29 15:22:20 -07:00
|
|
|
{
|
2020-09-13 06:31:12 -07:00
|
|
|
var list = new List<StateVariable>
|
2016-10-29 15:22:20 -07:00
|
|
|
{
|
2020-09-13 06:31:12 -07:00
|
|
|
new StateVariable
|
|
|
|
{
|
|
|
|
Name = "A_ARG_TYPE_Filter",
|
|
|
|
DataType = "string",
|
|
|
|
SendsEvents = false
|
|
|
|
},
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
new StateVariable
|
|
|
|
{
|
|
|
|
Name = "A_ARG_TYPE_SortCriteria",
|
|
|
|
DataType = "string",
|
|
|
|
SendsEvents = false
|
|
|
|
},
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
new StateVariable
|
|
|
|
{
|
|
|
|
Name = "A_ARG_TYPE_Index",
|
|
|
|
DataType = "ui4",
|
|
|
|
SendsEvents = false
|
|
|
|
},
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
new StateVariable
|
|
|
|
{
|
|
|
|
Name = "A_ARG_TYPE_Count",
|
|
|
|
DataType = "ui4",
|
|
|
|
SendsEvents = false
|
|
|
|
},
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
new StateVariable
|
|
|
|
{
|
|
|
|
Name = "A_ARG_TYPE_UpdateID",
|
|
|
|
DataType = "ui4",
|
|
|
|
SendsEvents = false
|
|
|
|
},
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
new StateVariable
|
|
|
|
{
|
|
|
|
Name = "SearchCapabilities",
|
|
|
|
DataType = "string",
|
|
|
|
SendsEvents = false
|
|
|
|
},
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
new StateVariable
|
|
|
|
{
|
|
|
|
Name = "SortCapabilities",
|
|
|
|
DataType = "string",
|
|
|
|
SendsEvents = false
|
|
|
|
},
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
new StateVariable
|
|
|
|
{
|
|
|
|
Name = "SystemUpdateID",
|
|
|
|
DataType = "ui4",
|
|
|
|
SendsEvents = true
|
|
|
|
},
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
new StateVariable
|
|
|
|
{
|
|
|
|
Name = "A_ARG_TYPE_SearchCriteria",
|
|
|
|
DataType = "string",
|
|
|
|
SendsEvents = false
|
|
|
|
},
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
new StateVariable
|
|
|
|
{
|
|
|
|
Name = "A_ARG_TYPE_Result",
|
|
|
|
DataType = "string",
|
|
|
|
SendsEvents = false
|
|
|
|
},
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
new StateVariable
|
|
|
|
{
|
|
|
|
Name = "A_ARG_TYPE_ObjectID",
|
|
|
|
DataType = "string",
|
|
|
|
SendsEvents = false
|
|
|
|
},
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
new StateVariable
|
|
|
|
{
|
|
|
|
Name = "A_ARG_TYPE_BrowseFlag",
|
|
|
|
DataType = "string",
|
|
|
|
SendsEvents = false,
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
AllowedValues = new[]
|
2016-10-29 15:22:20 -07:00
|
|
|
{
|
|
|
|
"BrowseMetadata",
|
|
|
|
"BrowseDirectChildren"
|
|
|
|
}
|
2020-09-13 06:31:12 -07:00
|
|
|
},
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
new StateVariable
|
|
|
|
{
|
|
|
|
Name = "A_ARG_TYPE_BrowseLetter",
|
|
|
|
DataType = "string",
|
|
|
|
SendsEvents = false
|
|
|
|
},
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
new StateVariable
|
|
|
|
{
|
|
|
|
Name = "A_ARG_TYPE_CategoryType",
|
|
|
|
DataType = "ui4",
|
|
|
|
SendsEvents = false
|
|
|
|
},
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
new StateVariable
|
|
|
|
{
|
|
|
|
Name = "A_ARG_TYPE_RID",
|
|
|
|
DataType = "ui4",
|
|
|
|
SendsEvents = false
|
|
|
|
},
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
new StateVariable
|
|
|
|
{
|
|
|
|
Name = "A_ARG_TYPE_PosSec",
|
|
|
|
DataType = "ui4",
|
|
|
|
SendsEvents = false
|
|
|
|
},
|
2016-10-29 15:22:20 -07:00
|
|
|
|
2020-09-13 06:31:12 -07:00
|
|
|
new StateVariable
|
|
|
|
{
|
|
|
|
Name = "A_ARG_TYPE_Featurelist",
|
|
|
|
DataType = "string",
|
|
|
|
SendsEvents = false
|
|
|
|
}
|
|
|
|
};
|
2016-10-29 15:22:20 -07:00
|
|
|
|
|
|
|
return list;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|