OSDN Git Service

LinGui: make Help->Guide work on windows/mingw
[handbrake-jp/handbrake-jp-git.git] / win / C# / Functions / UpdateCheckInformation.cs
1 /*  UpdateCheckInformation.cs $\r
2     This file is part of the HandBrake source code.\r
3     Homepage: <http://handbrake.fr>.\r
4     It may be used under the terms of the GNU General Public License. */\r
5 \r
6 namespace Handbrake.Functions\r
7 {\r
8     using System;\r
9     using System.Threading;\r
10 \r
11     /// <summary>\r
12     /// Provides information about an update check.\r
13     /// </summary>\r
14     public struct UpdateCheckInformation\r
15     {\r
16         /// <summary>\r
17         /// Gets or sets a value indicating whether a New Version is Available.\r
18         /// </summary>\r
19         public bool NewVersionAvailable { get; set; }\r
20 \r
21         /// <summary>\r
22         /// Gets a value indicating whether an Error Occured.\r
23         /// </summary>\r
24         public bool ErrorOccured\r
25         {\r
26             get { return this.Error != null; }\r
27         }\r
28 \r
29         /// <summary>\r
30         /// Gets or sets information about the new build, if any. This will be null if there is no new verison.\r
31         /// </summary>\r
32         public AppcastReader BuildInformation { get; set; }\r
33 \r
34         /// <summary>\r
35         /// Gets or sets the error that occurred, if any. This will be null if no error occured.\r
36         /// </summary>\r
37         public Exception Error { get; set; }\r
38     }\r
39 \r
40     /// <summary>\r
41     /// Used in EndUpdateCheck() for update checking and the IAsyncResult design pattern.\r
42     /// </summary>\r
43     public class UpdateCheckResult : IAsyncResult\r
44     {\r
45         /// <summary>\r
46         /// Initializes a new instance of the <see cref="UpdateCheckResult"/> class.\r
47         /// </summary>\r
48         /// <param name="asyncState">\r
49         /// The async state.\r
50         /// </param>\r
51         /// <param name="info">\r
52         /// The info.\r
53         /// </param>\r
54         public UpdateCheckResult(object asyncState, UpdateCheckInformation info)\r
55         {\r
56             this.AsyncState = asyncState;\r
57             this.Result = info;\r
58         }\r
59 \r
60         /// <summary>\r
61         /// Gets whether the check was executed in debug mode.\r
62         /// </summary>\r
63         public object AsyncState { get; private set; }\r
64 \r
65         /// <summary>\r
66         /// Gets the result of the update check.\r
67         /// </summary>\r
68         public UpdateCheckInformation Result { get; private set; }\r
69 \r
70         /// <summary>\r
71         /// Gets AsyncWaitHandle.\r
72         /// </summary>\r
73         /// <exception cref="NotImplementedException">\r
74         /// </exception>\r
75         public WaitHandle AsyncWaitHandle\r
76         {\r
77             get { throw new NotImplementedException(); }\r
78         }\r
79 \r
80         /// <summary>\r
81         /// Gets a value indicating whether CompletedSynchronously.\r
82         /// </summary>\r
83         /// <exception cref="NotImplementedException">\r
84         /// </exception>\r
85         public bool CompletedSynchronously\r
86         {\r
87             get { throw new NotImplementedException(); }\r
88         }\r
89 \r
90         /// <summary>\r
91         /// Gets a value indicating whether IsCompleted.\r
92         /// </summary>\r
93         /// <exception cref="NotImplementedException">\r
94         /// </exception>\r
95         public bool IsCompleted\r
96         {\r
97             get { throw new NotImplementedException(); }\r
98         }\r
99     }\r
100 }\r