removed upnp code

This commit is contained in:
kay.one 2011-03-28 21:23:11 -07:00
parent 82808355c4
commit d4179818cc
5 changed files with 0 additions and 201 deletions

View File

@ -217,13 +217,9 @@
<Compile Include="Providers\Fakes\FakeNotificationProvider.cs" />
<Compile Include="Providers\IMediaFileProvider.cs" />
<Compile Include="Providers\INotificationProvider.cs" />
<Compile Include="Providers\IMediaDiscoveryProvider.cs" />
<Compile Include="Providers\IMediaProvider.cs" />
<Compile Include="Providers\ISyncProvider.cs" />
<Compile Include="Providers\MediaDiscoveryProvider.cs" />
<Compile Include="Providers\MediaFileProvider.cs" />
<Compile Include="Providers\SyncProvider.cs" />
<Compile Include="Providers\XBMCMediaProvider.cs" />
<Compile Include="Model\Notification\ProgressNotification.cs" />
<Compile Include="Providers\NotificationProvider.cs" />
<Compile Include="Providers\ConfigProvider.cs" />

View File

@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NzbDrone.Core.Providers
{
public interface IMediaDiscoveryProvider
{
bool DiscoveredMedia { get; }
List<IMediaProvider> Providers { get; }
}
}

View File

@ -1,35 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NzbDrone.Core.Providers
{
public interface IMediaProvider
{
void Play();
void Play(string Location);
void Play(string Location, bool AddToQueue);
void Pause();
void Stop();
void Next();
void Previous();
void Seek(string RawTime);
void Seek(int Hour, int Minute, int Second);
void Seek(System.TimeSpan SeekTime);
void Queue(string Location);
System.Uri Uri { get; }
string UniqueDeviceName { get; }
OpenSource.UPnP.UPnPDevice Device { get; }
OpenSource.UPnP.AV.CpAVTransport Transport { get; }
string FriendlyName { get; }
DateTime FirstSeen { get; }
DateTime LastSeen { get; }
bool IsActive { get; }
}
}

View File

@ -1,40 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NzbDrone.Core.Providers
{
public class MediaDiscoveryProvider : IMediaDiscoveryProvider
{
#region IMediaDiscoveryProvider Members
public bool DiscoveredMedia
{
get { return (OpenSource.UPnP.AudioVideoDevices.Instance.Devices.Count > 0); }
}
private object _lock = new object();
public List<IMediaProvider> Providers
{
get {
lock (_lock)
{
List<IMediaProvider> list = new List<IMediaProvider>();
foreach (OpenSource.UPnP.IAVDevice device in OpenSource.UPnP.AudioVideoDevices.Instance.Devices)
{
OpenSource.XBMC.XBMCAVDevice xbmc = (device as OpenSource.XBMC.XBMCAVDevice);
if (xbmc != null)
{
XBMCMediaProvider newX = new XBMCMediaProvider(xbmc);
list.Add(newX);
}
}
return list;
}
}
}
#endregion
}
}

View File

@ -1,109 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NzbDrone.Core.Providers
{
public class XBMCMediaProvider : IMediaProvider
{
public OpenSource.XBMC.XBMCAVDevice XBMCDevice{ get; set; }
public XBMCMediaProvider(OpenSource.XBMC.XBMCAVDevice XBMCDevice)
{
this.XBMCDevice = XBMCDevice;
}
#region IAVDevice Members
public DateTime FirstSeen { get { return XBMCDevice.FirstSeen; } }
public DateTime LastSeen { get { return XBMCDevice.LastSeen; } }
public bool IsActive
{
get
{
return XBMCDevice.IsActive;
}
}
public void Play()
{
XBMCDevice.Play();
}
public void Play(string Location)
{
XBMCDevice.Play(Location);
}
public void Play(string Location, bool AddToQueue)
{
XBMCDevice.Play(Location, AddToQueue);
}
public void Stop()
{
XBMCDevice.Stop();
}
public void Next()
{
XBMCDevice.Next();
}
public void Previous()
{
XBMCDevice.Previous();
}
public void Seek(string RawTime)
{
XBMCDevice.Seek(RawTime);
}
public void Seek(int Hour, int Minute, int Second)
{
XBMCDevice.Seek(Hour, Minute, Second);
}
public void Seek(System.TimeSpan SeekTime)
{
XBMCDevice.Seek(SeekTime);
}
public void Queue(string Location)
{
XBMCDevice.Queue(Location);
}
public OpenSource.UPnP.UPnPDevice Device {
get { return XBMCDevice.Device; }
}
public void Pause()
{
XBMCDevice.Pause();
}
public System.Uri Uri
{
get { return XBMCDevice.Uri; }
}
public string UniqueDeviceName
{
get { return XBMCDevice.UniqueDeviceName; }
}
public OpenSource.UPnP.AV.CpAVTransport Transport
{
get
{
return XBMCDevice.Transport;
}
}
public string FriendlyName
{
get
{
return XBMCDevice.FriendlyName;
}
}
#endregion
}
}