using System;
using System.Threading;
namespace Handbrake.Functions
{
///
/// Provides information about an update check.
///
public struct UpdateCheckInformation
{
public bool NewVersionAvailable { get; set; }
public bool ErrorOccured { get { return Error != null; } }
///
/// Gets information about the new build, if any. This will be null if there is no new verison.
///
public AppcastReader BuildInformation { get; set; }
///
/// Gets the error that occurred, if any. This will be null if no error occured.
///
public Exception Error { get; set; }
}
///
/// Used in EndUpdateCheck() for update checking and the IAsyncResult design pattern.
///
public class UpdateCheckResult : IAsyncResult
{
public UpdateCheckResult(object asyncState, UpdateCheckInformation info)
{
AsyncState = asyncState;
Result = info;
}
///
/// Gets whether the check was executed in debug mode.
///
public object AsyncState { get; private set; }
///
/// Gets the result of the update check.
///
public UpdateCheckInformation Result { get; private set; }
public WaitHandle AsyncWaitHandle { get { throw new NotImplementedException(); } }
public bool CompletedSynchronously { get { throw new NotImplementedException(); } }
public bool IsCompleted { get { throw new NotImplementedException(); } }
}
}