2023-04-22 15:11:14 -04:00
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
|
|
2023-10-06 20:39:59 -04:00
|
|
|
|
namespace MPF.Core.Modules
|
2023-04-22 15:11:14 -04:00
|
|
|
|
{
|
|
|
|
|
|
[XmlRoot("datafile")]
|
|
|
|
|
|
public class Datafile
|
|
|
|
|
|
{
|
2023-04-23 23:59:44 -04:00
|
|
|
|
[XmlElement("header")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public Header? Header;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
|
|
|
|
|
|
[XmlElement("game")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public Game[]? Games;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class Header
|
|
|
|
|
|
{
|
|
|
|
|
|
[XmlElement("name")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public string? Name;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
|
|
|
|
|
|
[XmlElement("description")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public string? Description;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
|
|
|
|
|
|
[XmlElement("version")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public string? Version;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
|
|
|
|
|
|
[XmlElement("date")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public string? Date;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
|
|
|
|
|
|
[XmlElement("author")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public string? Author;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
|
|
|
|
|
|
[XmlElement("homepage")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public string? Homepage;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
|
|
|
|
|
|
[XmlElement("url")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public string? Url;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class Game
|
|
|
|
|
|
{
|
|
|
|
|
|
[XmlAttribute("name")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public string? Name;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
|
|
|
|
|
|
[XmlElement("category")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public string? Category;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
|
|
|
|
|
|
[XmlElement("description")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public string? Description;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
|
|
|
|
|
|
[XmlElement("rom")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public Rom[]? Roms;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class Rom
|
|
|
|
|
|
{
|
|
|
|
|
|
[XmlAttribute("name")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public string? Name;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("size")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public string? Size;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("crc")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public string? Crc;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("md5")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public string? Md5;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
|
|
|
|
|
|
[XmlAttribute("sha1")]
|
2023-10-07 01:02:21 -04:00
|
|
|
|
public string? Sha1;
|
2023-04-22 15:11:14 -04:00
|
|
|
|
|
|
|
|
|
|
// TODO: Add extended hashes here
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|