mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[STFS] Added enumerations and structures.
This commit is contained in:
@@ -4,5 +4,6 @@
|
||||
xml:space="preserve">
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=arc/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=localization/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=stfs/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=symbian/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=zoo/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
79
Aaru.Archives/Stfs/Enums.cs
Normal file
79
Aaru.Archives/Stfs/Enums.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
namespace Aaru.Archives;
|
||||
|
||||
public sealed partial class Stfs
|
||||
{
|
||||
#region Nested type: ConsoleType
|
||||
|
||||
enum ConsoleType : byte
|
||||
{
|
||||
DevKit = 1,
|
||||
Retail = 2
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nested type: ContentType
|
||||
|
||||
enum ContentType
|
||||
{
|
||||
SavedGame = 0x00000001,
|
||||
MarketplaceContent = 0x00000002,
|
||||
Publisher = 0x00000003,
|
||||
Xbox360Title = 0x00001000,
|
||||
IPTVPauseBuffer = 0x00002000,
|
||||
InstalledGame = 0x00004000,
|
||||
XboxOriginalGame = 0x00005000,
|
||||
XboxTitle = 0x00005000,
|
||||
GameOnDemand = 0x00007000,
|
||||
AvatarItem = 0x00009000,
|
||||
Profile = 0x00010000,
|
||||
GamerPicture = 0x00020000,
|
||||
Theme = 0x00030000,
|
||||
CacheFile = 0x00040000,
|
||||
StorageDownload = 0x00050000,
|
||||
XboxSavedGame = 0x00060000,
|
||||
XboxDownload = 0x00070000,
|
||||
GameDemo = 0x00080000,
|
||||
Video = 0x00090000,
|
||||
GameTitle = 0x000A0000,
|
||||
Installer = 0x000B0000,
|
||||
GameTrailer = 0x000C0000,
|
||||
ArcadeTitle = 0x000D0000,
|
||||
XNA = 0x000E0000,
|
||||
LicenseStore = 0x000F0000,
|
||||
Movie = 0x00100000,
|
||||
TV = 0x00200000,
|
||||
MusicVideo = 0x00300000,
|
||||
GameVideo = 0x00400000,
|
||||
PodcastVideo = 0x00500000,
|
||||
ViralVideo = 0x00600000,
|
||||
CommunityGame = 0x02000000
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nested type: PackageMagic
|
||||
|
||||
enum PackageMagic
|
||||
{
|
||||
Console = 0x434F4E20,
|
||||
Live = 0x4C495645,
|
||||
Microsoft = 0x50495253
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nested type: TransferFlags
|
||||
|
||||
enum TransferFlags : byte
|
||||
{
|
||||
DeepLinkSupported = 0x04,
|
||||
DisableNetworkStorage = 0x08,
|
||||
KinectEnabled = 0x10,
|
||||
MoveOnlyTransfer = 0x20,
|
||||
DeviceIdTransfer = 0x40,
|
||||
ProfileIdTransfer = 0x80
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
132
Aaru.Archives/Stfs/Structs.cs
Normal file
132
Aaru.Archives/Stfs/Structs.cs
Normal file
@@ -0,0 +1,132 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Aaru.Archives;
|
||||
|
||||
public sealed partial class Stfs
|
||||
{
|
||||
#region Nested type: ConsolePackage
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode, Pack = 1)]
|
||||
struct ConsolePackage
|
||||
{
|
||||
public PackageMagic Magic;
|
||||
public ushort PkCertificateSize;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
|
||||
public byte[] CertificateOwnerConsoleId;
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)]
|
||||
public string CertificateOwnerConsolePartNumber;
|
||||
public ConsoleType CertificateOwnerConsoleType;
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
|
||||
public string CertificateDateOfGeneration;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
|
||||
public byte[] PublicExponent;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
|
||||
public byte[] PublicModulus;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)]
|
||||
public byte[] CertificateSignature;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
|
||||
public byte[] Signature;
|
||||
public Metadata Metadata;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nested type: LicenseEntry
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode, Pack = 1)]
|
||||
struct LicenseEntry
|
||||
{
|
||||
public long LicenseId;
|
||||
public int LicenseBits;
|
||||
public int LicenseFlags;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nested type: LocalizedString
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode, Pack = 1)]
|
||||
struct LocalizedString
|
||||
{
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
|
||||
public string Name;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nested type: Metadata
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode, Pack = 1)]
|
||||
struct Metadata
|
||||
{
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||
public LicenseEntry[] Licensing;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
||||
public byte[] HeaderSha1Hash;
|
||||
public uint HeaderSize;
|
||||
public ContentType ContentType;
|
||||
public int MetadataVersion;
|
||||
public long ContentSize;
|
||||
public int MediaId;
|
||||
public int Version;
|
||||
public int BaseVersion;
|
||||
public int TitleId;
|
||||
public byte Platform;
|
||||
public byte ExecutableType;
|
||||
public byte DiscNumber;
|
||||
public byte DiscInSet;
|
||||
public int SaveGameId;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
|
||||
public byte[] ConsoleId;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
|
||||
public byte[] ProfileId;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 36)]
|
||||
public byte[] VolumeDescriptor;
|
||||
public int DataFileCount;
|
||||
public long DataFileCombinedSize;
|
||||
public int DescriptorType;
|
||||
public int Reserved;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||
public byte[] SeriesId;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||
public byte[] SeasonId;
|
||||
public short SeasonNo;
|
||||
public short EpisodeNo;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)]
|
||||
public byte[] Padding;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
||||
public byte[] DeviceId;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 18)]
|
||||
public LocalizedString[] DisplayName;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 18)]
|
||||
public LocalizedString[] DisplayDescription;
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
|
||||
public string PublisherName;
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
|
||||
public string TitleName;
|
||||
public TransferFlags TransferFlags;
|
||||
public int ThumbnailImageSize;
|
||||
public int TitleThumbnailImageSize;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16384)]
|
||||
public byte[] ThumbnailImage;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16384)]
|
||||
public byte[] TitleThumbnailImage;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Nested type: RemotePackage
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode, Pack = 1)]
|
||||
struct RemotePackage
|
||||
{
|
||||
public PackageMagic Magic;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)]
|
||||
public byte[] Signature;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 296)]
|
||||
public byte[] Padding;
|
||||
public Metadata Metadata;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user