diff options
author | sr55 <[email protected]> | 2013-11-19 21:55:44 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-11-19 21:55:44 +0000 |
commit | f83ab26ab8e1d2ce277f0c12f23b5753bf63d763 (patch) | |
tree | f59a860b5a06effcdccc57dfa83629d171536864 /win/CS/HandBrake.ApplicationServices/Model | |
parent | ca8fe7c1fe8abf869d4c53e31124c5f0b1aa8dfa (diff) |
WinGui: Started work on API improvements in the Application services dll. Removing the concept of user settings and replacing it with a Configuration object.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5896 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Model')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Model/HBConfiguration.cs | 27 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs | 29 |
2 files changed, 49 insertions, 7 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/HBConfiguration.cs b/win/CS/HandBrake.ApplicationServices/Model/HBConfiguration.cs new file mode 100644 index 000000000..35d07dcfc --- /dev/null +++ b/win/CS/HandBrake.ApplicationServices/Model/HBConfiguration.cs @@ -0,0 +1,27 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="HBConfiguration.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// HandBrakes Configuration options
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.ApplicationServices.Model
+{
+ /// <summary>
+ /// HandBrakes configuration options
+ /// </summary>
+ public class HBConfiguration
+ {
+ /// <summary>
+ /// Gets or sets a value indicating whether is logging enabled.
+ /// </summary>
+ public bool IsLoggingEnabled { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether is dvd nav disabled.
+ /// </summary>
+ public bool IsDvdNavDisabled { get; set; }
+ }
+}
diff --git a/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs b/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs index 84e9eee9f..68f32011a 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs @@ -38,14 +38,25 @@ namespace HandBrake.ApplicationServices.Model }
/// <summary>
- /// Gets or sets ScannedSource.
+ /// Initializes a new instance of the <see cref="QueueTask"/> class.
/// </summary>
- public Source ScannedSource { get; set; }
+ /// <param name="task">
+ /// The task.
+ /// </param>
+ /// <param name="configuration">
+ /// The configuration.
+ /// </param>
+ public QueueTask(EncodeTask task, HBConfiguration configuration)
+ {
+ this.Task = task;
+ this.Configuration = configuration;
+ this.Status = QueueItemStatus.Waiting;
+ }
/// <summary>
- /// Gets or sets a value indicating whether if this is a user or GUI generated query
+ /// Gets or sets ScannedSource.
/// </summary>
- public bool CustomQuery { get; set; }
+ public Source ScannedSource { get; set; }
/// <summary>
/// Gets or sets Status.
@@ -65,10 +76,15 @@ namespace HandBrake.ApplicationServices.Model }
/// <summary>
- /// Gets or sets the Encode Task.
+ /// Gets the task.
/// </summary>
public EncodeTask Task { get; set; }
+ /// <summary>
+ /// Gets the configuration.
+ /// </summary>
+ public HBConfiguration Configuration { get; set; }
+
#endregion
/// <summary>
@@ -82,7 +98,7 @@ namespace HandBrake.ApplicationServices.Model /// </returns>
protected bool Equals(QueueTask other)
{
- return Equals(this.ScannedSource, other.ScannedSource) && this.CustomQuery.Equals(other.CustomQuery) && Equals(this.Task, other.Task) && this.status == other.status;
+ return Equals(this.ScannedSource, other.ScannedSource) && Equals(this.Task, other.Task) && this.status == other.status;
}
/// <summary>
@@ -125,7 +141,6 @@ namespace HandBrake.ApplicationServices.Model unchecked
{
int hashCode = (this.ScannedSource != null ? this.ScannedSource.GetHashCode() : 0);
- hashCode = (hashCode * 397) ^ this.CustomQuery.GetHashCode();
hashCode = (hashCode * 397) ^ (this.Task != null ? this.Task.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ (int)this.status;
return hashCode;
|