aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Dlna/ConnectionManager/ServiceActionListBuilder.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/ServiceActionListBuilder.cs
parentad3c30c14535780fcbd11b049603991e8d3cfe9e (diff)
added upnp ConnectionManager.cs
Diffstat (limited to 'MediaBrowser.Dlna/ConnectionManager/ServiceActionListBuilder.cs')
-rw-r--r--MediaBrowser.Dlna/ConnectionManager/ServiceActionListBuilder.cs205
1 files changed, 205 insertions, 0 deletions
diff --git a/MediaBrowser.Dlna/ConnectionManager/ServiceActionListBuilder.cs b/MediaBrowser.Dlna/ConnectionManager/ServiceActionListBuilder.cs
new file mode 100644
index 000000000..9dbd4e0e2
--- /dev/null
+++ b/MediaBrowser.Dlna/ConnectionManager/ServiceActionListBuilder.cs
@@ -0,0 +1,205 @@
+using MediaBrowser.Dlna.Common;
+using System.Collections.Generic;
+
+namespace MediaBrowser.Dlna.ConnectionManager
+{
+ public class ServiceActionListBuilder
+ {
+ public IEnumerable<ServiceAction> GetActions()
+ {
+ var list = new List<ServiceAction>
+ {
+ GetCurrentConnectionInfo(),
+ GetProtocolInfo(),
+ GetCurrentConnectionIDs(),
+ ConnectionComplete(),
+ PrepareForConnection()
+ };
+
+ return list;
+ }
+
+ private ServiceAction PrepareForConnection()
+ {
+ var action = new ServiceAction
+ {
+ Name = "PrepareForConnection"
+ };
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "RemoteProtocolInfo",
+ Direction = "in",
+ RelatedStateVariable = "A_ARG_TYPE_ProtocolInfo"
+ });
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "PeerConnectionManager",
+ Direction = "in",
+ RelatedStateVariable = "A_ARG_TYPE_ConnectionManager"
+ });
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "PeerConnectionID",
+ Direction = "in",
+ RelatedStateVariable = "A_ARG_TYPE_ConnectionID"
+ });
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "Direction",
+ Direction = "in",
+ RelatedStateVariable = "A_ARG_TYPE_Direction"
+ });
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "ConnectionID",
+ Direction = "out",
+ RelatedStateVariable = "A_ARG_TYPE_ConnectionID"
+ });
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "AVTransportID",
+ Direction = "out",
+ RelatedStateVariable = "A_ARG_TYPE_AVTransportID"
+ });
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "RcsID",
+ Direction = "out",
+ RelatedStateVariable = "A_ARG_TYPE_RcsID"
+ });
+
+ return action;
+ }
+
+ private ServiceAction GetCurrentConnectionInfo()
+ {
+ var action = new ServiceAction
+ {
+ Name = "GetCurrentConnectionInfo"
+ };
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "ConnectionID",
+ Direction = "in",
+ RelatedStateVariable = "A_ARG_TYPE_ConnectionID"
+ });
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "RcsID",
+ Direction = "out",
+ RelatedStateVariable = "A_ARG_TYPE_RcsID"
+ });
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "AVTransportID",
+ Direction = "out",
+ RelatedStateVariable = "A_ARG_TYPE_AVTransportID"
+ });
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "ProtocolInfo",
+ Direction = "out",
+ RelatedStateVariable = "A_ARG_TYPE_ProtocolInfo"
+ });
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "PeerConnectionManager",
+ Direction = "out",
+ RelatedStateVariable = "A_ARG_TYPE_ConnectionManager"
+ });
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "PeerConnectionID",
+ Direction = "out",
+ RelatedStateVariable = "A_ARG_TYPE_ConnectionID"
+ });
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "Direction",
+ Direction = "out",
+ RelatedStateVariable = "A_ARG_TYPE_Direction"
+ });
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "Status",
+ Direction = "out",
+ RelatedStateVariable = "A_ARG_TYPE_ConnectionStatus"
+ });
+
+ return action;
+ }
+
+ private ServiceAction GetProtocolInfo()
+ {
+ var action = new ServiceAction
+ {
+ Name = "GetProtocolInfo"
+ };
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "Source",
+ Direction = "out",
+ RelatedStateVariable = "SourceProtocolInfo"
+ });
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "Sink",
+ Direction = "out",
+ RelatedStateVariable = "SinkProtocolInfo"
+ });
+
+ return action;
+ }
+
+ private ServiceAction GetCurrentConnectionIDs()
+ {
+ var action = new ServiceAction
+ {
+ Name = "GetCurrentConnectionIDs"
+ };
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "ConnectionIDs",
+ Direction = "out",
+ RelatedStateVariable = "CurrentConnectionIDs"
+ });
+
+ return action;
+ }
+
+ private ServiceAction ConnectionComplete()
+ {
+ var action = new ServiceAction
+ {
+ Name = "ConnectionComplete"
+ };
+
+ action.ArgumentList.Add(new Argument
+ {
+ Name = "ConnectionID",
+ Direction = "in",
+ RelatedStateVariable = "A_ARG_TYPE_ConnectionID"
+ });
+
+ return action;
+ }
+ }
+}