aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-05-12 14:19:33 -0400
committerGitHub <noreply@github.com>2017-05-12 14:19:33 -0400
commit1a6ee3d48aec8aa592ea2b0aab9560292ce717d6 (patch)
tree558b953b1e01a16bd47d902c841cc747a50e0ae7 /MediaBrowser.Model
parent65db32b1f878cd478e9f4b2b4c988890a7ca47c9 (diff)
parent3cdb75190d457cbb3bed91bf79bfb4816cad29e2 (diff)
Merge pull request #2633 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs1
-rw-r--r--MediaBrowser.Model/Drawing/ImageSize.cs6
-rw-r--r--MediaBrowser.Model/IO/IFileSystem.cs47
-rw-r--r--MediaBrowser.Model/Services/IRequest.cs2
4 files changed, 55 insertions, 1 deletions
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index 838111a38..60bbf6240 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -55,6 +55,7 @@ namespace MediaBrowser.Model.Configuration
/// </summary>
/// <value>The value pointing to the file system where the ssl certiifcate is located..</value>
public string CertificatePath { get; set; }
+ public string CertificatePassword { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is port authorized.
diff --git a/MediaBrowser.Model/Drawing/ImageSize.cs b/MediaBrowser.Model/Drawing/ImageSize.cs
index 8cf09da18..c2b0291bd 100644
--- a/MediaBrowser.Model/Drawing/ImageSize.cs
+++ b/MediaBrowser.Model/Drawing/ImageSize.cs
@@ -61,6 +61,12 @@ namespace MediaBrowser.Model.Drawing
_height = height;
}
+ public ImageSize(double width, double height)
+ {
+ _width = width;
+ _height = height;
+ }
+
private void ParseValue(string value)
{
if (!string.IsNullOrEmpty(value))
diff --git a/MediaBrowser.Model/IO/IFileSystem.cs b/MediaBrowser.Model/IO/IFileSystem.cs
index 26de9332e..ea6b04824 100644
--- a/MediaBrowser.Model/IO/IFileSystem.cs
+++ b/MediaBrowser.Model/IO/IFileSystem.cs
@@ -108,6 +108,8 @@ namespace MediaBrowser.Model.IO
/// <returns>FileStream.</returns>
Stream GetFileStream(string path, FileOpenMode mode, FileAccessMode access, FileShareMode share, bool isAsync = false);
+ Stream GetFileStream(string path, FileOpenMode mode, FileAccessMode access, FileShareMode share, FileOpenOptions fileOpenOptions);
+
/// <summary>
/// Opens the read.
/// </summary>
@@ -311,7 +313,8 @@ namespace MediaBrowser.Model.IO
IEnumerable<string> GetFileSystemEntryPaths(string path, bool recursive = false);
void SetHidden(string path, bool isHidden);
- void SetReadOnly(string path, bool isHidden);
+ void SetReadOnly(string path, bool readOnly);
+ void SetAttributes(string path, bool isHidden, bool readOnly);
char DirectorySeparatorChar { get; }
@@ -402,4 +405,46 @@ namespace MediaBrowser.Model.IO
ReadWrite = 3
}
+ //
+ // Summary:
+ // Represents advanced options for creating a System.IO.FileStream object.
+ [Flags]
+ public enum FileOpenOptions
+ {
+ //
+ // Summary:
+ // Indicates that the system should write through any intermediate cache and go
+ // directly to disk.
+ WriteThrough = int.MinValue,
+ //
+ // Summary:
+ // Indicates that no additional options should be used when creating a System.IO.FileStream
+ // object.
+ None = 0,
+ //
+ // Summary:
+ // Indicates that a file is encrypted and can be decrypted only by using the same
+ // user account used for encryption.
+ Encrypted = 16384,
+ //
+ // Summary:
+ // Indicates that a file is automatically deleted when it is no longer in use.
+ DeleteOnClose = 67108864,
+ //
+ // Summary:
+ // Indicates that the file is to be accessed sequentially from beginning to end.
+ // The system can use this as a hint to optimize file caching. If an application
+ // moves the file pointer for random access, optimum caching may not occur; however,
+ // correct operation is still guaranteed.
+ SequentialScan = 134217728,
+ //
+ // Summary:
+ // Indicates that the file is accessed randomly. The system can use this as a hint
+ // to optimize file caching.
+ RandomAccess = 268435456,
+ //
+ // Summary:
+ // Indicates that a file can be used for asynchronous reading and writing.
+ Asynchronous = 1073741824
+ }
}
diff --git a/MediaBrowser.Model/Services/IRequest.cs b/MediaBrowser.Model/Services/IRequest.cs
index 115ba25ce..f056c7410 100644
--- a/MediaBrowser.Model/Services/IRequest.cs
+++ b/MediaBrowser.Model/Services/IRequest.cs
@@ -155,6 +155,8 @@ namespace MediaBrowser.Model.Services
//Add Metadata to Response
Dictionary<string, object> Items { get; }
+ QueryParamCollection Headers { get; }
+
Task TransmitFile(string path, long offset, long count, FileShareMode fileShareMode, CancellationToken cancellationToken);
}
}