aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Net/StaticResultOptions.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-08-30 10:26:29 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-08-30 10:26:29 -0400
commit33c6c37316b062b9afc1a4b3c8f97b658cb62a70 (patch)
tree9baddcb038f806e0efa903b688aaccaff85fb5d2 /MediaBrowser.Controller/Net/StaticResultOptions.cs
parent6a9dbf6ae85b4e7abcf06f7f29ef9d8b0b890876 (diff)
Adjust transcoding throttling
Diffstat (limited to 'MediaBrowser.Controller/Net/StaticResultOptions.cs')
-rw-r--r--MediaBrowser.Controller/Net/StaticResultOptions.cs42
1 files changed, 42 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Net/StaticResultOptions.cs b/MediaBrowser.Controller/Net/StaticResultOptions.cs
new file mode 100644
index 0000000000..fde08c269d
--- /dev/null
+++ b/MediaBrowser.Controller/Net/StaticResultOptions.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Threading.Tasks;
+
+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 bool Throttle { get; set; }
+ public long ThrottleLimit { get; set; }
+ public long MinThrottlePosition { get; set; }
+
+ public StaticResultOptions()
+ {
+ ResponseHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
+ }
+ }
+
+ public class StaticFileResultOptions : StaticResultOptions
+ {
+ public string Path { get; set; }
+
+ public FileShare FileShare { get; set; }
+
+ public StaticFileResultOptions()
+ {
+ FileShare = FileShare.Read;
+ }
+ }
+}