mirror of
https://github.com/aaru-dps/Aaru.CommonTypes.git
synced 2025-12-16 19:24:30 +00:00
Move to file scoped namespaces.
This commit is contained in:
@@ -39,86 +39,85 @@
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Structs;
|
||||
|
||||
namespace Aaru.CommonTypes.Interfaces
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Abstract class to implement disk image reading plugins that can contain floppy images. This interface is
|
||||
/// needed because floppy formatting characteristics are not necesarily compatible with the whole. LBA-oriented
|
||||
/// interface is defined by <see cref="T:Aaru.CommonTypes.Interfaces.IMediaImage" />. All data returned by these
|
||||
/// methods is already decoded from its corresponding bitstream.
|
||||
/// </summary>
|
||||
public interface IFloppyImage : IMediaImage
|
||||
{
|
||||
/// <summary>
|
||||
/// Floppy info, contains information about physical characteristics of floppy, like size, bitrate, track density,
|
||||
/// etc...
|
||||
/// </summary>
|
||||
FloppyInfo FloppyInfo { get; }
|
||||
namespace Aaru.CommonTypes.Interfaces;
|
||||
|
||||
/// <summary>Reads a sector's user data.</summary>
|
||||
/// <returns>
|
||||
/// If <see cref="status" /> is <see cref="FloppySectorStatus.Duplicated" /> one of the duplicates is returned
|
||||
/// randomly. If <see cref="status" /> is <see cref="FloppySectorStatus.Demagnetized" /> or
|
||||
/// <see cref="FloppySectorStatus.Hole" /> random data is returned. If <see cref="status" /> is
|
||||
/// <see cref="FloppySectorStatus.NotFound" /> <c>null</c> is returned. Otherwise, whatever is in the sector is
|
||||
/// returned.
|
||||
/// </returns>
|
||||
/// <param name="track">Physical track (position of the heads over the floppy media, 0-based).</param>
|
||||
/// <param name="head">Physical head (0-based).</param>
|
||||
/// <param name="sector">Logical sector ID.</param>
|
||||
/// <param name="status">Status of request.</param>
|
||||
ErrorNumber ReadSector(ushort track, byte head, ushort sector, out FloppySectorStatus status,
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Abstract class to implement disk image reading plugins that can contain floppy images. This interface is
|
||||
/// needed because floppy formatting characteristics are not necesarily compatible with the whole. LBA-oriented
|
||||
/// interface is defined by <see cref="T:Aaru.CommonTypes.Interfaces.IMediaImage" />. All data returned by these
|
||||
/// methods is already decoded from its corresponding bitstream.
|
||||
/// </summary>
|
||||
public interface IFloppyImage : IMediaImage
|
||||
{
|
||||
/// <summary>
|
||||
/// Floppy info, contains information about physical characteristics of floppy, like size, bitrate, track density,
|
||||
/// etc...
|
||||
/// </summary>
|
||||
FloppyInfo FloppyInfo { get; }
|
||||
|
||||
/// <summary>Reads a sector's user data.</summary>
|
||||
/// <returns>
|
||||
/// If <see cref="status" /> is <see cref="FloppySectorStatus.Duplicated" /> one of the duplicates is returned
|
||||
/// randomly. If <see cref="status" /> is <see cref="FloppySectorStatus.Demagnetized" /> or
|
||||
/// <see cref="FloppySectorStatus.Hole" /> random data is returned. If <see cref="status" /> is
|
||||
/// <see cref="FloppySectorStatus.NotFound" /> <c>null</c> is returned. Otherwise, whatever is in the sector is
|
||||
/// returned.
|
||||
/// </returns>
|
||||
/// <param name="track">Physical track (position of the heads over the floppy media, 0-based).</param>
|
||||
/// <param name="head">Physical head (0-based).</param>
|
||||
/// <param name="sector">Logical sector ID.</param>
|
||||
/// <param name="status">Status of request.</param>
|
||||
ErrorNumber ReadSector(ushort track, byte head, ushort sector, out FloppySectorStatus status,
|
||||
out byte[] buffer);
|
||||
|
||||
/// <summary>Reads a sector's tag.</summary>
|
||||
/// <returns>
|
||||
/// If <see cref="status" /> is <see cref="FloppySectorStatus.Duplicated" /> one of the duplicates is returned
|
||||
/// randomly. If <see cref="status" /> is <see cref="FloppySectorStatus.Demagnetized" /> or
|
||||
/// <see cref="FloppySectorStatus.Hole" /> random data is returned. If <see cref="status" /> is
|
||||
/// <see cref="FloppySectorStatus.NotFound" /> <c>null</c> is returned. Otherwise, whatever tag is in the sector is
|
||||
/// returned.
|
||||
/// </returns>
|
||||
/// <param name="track">Physical track (position of the heads over the floppy media, 0-based).</param>
|
||||
/// <param name="head">Physical head (0-based).</param>
|
||||
/// <param name="sector">Logical sector ID.</param>
|
||||
/// <param name="status">Status of request.</param>
|
||||
/// <param name="tag">Sector tag</param>
|
||||
ErrorNumber ReadSectorTag(ushort track, byte head, ushort sector, out FloppySectorStatus status,
|
||||
SectorTagType tag, out byte[] buffer);
|
||||
|
||||
/// <summary>Reads a whole track. It includes all gaps, address marks, sectors data, etc.</summary>
|
||||
/// <returns>The track data.</returns>
|
||||
/// <param name="track">Physical track (position of the heads over the floppy media, 0-based).</param>
|
||||
/// <param name="head">Physical head (0-based).</param>
|
||||
ErrorNumber ReadTrack(ushort track, byte head, out byte[] buffer);
|
||||
|
||||
/// <summary>Reads a sector's data including all tags, address mark, and so, in a format dependent of represented media.</summary>
|
||||
/// <returns>
|
||||
/// If <see cref="status" /> is <see cref="FloppySectorStatus.Duplicated" /> one of the duplicates is returned
|
||||
/// randomly. If <see cref="status" /> is <see cref="FloppySectorStatus.Demagnetized" /> or
|
||||
/// <see cref="FloppySectorStatus.Hole" /> random data is returned. If <see cref="status" /> is
|
||||
/// <see cref="FloppySectorStatus.NotFound" /> <c>null</c> is returned. Otherwise, whatever is in the sector is
|
||||
/// returned.
|
||||
/// </returns>
|
||||
/// <param name="track">Physical track (position of the heads over the floppy media, 0-based).</param>
|
||||
/// <param name="head">Physical head (0-based).</param>
|
||||
/// <param name="sector">Logical sector ID.</param>
|
||||
/// <param name="status">Status of request.</param>
|
||||
ErrorNumber ReadSectorLong(ushort track, byte head, ushort sector, out FloppySectorStatus status,
|
||||
out byte[] buffer);
|
||||
|
||||
/// <summary>Reads a sector's tag.</summary>
|
||||
/// <returns>
|
||||
/// If <see cref="status" /> is <see cref="FloppySectorStatus.Duplicated" /> one of the duplicates is returned
|
||||
/// randomly. If <see cref="status" /> is <see cref="FloppySectorStatus.Demagnetized" /> or
|
||||
/// <see cref="FloppySectorStatus.Hole" /> random data is returned. If <see cref="status" /> is
|
||||
/// <see cref="FloppySectorStatus.NotFound" /> <c>null</c> is returned. Otherwise, whatever tag is in the sector is
|
||||
/// returned.
|
||||
/// </returns>
|
||||
/// <param name="track">Physical track (position of the heads over the floppy media, 0-based).</param>
|
||||
/// <param name="head">Physical head (0-based).</param>
|
||||
/// <param name="sector">Logical sector ID.</param>
|
||||
/// <param name="status">Status of request.</param>
|
||||
/// <param name="tag">Sector tag</param>
|
||||
ErrorNumber ReadSectorTag(ushort track, byte head, ushort sector, out FloppySectorStatus status,
|
||||
SectorTagType tag, out byte[] buffer);
|
||||
/// <summary>Verifies a track.</summary>
|
||||
/// <returns>True if correct, false if incorrect, null if uncheckable.</returns>
|
||||
/// <param name="track">Physical track (position of the heads over the floppy media, 0-based).</param>
|
||||
/// <param name="head">Physical head (0-based).</param>
|
||||
bool? VerifyTrack(ushort track, byte head);
|
||||
|
||||
/// <summary>Reads a whole track. It includes all gaps, address marks, sectors data, etc.</summary>
|
||||
/// <returns>The track data.</returns>
|
||||
/// <param name="track">Physical track (position of the heads over the floppy media, 0-based).</param>
|
||||
/// <param name="head">Physical head (0-based).</param>
|
||||
ErrorNumber ReadTrack(ushort track, byte head, out byte[] buffer);
|
||||
|
||||
/// <summary>Reads a sector's data including all tags, address mark, and so, in a format dependent of represented media.</summary>
|
||||
/// <returns>
|
||||
/// If <see cref="status" /> is <see cref="FloppySectorStatus.Duplicated" /> one of the duplicates is returned
|
||||
/// randomly. If <see cref="status" /> is <see cref="FloppySectorStatus.Demagnetized" /> or
|
||||
/// <see cref="FloppySectorStatus.Hole" /> random data is returned. If <see cref="status" /> is
|
||||
/// <see cref="FloppySectorStatus.NotFound" /> <c>null</c> is returned. Otherwise, whatever is in the sector is
|
||||
/// returned.
|
||||
/// </returns>
|
||||
/// <param name="track">Physical track (position of the heads over the floppy media, 0-based).</param>
|
||||
/// <param name="head">Physical head (0-based).</param>
|
||||
/// <param name="sector">Logical sector ID.</param>
|
||||
/// <param name="status">Status of request.</param>
|
||||
ErrorNumber ReadSectorLong(ushort track, byte head, ushort sector, out FloppySectorStatus status,
|
||||
out byte[] buffer);
|
||||
|
||||
/// <summary>Verifies a track.</summary>
|
||||
/// <returns>True if correct, false if incorrect, null if uncheckable.</returns>
|
||||
/// <param name="track">Physical track (position of the heads over the floppy media, 0-based).</param>
|
||||
/// <param name="head">Physical head (0-based).</param>
|
||||
bool? VerifyTrack(ushort track, byte head);
|
||||
|
||||
/// <summary>Verifies a sector, relative to track.</summary>
|
||||
/// <returns>True if correct, false if incorrect, null if uncheckable.</returns>
|
||||
/// <param name="track">Physical track (position of the heads over the floppy media, 0-based).</param>
|
||||
/// <param name="head">Physical head (0-based).</param>
|
||||
/// <param name="sector">Logical sector ID.</param>
|
||||
bool? VerifySector(ushort track, byte head, ushort sector);
|
||||
}
|
||||
/// <summary>Verifies a sector, relative to track.</summary>
|
||||
/// <returns>True if correct, false if incorrect, null if uncheckable.</returns>
|
||||
/// <param name="track">Physical track (position of the heads over the floppy media, 0-based).</param>
|
||||
/// <param name="head">Physical head (0-based).</param>
|
||||
/// <param name="sector">Logical sector ID.</param>
|
||||
bool? VerifySector(ushort track, byte head, ushort sector);
|
||||
}
|
||||
Reference in New Issue
Block a user