diff options
author | sr55 <[email protected]> | 2012-06-30 14:07:50 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-06-30 14:07:50 +0000 |
commit | ca023df6b2119d7bf29ade5c07f644fdf2de8731 (patch) | |
tree | 6ac3b68670cc9db3876c18239d56f0461ae7953b /win/CS/HandBrakeWPF/Model | |
parent | 4d6d9e007cbfadd9f63860038a8048a2c8da390a (diff) |
WinGui: Refactor the Update service and add a new options tab to deal with updates.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4799 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Model')
-rw-r--r-- | win/CS/HandBrakeWPF/Model/DownloadStatus.cs | 49 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Model/UpdateCheckInformation.cs | 57 |
2 files changed, 106 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Model/DownloadStatus.cs b/win/CS/HandBrakeWPF/Model/DownloadStatus.cs new file mode 100644 index 000000000..8e58a7ecf --- /dev/null +++ b/win/CS/HandBrakeWPF/Model/DownloadStatus.cs @@ -0,0 +1,49 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="DownloadStatus.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>
+// The Progress of a File Download
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Model
+{
+ using System;
+
+ /// <summary>
+ /// The Progress of a File Download
+ /// </summary>
+ public class DownloadStatus
+ {
+ /// <summary>
+ /// Gets or sets BytesRead.
+ /// </summary>
+ public long BytesRead { get; set; }
+
+ /// <summary>
+ /// Gets or sets TotalBytes.
+ /// </summary>
+ public long TotalBytes { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether WasSuccessful.
+ /// </summary>
+ public bool WasSuccessful { get; set; }
+
+ /// <summary>
+ /// Gets or sets Exception.
+ /// </summary>
+ public Exception Exception { get; set; }
+
+ /// <summary>
+ /// Gets or sets Message.
+ /// </summary>
+ public string Message { get; set; }
+
+ /// <summary>
+ /// Gets or sets FilePath.
+ /// </summary>
+ public string FilePath { get; set; }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/Model/UpdateCheckInformation.cs b/win/CS/HandBrakeWPF/Model/UpdateCheckInformation.cs new file mode 100644 index 000000000..bc49a2ee3 --- /dev/null +++ b/win/CS/HandBrakeWPF/Model/UpdateCheckInformation.cs @@ -0,0 +1,57 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="UpdateCheckInformation.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>
+// Provides information about an update check.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Model
+{
+ using System;
+
+ /// <summary>
+ /// Provides information about an update check.
+ /// </summary>
+ public struct UpdateCheckInformation
+ {
+ /// <summary>
+ /// Gets or sets a value indicating whether a New Version is Available.
+ /// </summary>
+ public bool NewVersionAvailable { get; set; }
+
+ /// <summary>
+ /// Gets a value indicating whether an Error Occured.
+ /// </summary>
+ public bool ErrorOccured
+ {
+ get { return this.Error != null; }
+ }
+
+ /// <summary>
+ /// Gets or sets Information about an update to HandBrake
+ /// </summary>
+ public Uri DescriptionUrl { get; set; }
+
+ /// <summary>
+ /// Gets or sets HandBrake's version from the appcast.xml file.
+ /// </summary>
+ public string Version { get; set; }
+
+ /// <summary>
+ /// Gets or sets HandBrake's Build from the appcast.xml file.
+ /// </summary>
+ public string Build { get; set; }
+
+ /// <summary>
+ /// Gets or sets the URL for update file.
+ /// </summary>
+ public string DownloadFile { get; set; }
+
+ /// <summary>
+ /// Gets or sets the error that occurred, if any. This will be null if no error occured.
+ /// </summary>
+ public Exception Error { get; set; }
+ }
+}
|