aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Dlna/ConnectionManager/ConnectionManagerXmlBuilder.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-20 20:56:24 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-20 20:56:24 -0400
commit1774e5b1ac9f809fd97c1d95666fc563afa87914 (patch)
treef0c2c3f84de84def4f9e80d1f187069e4763f496 /MediaBrowser.Dlna/ConnectionManager/ConnectionManagerXmlBuilder.cs
parentad3c30c14535780fcbd11b049603991e8d3cfe9e (diff)
added upnp ConnectionManager.cs
Diffstat (limited to 'MediaBrowser.Dlna/ConnectionManager/ConnectionManagerXmlBuilder.cs')
-rw-r--r--MediaBrowser.Dlna/ConnectionManager/ConnectionManagerXmlBuilder.cs106
1 files changed, 106 insertions, 0 deletions
diff --git a/MediaBrowser.Dlna/ConnectionManager/ConnectionManagerXmlBuilder.cs b/MediaBrowser.Dlna/ConnectionManager/ConnectionManagerXmlBuilder.cs
new file mode 100644
index 0000000000..4efa111591
--- /dev/null
+++ b/MediaBrowser.Dlna/ConnectionManager/ConnectionManagerXmlBuilder.cs
@@ -0,0 +1,106 @@
+using MediaBrowser.Dlna.Common;
+using MediaBrowser.Dlna.Service;
+using System.Collections.Generic;
+
+namespace MediaBrowser.Dlna.ConnectionManager
+{
+ public class ConnectionManagerXmlBuilder
+ {
+ public string GetXml()
+ {
+ return new ServiceXmlBuilder().GetXml(new ServiceActionListBuilder().GetActions(), GetStateVariables());
+ }
+
+ private IEnumerable<StateVariable> GetStateVariables()
+ {
+ var list = new List<StateVariable>();
+
+ list.Add(new StateVariable
+ {
+ Name = "SourceProtocolInfo",
+ DataType = "string",
+ SendsEvents = true
+ });
+
+ list.Add(new StateVariable
+ {
+ Name = "SinkProtocolInfo",
+ DataType = "string",
+ SendsEvents = true
+ });
+
+ list.Add(new StateVariable
+ {
+ Name = "CurrentConnectionIDs",
+ DataType = "string",
+ SendsEvents = true
+ });
+
+ list.Add(new StateVariable
+ {
+ Name = "A_ARG_TYPE_ConnectionStatus",
+ DataType = "string",
+ SendsEvents = false,
+
+ AllowedValues = new List<string>
+ {
+ "OK",
+ "ContentFormatMismatch",
+ "InsufficientBandwidth",
+ "UnreliableChannel",
+ "Unknown"
+ }
+ });
+
+ list.Add(new StateVariable
+ {
+ Name = "A_ARG_TYPE_ConnectionManager",
+ DataType = "string",
+ SendsEvents = false
+ });
+
+ list.Add(new StateVariable
+ {
+ Name = "A_ARG_TYPE_Direction",
+ DataType = "string",
+ SendsEvents = false,
+
+ AllowedValues = new List<string>
+ {
+ "Output",
+ "Input"
+ }
+ });
+
+ list.Add(new StateVariable
+ {
+ Name = "A_ARG_TYPE_ProtocolInfo",
+ DataType = "string",
+ SendsEvents = false
+ });
+
+ list.Add(new StateVariable
+ {
+ Name = "A_ARG_TYPE_ConnectionID",
+ DataType = "ui4",
+ SendsEvents = false
+ });
+
+ list.Add(new StateVariable
+ {
+ Name = "A_ARG_TYPE_AVTransportID",
+ DataType = "ui4",
+ SendsEvents = false
+ });
+
+ list.Add(new StateVariable
+ {
+ Name = "A_ARG_TYPE_RcsID",
+ DataType = "ui4",
+ SendsEvents = false
+ });
+
+ return list;
+ }
+ }
+}