jellyfin-server/MediaBrowser.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs

148 lines
3.8 KiB
C#
Raw Normal View History

2014-04-10 15:06:54 +00:00
using MediaBrowser.Dlna.Common;
2014-05-21 00:56:24 +00:00
using MediaBrowser.Dlna.Service;
2014-04-10 15:06:54 +00:00
using System.Collections.Generic;
2014-05-21 00:56:24 +00:00
namespace MediaBrowser.Dlna.ContentDirectory
2014-04-10 15:06:54 +00:00
{
public class ContentDirectoryXmlBuilder
{
public string GetXml()
{
2014-05-21 00:56:24 +00:00
return new ServiceXmlBuilder().GetXml(new ServiceActionListBuilder().GetActions(),
GetStateVariables());
2014-04-10 15:06:54 +00:00
}
private IEnumerable<StateVariable> GetStateVariables()
{
var list = new List<StateVariable>();
2014-05-16 17:11:07 +00:00
list.Add(new StateVariable
{
Name = "A_ARG_TYPE_Filter",
DataType = "string",
SendsEvents = false
});
2014-04-10 15:06:54 +00:00
list.Add(new StateVariable
{
Name = "A_ARG_TYPE_SortCriteria",
DataType = "string",
SendsEvents = false
});
list.Add(new StateVariable
{
2014-05-16 17:11:07 +00:00
Name = "A_ARG_TYPE_Index",
2014-04-10 15:06:54 +00:00
DataType = "ui4",
SendsEvents = false
});
list.Add(new StateVariable
{
2014-05-16 17:11:07 +00:00
Name = "A_ARG_TYPE_Count",
DataType = "ui4",
2014-04-10 15:06:54 +00:00
SendsEvents = false
});
list.Add(new StateVariable
{
2014-05-16 17:11:07 +00:00
Name = "A_ARG_TYPE_UpdateID",
DataType = "ui4",
2014-04-10 15:06:54 +00:00
SendsEvents = false
});
list.Add(new StateVariable
{
2014-05-16 17:11:07 +00:00
Name = "SearchCapabilities",
2014-04-10 15:06:54 +00:00
DataType = "string",
SendsEvents = false
});
list.Add(new StateVariable
{
2014-05-16 17:11:07 +00:00
Name = "SortCapabilities",
DataType = "string",
2014-04-10 15:06:54 +00:00
SendsEvents = false
});
list.Add(new StateVariable
{
2014-05-16 17:11:07 +00:00
Name = "SystemUpdateID",
DataType = "ui4",
SendsEvents = true
2014-04-10 15:06:54 +00:00
});
list.Add(new StateVariable
{
2014-05-16 17:11:07 +00:00
Name = "A_ARG_TYPE_SearchCriteria",
2014-04-10 15:06:54 +00:00
DataType = "string",
SendsEvents = false
});
list.Add(new StateVariable
{
2014-05-16 17:11:07 +00:00
Name = "A_ARG_TYPE_Result",
2014-04-10 15:06:54 +00:00
DataType = "string",
SendsEvents = false
});
list.Add(new StateVariable
{
2014-05-16 17:11:07 +00:00
Name = "A_ARG_TYPE_ObjectID",
DataType = "string",
2014-04-10 15:06:54 +00:00
SendsEvents = false
});
list.Add(new StateVariable
{
Name = "A_ARG_TYPE_BrowseFlag",
DataType = "string",
SendsEvents = false,
AllowedValues = new List<string>
{
"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
});
2014-05-21 00:56:24 +00:00
return list;
2014-04-10 15:06:54 +00:00
}
}
}