diff options
Diffstat (limited to 'MediaBrowser.Model/Services/IRequest.cs')
| -rw-r--r-- | MediaBrowser.Model/Services/IRequest.cs | 47 |
1 files changed, 5 insertions, 42 deletions
diff --git a/MediaBrowser.Model/Services/IRequest.cs b/MediaBrowser.Model/Services/IRequest.cs index ac9b981b9..4f6ddb476 100644 --- a/MediaBrowser.Model/Services/IRequest.cs +++ b/MediaBrowser.Model/Services/IRequest.cs @@ -1,20 +1,15 @@ using System; using System.Collections.Generic; using System.IO; -using System.Net; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.IO; +using Microsoft.AspNetCore.Http; namespace MediaBrowser.Model.Services { public interface IRequest { - /// <summary> - /// The underlying ASP.NET or HttpListener HttpRequest - /// </summary> - object OriginalRequest { get; } - IResponse Response { get; } /// <summary> @@ -41,8 +36,6 @@ namespace MediaBrowser.Model.Services string UserAgent { get; } - IDictionary<string, Cookie> Cookies { get; } - /// <summary> /// The expected Response ContentType for this request /// </summary> @@ -53,9 +46,9 @@ namespace MediaBrowser.Model.Services /// </summary> Dictionary<string, object> Items { get; } - QueryParamCollection Headers { get; } + IHeaderDictionary Headers { get; } - QueryParamCollection QueryString { get; } + IQueryCollection QueryString { get; } Task<QueryParamCollection> GetFormData(); @@ -64,11 +57,6 @@ namespace MediaBrowser.Model.Services string AbsoluteUri { get; } /// <summary> - /// The Remote Ip as reported by Request.UserHostAddress - /// </summary> - string UserHostAddress { get; } - - /// <summary> /// The Remote Ip as reported by X-Forwarded-For, X-Real-IP or Request.UserHostAddress /// </summary> string RemoteIp { get; } @@ -78,11 +66,6 @@ namespace MediaBrowser.Model.Services /// </summary> string Authorization { get; } - /// <summary> - /// e.g. is https or not - /// </summary> - bool IsSecureConnection { get; } - string[] AcceptTypes { get; } string PathInfo { get; } @@ -118,7 +101,7 @@ namespace MediaBrowser.Model.Services public interface IResponse { - IRequest Request { get; } + HttpResponse OriginalResponse { get; } int StatusCode { get; set; } @@ -128,31 +111,11 @@ namespace MediaBrowser.Model.Services void AddHeader(string name, string value); - string GetHeader(string name); - void Redirect(string url); Stream OutputStream { get; } - /// <summary> - /// Signal that this response has been handled and no more processing should be done. - /// When used in a request or response filter, no more filters or processing is done on this request. - /// </summary> - void Close(); - - /// <summary> - /// Gets a value indicating whether this instance is closed. - /// </summary> - bool IsClosed { get; } - - void SetContentLength(long contentLength); - - //Add Metadata to Response - Dictionary<string, object> Items { get; } - - QueryParamCollection Headers { get; } - - Task TransmitFile(string path, long offset, long count, FileShareMode fileShareMode, CancellationToken cancellationToken); + Task TransmitFile(string path, long offset, long count, FileShareMode fileShareMode, IFileSystem fileSystem, IStreamHelper streamHelper, CancellationToken cancellationToken); bool SendChunked { get; set; } } |
