aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Net/StaticResultOptions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Net/StaticResultOptions.cs')
-rw-r--r--MediaBrowser.Controller/Net/StaticResultOptions.cs41
1 files changed, 41 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Net/StaticResultOptions.cs b/MediaBrowser.Controller/Net/StaticResultOptions.cs
new file mode 100644
index 000000000..1c9b2586d
--- /dev/null
+++ b/MediaBrowser.Controller/Net/StaticResultOptions.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Threading.Tasks;
+
+using MediaBrowser.Model.IO;
+
+namespace MediaBrowser.Controller.Net
+{
+ public class StaticResultOptions
+ {
+ public string ContentType { get; set; }
+ public TimeSpan? CacheDuration { get; set; }
+ public DateTime? DateLastModified { get; set; }
+ public Guid CacheKey { get; set; }
+
+ public Func<Task<Stream>> ContentFactory { get; set; }
+
+ public bool IsHeadRequest { get; set; }
+
+ public IDictionary<string, string> ResponseHeaders { get; set; }
+
+ public Action OnComplete { get; set; }
+ public Action OnError { get; set; }
+
+ public string Path { get; set; }
+ public long? ContentLength { get; set; }
+
+ public FileShareMode FileShare { get; set; }
+
+ public StaticResultOptions()
+ {
+ ResponseHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
+ FileShare = FileShareMode.Read;
+ }
+ }
+
+ public class StaticFileResultOptions : StaticResultOptions
+ {
+ }
+}