From 18a6cd629c08add58cd60e550847665e7b7ad705 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 9 Jan 2016 16:27:30 -0500 Subject: [PATCH] add EndPointInfo class --- MediaBrowser.Api/System/SystemService.cs | 11 +++-------- .../MediaBrowser.Model.Portable.csproj | 3 +++ .../MediaBrowser.Model.net35.csproj | 3 +++ MediaBrowser.Model/MediaBrowser.Model.csproj | 1 + MediaBrowser.Model/Net/EndPointInfo.cs | 8 ++++++++ 5 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 MediaBrowser.Model/Net/EndPointInfo.cs diff --git a/MediaBrowser.Api/System/SystemService.cs b/MediaBrowser.Api/System/SystemService.cs index 9b6b6a7d6..2661c245f 100644 --- a/MediaBrowser.Api/System/SystemService.cs +++ b/MediaBrowser.Api/System/SystemService.cs @@ -13,6 +13,7 @@ using System.IO; using System.Linq; using System.Threading.Tasks; using CommonIO; +using MediaBrowser.Model.Net; namespace MediaBrowser.Api.System { @@ -65,7 +66,7 @@ namespace MediaBrowser.Api.System [Route("/System/Endpoint", "GET", Summary = "Gets information about the request endpoint")] [Authenticated] - public class GetEndpointInfo : IReturn + public class GetEndpointInfo : IReturn { public string Endpoint { get; set; } } @@ -210,17 +211,11 @@ namespace MediaBrowser.Api.System public object Get(GetEndpointInfo request) { - return ToOptimizedResult(new EndpointInfo + return ToOptimizedResult(new EndPointInfo { IsLocal = Request.IsLocal, IsInNetwork = _network.IsInLocalNetwork(request.Endpoint ?? Request.RemoteIp) }); } } - - public class EndpointInfo - { - public bool IsLocal { get; set; } - public bool IsInNetwork { get; set; } - } } diff --git a/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj b/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj index 6145983e2..b8c64b643 100644 --- a/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj +++ b/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj @@ -827,6 +827,9 @@ MediaInfo\VideoCodec.cs + + Net\EndPointInfo.cs + Net\HttpException.cs diff --git a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj b/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj index 435c4f50b..e74468eff 100644 --- a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj +++ b/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj @@ -783,6 +783,9 @@ MediaInfo\VideoCodec.cs + + Net\EndPointInfo.cs + Net\HttpException.cs diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index 3664175d8..db278baa1 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -162,6 +162,7 @@ + diff --git a/MediaBrowser.Model/Net/EndPointInfo.cs b/MediaBrowser.Model/Net/EndPointInfo.cs new file mode 100644 index 000000000..5a158e785 --- /dev/null +++ b/MediaBrowser.Model/Net/EndPointInfo.cs @@ -0,0 +1,8 @@ +namespace MediaBrowser.Model.Net +{ + public class EndPointInfo + { + public bool IsLocal { get; set; } + public bool IsInNetwork { get; set; } + } +}