mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-21 09:53:14 +00:00
9718d1d2aa
GCI, DSV, DUC are already supported, so I've written the abstraction for those and seed the Handler list on startup. Can add a new class with recognition via SaveUtil.Handlers.Add(myHandler);
22 lines
944 B
C#
22 lines
944 B
C#
namespace PKHeX.Core
|
|
{
|
|
/// <summary>
|
|
/// Provides handling for recognizing atypical save file formats.
|
|
/// </summary>
|
|
public interface ISaveHandler
|
|
{
|
|
/// <summary>
|
|
/// Checks if the requested file size is one that can be recognized by this handler.
|
|
/// </summary>
|
|
/// <param name="size">File size</param>
|
|
/// <returns>True if recognized, false if not recognized.</returns>
|
|
bool IsRecognized(int size);
|
|
|
|
/// <summary>
|
|
/// Tries splitting up the <see cref="input"/> into header/footer/data components. Returns null if not a valid save file for this handler.
|
|
/// </summary>
|
|
/// <param name="input">Combined data</param>
|
|
/// <returns>Null if not a valid save file for this handler's format. Returns an object containing header, footer, and inner data references.</returns>
|
|
SaveHandlerSplitResult? TrySplit(byte[] input);
|
|
}
|
|
}
|