move Didl builder

pull/702/head
Luke Pulverenti 11 years ago
parent 62bf617278
commit 6a435d62f5

@ -5,9 +5,9 @@ using System;
using System.Collections.Generic;
using System.Linq;
namespace MediaBrowser.Dlna.PlayTo
namespace MediaBrowser.Dlna.Didl
{
internal class DidlBuilder
public class DidlBuilder
{
const string CRLF = "\r\n";
const string UNKNOWN = "Unknown";

@ -61,7 +61,7 @@
<Compile Include="PlayTo\DeviceEventArgs.cs" />
<Compile Include="PlayTo\DeviceInfo.cs" />
<Compile Include="Common\DeviceService.cs" />
<Compile Include="PlayTo\DidlBuilder.cs" />
<Compile Include="Didl\DidlBuilder.cs" />
<Compile Include="PlayTo\DlnaController.cs" />
<Compile Include="PlayTo\Extensions.cs" />
<Compile Include="PlayTo\PlaylistItem.cs">

@ -7,6 +7,7 @@ using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Controller.Session;
using MediaBrowser.Dlna.Didl;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;

@ -93,15 +93,6 @@ namespace MediaBrowser.Dlna.Server
var deviceId = "fgd";
var env = new XmlDocument();
env.AppendChild(env.CreateXmlDeclaration("1.0", "utf-8", "yes"));
var envelope = env.CreateElement("SOAP-ENV", "Envelope", NS_SOAPENV);
env.AppendChild(envelope);
envelope.SetAttribute("encodingStyle", NS_SOAPENV, "http://schemas.xmlsoap.org/soap/encoding/");
var rbody = env.CreateElement("SOAP-ENV:Body", NS_SOAPENV);
env.DocumentElement.AppendChild(rbody);
IEnumerable<KeyValuePair<string, string>> result;
_logger.Debug("Received control request {0}", method.Name);
@ -125,6 +116,15 @@ namespace MediaBrowser.Dlna.Server
else
throw new ResourceNotFoundException("Unexpected control request name: " + method.LocalName);
var env = new XmlDocument();
env.AppendChild(env.CreateXmlDeclaration("1.0", "utf-8", "yes"));
var envelope = env.CreateElement("SOAP-ENV", "Envelope", NS_SOAPENV);
env.AppendChild(envelope);
envelope.SetAttribute("encodingStyle", NS_SOAPENV, "http://schemas.xmlsoap.org/soap/encoding/");
var rbody = env.CreateElement("SOAP-ENV:Body", NS_SOAPENV);
env.DocumentElement.AppendChild(rbody);
var response = env.CreateElement(String.Format("u:{0}Response", method.LocalName), method.NamespaceURI);
rbody.AppendChild(response);

Loading…
Cancel
Save