Move FirmwareManager to new subdir, split inner classes to own files
This commit is contained in:
parent
b4be750427
commit
dd0fc1b0b3
|
@ -0,0 +1,13 @@
|
||||||
|
namespace BizHawk.Client.Common
|
||||||
|
{
|
||||||
|
public sealed class FirmwareEventArgs
|
||||||
|
{
|
||||||
|
public string FirmwareId { get; set; }
|
||||||
|
|
||||||
|
public string Hash { get; set; }
|
||||||
|
|
||||||
|
public long Size { get; set; }
|
||||||
|
|
||||||
|
public string SystemId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -11,37 +11,10 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
public class FirmwareManager
|
public class FirmwareManager
|
||||||
{
|
{
|
||||||
// represents a file found on disk in the user's firmware directory matching a file in our database
|
|
||||||
public class RealFirmwareFile
|
|
||||||
{
|
|
||||||
public FileInfo FileInfo { get; set; }
|
|
||||||
public string Hash { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<FirmwareEventArgs> RecentlyServed { get; } = new List<FirmwareEventArgs>();
|
public List<FirmwareEventArgs> RecentlyServed { get; } = new List<FirmwareEventArgs>();
|
||||||
|
|
||||||
public class ResolutionInfo
|
|
||||||
{
|
|
||||||
public bool UserSpecified { get; set; }
|
|
||||||
public bool Missing { get; set; }
|
|
||||||
public bool KnownMismatching { get; set; }
|
|
||||||
public FirmwareDatabase.FirmwareFile KnownFirmwareFile { get; set; }
|
|
||||||
public string FilePath { get; set; }
|
|
||||||
public string Hash { get; set; }
|
|
||||||
public long Size { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
private readonly Dictionary<FirmwareDatabase.FirmwareRecord, ResolutionInfo> _resolutionDictionary = new Dictionary<FirmwareDatabase.FirmwareRecord, ResolutionInfo>();
|
private readonly Dictionary<FirmwareDatabase.FirmwareRecord, ResolutionInfo> _resolutionDictionary = new Dictionary<FirmwareDatabase.FirmwareRecord, ResolutionInfo>();
|
||||||
|
|
||||||
public class FirmwareEventArgs
|
|
||||||
{
|
|
||||||
public string Hash { get; set; }
|
|
||||||
public long Size { get; set; }
|
|
||||||
public string SystemId { get; set; }
|
|
||||||
public string FirmwareId { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// purpose of forbidScan: sometimes this is called from a loop in Scan(). we don't want to repeatedly DoScanAndResolve in that case, its already been done.
|
// purpose of forbidScan: sometimes this is called from a loop in Scan(). we don't want to repeatedly DoScanAndResolve in that case, its already been done.
|
||||||
public ResolutionInfo Resolve(PathEntryCollection pathEntries, IDictionary<string, string> userSpecifications, FirmwareDatabase.FirmwareRecord record, bool forbidScan = false)
|
public ResolutionInfo Resolve(PathEntryCollection pathEntries, IDictionary<string, string> userSpecifications, FirmwareDatabase.FirmwareRecord record, bool forbidScan = false)
|
||||||
{
|
{
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace BizHawk.Client.Common
|
||||||
|
{
|
||||||
|
/// <summary>represents a file found on disk in the user's firmware directory matching a file in our database</summary>
|
||||||
|
public sealed class RealFirmwareFile
|
||||||
|
{
|
||||||
|
public FileInfo FileInfo { get; set; }
|
||||||
|
|
||||||
|
public string Hash { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
using BizHawk.Emulation.Common;
|
||||||
|
|
||||||
|
namespace BizHawk.Client.Common
|
||||||
|
{
|
||||||
|
public sealed class ResolutionInfo
|
||||||
|
{
|
||||||
|
public string FilePath { get; set; }
|
||||||
|
|
||||||
|
public string Hash { get; set; }
|
||||||
|
|
||||||
|
public FirmwareDatabase.FirmwareFile KnownFirmwareFile { get; set; }
|
||||||
|
|
||||||
|
public bool KnownMismatching { get; set; }
|
||||||
|
|
||||||
|
public bool Missing { get; set; }
|
||||||
|
|
||||||
|
public long Size { get; set; }
|
||||||
|
|
||||||
|
public bool UserSpecified { get; set; }
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue