jellyfin/Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs

151 lines
3.8 KiB
C#
Raw Normal View History

#pragma warning disable CS1591
2019-01-13 20:16:19 +01:00
using System.Collections.Generic;
using Emby.Dlna.Common;
2016-10-30 00:34:54 +02:00
using Emby.Dlna.Service;
2016-10-30 00:22:20 +02:00
2016-10-30 00:34:54 +02:00
namespace Emby.Dlna.ContentDirectory
2016-10-30 00:22:20 +02:00
{
public class ContentDirectoryXmlBuilder
{
public string GetXml()
{
2020-08-20 17:01:04 +02:00
return new ServiceXmlBuilder().GetXml(
new ServiceActionListBuilder().GetActions(),
2016-10-30 00:22:20 +02:00
GetStateVariables());
}
private static IEnumerable<StateVariable> GetStateVariables()
2016-10-30 00:22:20 +02:00
{
var list = new List<StateVariable>();
list.Add(new StateVariable
{
Name = "A_ARG_TYPE_Filter",
DataType = "string",
SendsEvents = false
});
list.Add(new StateVariable
{
Name = "A_ARG_TYPE_SortCriteria",
DataType = "string",
SendsEvents = false
});
list.Add(new StateVariable
{
Name = "A_ARG_TYPE_Index",
DataType = "ui4",
SendsEvents = false
});
list.Add(new StateVariable
{
Name = "A_ARG_TYPE_Count",
DataType = "ui4",
SendsEvents = false
});
list.Add(new StateVariable
{
Name = "A_ARG_TYPE_UpdateID",
DataType = "ui4",
SendsEvents = false
});
list.Add(new StateVariable
{
Name = "SearchCapabilities",
DataType = "string",
SendsEvents = false
});
list.Add(new StateVariable
{
Name = "SortCapabilities",
DataType = "string",
SendsEvents = false
});
list.Add(new StateVariable
{
Name = "SystemUpdateID",
DataType = "ui4",
SendsEvents = true
});
list.Add(new StateVariable
{
Name = "A_ARG_TYPE_SearchCriteria",
DataType = "string",
SendsEvents = false
});
list.Add(new StateVariable
{
Name = "A_ARG_TYPE_Result",
DataType = "string",
SendsEvents = false
});
list.Add(new StateVariable
{
Name = "A_ARG_TYPE_ObjectID",
DataType = "string",
SendsEvents = false
});
list.Add(new StateVariable
{
Name = "A_ARG_TYPE_BrowseFlag",
DataType = "string",
SendsEvents = false,
2020-08-20 17:01:04 +02:00
AllowedValues = new[]
2016-10-30 00:22:20 +02:00
{
"BrowseMetadata",
"BrowseDirectChildren"
}
});
list.Add(new StateVariable
{
Name = "A_ARG_TYPE_BrowseLetter",
DataType = "string",
SendsEvents = false
});
list.Add(new StateVariable
{
Name = "A_ARG_TYPE_CategoryType",
DataType = "ui4",
SendsEvents = false
});
list.Add(new StateVariable
{
Name = "A_ARG_TYPE_RID",
DataType = "ui4",
SendsEvents = false
});
list.Add(new StateVariable
{
Name = "A_ARG_TYPE_PosSec",
DataType = "ui4",
SendsEvents = false
});
list.Add(new StateVariable
{
Name = "A_ARG_TYPE_Featurelist",
DataType = "string",
SendsEvents = false
});
return list;
}
}
}