using Aaru.CommonTypes.Enums;
namespace Aaru.CommonTypes.Interfaces;
///
/// Abstract class to implement flux reading plugins.
public interface IFluxImage : IBaseImage
{
///
/// An image may have more than one capture for a specific head/track/sub-track combination. This returns
/// the amount of captures in the image for the specified head/track/sub-track combination.
///
/// The number of captures
/// Physical head (0-based)
/// Physical track (position of the heads over the floppy media, 0-based)
/// Physical sub-step of track (e.g. half-track)
uint CapturesLength(uint head, ushort track, byte subTrack);
/// Reads the resolution (sample rate) of a flux capture in picoseconds
/// The resolution of a capture in picoseconds
/// Physical head (0-based)
/// Physical track (position of the heads over the floppy media, 0-based)
/// Physical sub-step of track (e.g. half-track)
/// Which capture to read. See also
ulong ReadFluxResolution(uint head, ushort track, byte subTrack, uint captureIndex);
/// Reads the entire flux capture with index and data streams, as well as its resolution
/// Error number
/// Physical head (0-based)
/// Physical track (position of the heads over the floppy media, 0-based)
/// Physical sub-step of track (e.g. half-track)
/// Which capture to read. See also
/// The capture's resolution (sample rate) in picoseconds
/// Buffer to store the index stream in
/// Buffer to store the data stream in
ErrorNumber ReadFluxCapture(uint head, ushort track, byte subTrack, uint captureIndex, out ulong resolution,
out byte[] indexBuffer, out byte[] dataBuffer);
/// Reads a capture's index stream
/// Error number
/// Physical head (0-based)
/// Physical track (position of the heads over the floppy media, 0-based)
/// Physical sub-step of track (e.g. half-track)
/// Which capture to read. See also
/// Buffer to store the data in
ErrorNumber ReadFluxIndexCapture(uint head, ushort track, byte subTrack, uint captureIndex, out byte[] buffer);
/// Reads a capture's data stream
/// Error number
/// Physical head (0-based)
/// Physical track (position of the heads over the floppy media, 0-based)
/// Physical sub-step of track (e.g. half-track)
/// Which capture to read. See also
/// Buffer to store the data in
ErrorNumber ReadFluxDataCapture(uint head, ushort track, byte subTrack, uint captureIndex, out byte[] buffer);
}