Move to file scoped namespaces.

This commit is contained in:
2022-03-06 13:29:30 +00:00
parent df66f70140
commit f0129131e5
53 changed files with 15299 additions and 15352 deletions

View File

@@ -39,59 +39,58 @@
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Structs;
namespace Aaru.CommonTypes.Interfaces
namespace Aaru.CommonTypes.Interfaces;
/// <inheritdoc cref="IWritableImage" />
/// <summary>
/// Abstract class to implement disk image reading plugins that can contain floppy images. This interface is
/// needed because floppy formatting characteristics are not necessarily compatible with the whole LBA-oriented
/// interface defined by <see cref="T:Aaru.CommonTypes.Interfaces.IMediaImage" />. All data expected by these methods
/// is already decoded from its corresponding bitstream.
/// </summary>
public interface IWritableFloppyImage : IFloppyImage, IWritableImage
{
/// <inheritdoc cref="IWritableImage" />
/// <summary>
/// Abstract class to implement disk image reading plugins that can contain floppy images. This interface is
/// needed because floppy formatting characteristics are not necessarily compatible with the whole LBA-oriented
/// interface defined by <see cref="T:Aaru.CommonTypes.Interfaces.IMediaImage" />. All data expected by these methods
/// is already decoded from its corresponding bitstream.
/// Indicates the image plugin the floppy physical characteristics and must be called before following methods are
/// called. Once this is called, LBA-based methods should not be used.
/// </summary>
public interface IWritableFloppyImage : IFloppyImage, IWritableImage
{
/// <summary>
/// Indicates the image plugin the floppy physical characteristics and must be called before following methods are
/// called. Once this is called, LBA-based methods should not be used.
/// </summary>
/// <param name="info">
/// Floppy info, contains information about physical characteristics of floppy, like size, bitrate,
/// track density, etc...
/// </param>
/// <returns><c>true</c> if operating completed successfully, <c>false</c> otherwise</returns>
bool SetFloppyCharacteristics(FloppyInfo info);
/// <param name="info">
/// Floppy info, contains information about physical characteristics of floppy, like size, bitrate,
/// track density, etc...
/// </param>
/// <returns><c>true</c> if operating completed successfully, <c>false</c> otherwise</returns>
bool SetFloppyCharacteristics(FloppyInfo info);
/// <summary>Writes a sector's user data.</summary>
/// <param name="data">
/// If <see cref="status" /> is <see cref="FloppySectorStatus.Duplicated" /> one of the duplicates. If
/// <see cref="status" /> is <see cref="FloppySectorStatus.Demagnetized" />, <see cref="FloppySectorStatus.Hole" />,
/// <see cref="FloppySectorStatus.NotFound" /> it will be ignored. Otherwise, whatever data should be in the sector.
/// </param>
/// <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 sector.</param>
/// <returns><c>true</c> if operating completed successfully, <c>false</c> otherwise</returns>
bool WriteSector(byte[] data, ushort track, byte head, ushort sector, FloppySectorStatus status);
/// <summary>Writes a sector's user data.</summary>
/// <param name="data">
/// If <see cref="status" /> is <see cref="FloppySectorStatus.Duplicated" /> one of the duplicates. If
/// <see cref="status" /> is <see cref="FloppySectorStatus.Demagnetized" />, <see cref="FloppySectorStatus.Hole" />,
/// <see cref="FloppySectorStatus.NotFound" /> it will be ignored. Otherwise, whatever data should be in the sector.
/// </param>
/// <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 sector.</param>
/// <returns><c>true</c> if operating completed successfully, <c>false</c> otherwise</returns>
bool WriteSector(byte[] data, ushort track, byte head, ushort sector, FloppySectorStatus status);
/// <summary>Writes a whole track, including all gaps, address marks, sectors data, etc.</summary>
/// <param name="data">The track data.</param>
/// <param name="track">Physical track (position of the heads over the floppy media, 0-based).</param>
/// <param name="head">Physical head (0-based).</param>
/// <returns><c>true</c> if operating completed successfully, <c>false</c> otherwise</returns>
bool WriteTrack(byte[] data, ushort track, byte head);
/// <summary>Writes a whole track, including all gaps, address marks, sectors data, etc.</summary>
/// <param name="data">The track data.</param>
/// <param name="track">Physical track (position of the heads over the floppy media, 0-based).</param>
/// <param name="head">Physical head (0-based).</param>
/// <returns><c>true</c> if operating completed successfully, <c>false</c> otherwise</returns>
bool WriteTrack(byte[] data, ushort track, byte head);
/// <summary>Writes a sector's data including all tags, address mark, and so, in a format dependent of represented media.</summary>
/// <param name="data">
/// If <see cref="status" /> is <see cref="FloppySectorStatus.Duplicated" /> one of the duplicates. If
/// <see cref="status" /> is <see cref="FloppySectorStatus.Demagnetized" />, <see cref="FloppySectorStatus.Hole" />,
/// <see cref="FloppySectorStatus.NotFound" /> it will be ignored. Otherwise, whatever data should be in the sector.
/// </param>
/// <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>
/// <returns><c>true</c> if operating completed successfully, <c>false</c> otherwise</returns>
bool WriteSectorLong(byte[] data, ushort track, byte head, ushort sector, out FloppySectorStatus status);
}
/// <summary>Writes a sector's data including all tags, address mark, and so, in a format dependent of represented media.</summary>
/// <param name="data">
/// If <see cref="status" /> is <see cref="FloppySectorStatus.Duplicated" /> one of the duplicates. If
/// <see cref="status" /> is <see cref="FloppySectorStatus.Demagnetized" />, <see cref="FloppySectorStatus.Hole" />,
/// <see cref="FloppySectorStatus.NotFound" /> it will be ignored. Otherwise, whatever data should be in the sector.
/// </param>
/// <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>
/// <returns><c>true</c> if operating completed successfully, <c>false</c> otherwise</returns>
bool WriteSectorLong(byte[] data, ushort track, byte head, ushort sector, out FloppySectorStatus status);
}