General code refactor.

This commit is contained in:
2021-08-17 21:23:10 +01:00
parent 4fcaeffc85
commit 75edb759e6
513 changed files with 38377 additions and 48553 deletions

View File

@@ -2,17 +2,14 @@
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
education, socio-economic status, nationality, personal appearance, race,
religion, or sexual identity and orientation.
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making
participation in our project and our community a harassment-free experience for everyone, regardless of age, body size,
disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
@@ -22,52 +19,42 @@ include:
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the
project or its community. Examples of representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed representative at an online or offline
event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [claunia@claunia.com](mailto:claunia@claunia.com). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team
at [claunia@claunia.com](mailto:claunia@claunia.com). All complaints will be reviewed and investigated and will result
in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain
confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be
posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available
at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org

View File

@@ -1,5 +1,7 @@
## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] New filesystem, test images in [url]

View File

@@ -58,14 +58,14 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="System"/>
<Reference Include="System.Core"/>
<Reference Include="System.Data"/>
<Reference Include="System.Xml"/>
</ItemGroup>
<ItemGroup>
<Compile Include="AppleRle.cs" />
<Compile Include="TeleDiskLzh.cs" />
<Compile Include="AppleRle.cs"/>
<Compile Include="TeleDiskLzh.cs"/>
</ItemGroup>
<ItemGroup>
<Content Include="..\LICENSE.LGPL">
@@ -82,25 +82,25 @@
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
<!-- Look in the standard install locations -->
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net40'">$(BaseFrameworkPathOverrideForMono)/4.0-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
<!-- Look in the standard install locations -->
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net40'">$(BaseFrameworkPathOverrideForMono)/4.0-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
</PropertyGroup>
</Project>

View File

@@ -35,9 +35,7 @@ using System.IO;
namespace Aaru.Compression
{
/// <summary>
/// Implements the Apple version of RLE
/// </summary>
/// <summary>Implements the Apple version of RLE</summary>
public class AppleRle
{
const uint DART_CHUNK = 20960;
@@ -48,9 +46,7 @@ namespace Aaru.Compression
byte _repeatedByteA, _repeatedByteB;
bool _repeatMode; // true if we're repeating, false if we're just copying
/// <summary>
/// Initializes a decompressor for the specified stream
/// </summary>
/// <summary>Initializes a decompressor for the specified stream</summary>
/// <param name="stream">Stream containing the compressed data</param>
public AppleRle(Stream stream)
{
@@ -66,9 +62,7 @@ namespace Aaru.Compression
_repeatMode = false;
}
/// <summary>
/// Decompresses a byte
/// </summary>
/// <summary>Decompresses a byte</summary>
/// <returns>Decompressed byte</returns>
public int ProduceByte()
{

View File

@@ -53,9 +53,7 @@ namespace Aaru.Compression
* Adaptive Huffman Coding coded by Haruyasu YOSHIZAKI
* Edited and translated to English by Kenji RIKITAKE
*/
/// <summary>
/// Implements the TeleDisk version of LZH
/// </summary>
/// <summary>Implements the TeleDisk version of LZH</summary>
public class TeleDiskLzh
{
const int BUFSZ = 512;
@@ -136,9 +134,7 @@ namespace Aaru.Compression
Tdlzhuf _tdctl;
/// <summary>
/// Implements the TeleDisk LZH algorithm over the specified stream.
/// </summary>
/// <summary>Implements the TeleDisk LZH algorithm over the specified stream.</summary>
/// <param name="dataStream">Stream with compressed data.</param>
public TeleDiskLzh(Stream dataStream)
{
@@ -163,9 +159,7 @@ namespace Aaru.Compression
*/
/// <summary>
/// Decompresses data
/// </summary>
/// <summary>Decompresses data</summary>
/// <param name="buf">Buffer to write the decompressed data to</param>
/// <param name="len">Number of bytes to decompress</param>
/// <returns>Number of decompressed bytes</returns>

View File

@@ -53,105 +53,105 @@
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System"/>
<Reference Include="System.Xml"/>
</ItemGroup>
<ItemGroup>
<Compile Include="Devices\Dumping\CompactDisc\CdiReady.cs" />
<Compile Include="Devices\Dumping\CompactDisc\Data.cs" />
<Compile Include="Devices\Dumping\CompactDisc\Dump.cs" />
<Compile Include="Devices\Dumping\CompactDisc\Error.cs" />
<Compile Include="Devices\Dumping\CompactDisc\LeadOuts.cs" />
<Compile Include="Devices\Dumping\CompactDisc\Offset.cs" />
<Compile Include="Devices\Dumping\CompactDisc\Plextor.cs" />
<Compile Include="Devices\Dumping\CompactDisc\Pregap.cs" />
<Compile Include="Devices\Dumping\CompactDisc\Subchannel.cs" />
<Compile Include="Devices\Dumping\CompactDisc\Tags.cs" />
<Compile Include="Devices\Dumping\CompactDisc\Tracks.cs" />
<Compile Include="Devices\Dumping\CompactDisc\Trim.cs" />
<Compile Include="Devices\Dumping\Dump.cs" />
<Compile Include="Devices\Dumping\Metadata.cs" />
<Compile Include="Devices\Dumping\MiniDisc.cs" />
<Compile Include="Devices\Dumping\PlayStationPortable\MemoryStick.cs" />
<Compile Include="Devices\Dumping\PlayStationPortable\PlayStationPortable.cs" />
<Compile Include="Devices\Dumping\PlayStationPortable\UMD.cs" />
<Compile Include="Devices\Dumping\Sbc\Data.cs" />
<Compile Include="Devices\Dumping\Sbc\Error.cs" />
<Compile Include="Devices\Dumping\Sbc\Dump.cs" />
<Compile Include="Devices\Dumping\Sbc\Optical.cs" />
<Compile Include="Devices\Dumping\Sbc\Trim.cs" />
<Compile Include="Devices\Info\DeviceInfo.cs" />
<Compile Include="Devices\Info\Plextor.cs" />
<Compile Include="Devices\Info\Properties.cs" />
<Compile Include="Devices\Report\DeviceReport.cs" />
<Compile Include="Devices\Report\GdRomSwapTrick.cs" />
<Compile Include="Devices\Report\Scsi.cs" />
<Compile Include="Devices\Report\MMC.cs" />
<Compile Include="Devices\Report\SSC.cs" />
<Compile Include="Devices\Scanning\MediaScan.cs" />
<Compile Include="Entropy.cs" />
<Compile Include="GetPluginBase.cs" />
<Compile Include="ImageInfo.cs" />
<Compile Include="Logging\ErrorLog.cs" />
<Compile Include="Logging\SubchannelLog.cs" />
<Compile Include="Media\CompactDisc.cs" />
<Compile Include="Media\Detection\MMC.cs" />
<Compile Include="Media\Info\CompactDisc.cs" />
<Compile Include="Media\Info\ScsiInfo.cs" />
<Compile Include="Media\Info\XgdInfo.cs" />
<Compile Include="Options.cs" />
<Compile Include="ImageFormat.cs" />
<Compile Include="Error.cs" />
<Compile Include="PrintScsiModePages.cs" />
<Compile Include="Sidecar\Files.cs" />
<Compile Include="Statistics.cs" />
<Compile Include="Checksum.cs" />
<Compile Include="Logging\IBGLog.cs" />
<Compile Include="Logging\MHDDLog.cs" />
<Compile Include="Devices\Scanning\ATA.cs" />
<Compile Include="Devices\Scanning\SecureDigital.cs" />
<Compile Include="Devices\Scanning\NVMe.cs" />
<Compile Include="Devices\Scanning\SCSI.cs" />
<Compile Include="Devices\Dumping\ATA.cs" />
<Compile Include="Devices\Dumping\NVMe.cs" />
<Compile Include="Devices\Dumping\SCSI.cs" />
<Compile Include="Devices\Dumping\SecureDigital.cs" />
<Compile Include="DataFile.cs" />
<Compile Include="Filesystems.cs" />
<Compile Include="Devices\Scanning\ScanResults.cs" />
<Compile Include="Devices\Report\ATA.cs" />
<Compile Include="Devices\Report\FireWire.cs" />
<Compile Include="Devices\Report\USB.cs" />
<Compile Include="Devices\Report\SecureDigital.cs" />
<Compile Include="Remote.cs" />
<Compile Include="Devices\Report\PCMCIA.cs" />
<Compile Include="Devices\Reader.cs" />
<Compile Include="Devices\ReaderATA.cs" />
<Compile Include="Devices\ReaderSCSI.cs" />
<Compile Include="Devices\Dumping\SSC.cs" />
<Compile Include="Devices\Dumping\MMC.cs" />
<Compile Include="Devices\Dumping\XGD.cs" />
<Compile Include="Devices\Dumping\ResumeSupport.cs" />
<Compile Include="Partitions.cs" />
<Compile Include="Sidecar\Events.cs" />
<Compile Include="Sidecar\Helpers.cs" />
<Compile Include="Sidecar\Sidecar.cs" />
<Compile Include="Sidecar\OpticalDisc.cs" />
<Compile Include="Sidecar\BlockMedia.cs" />
<Compile Include="Sidecar\LinearMedia.cs" />
<Compile Include="Sidecar\AudioMedia.cs" />
<Compile Include="Sidecar\BlockTape.cs" />
<Compile Include="Logging\DumpLog.cs" />
<Compile Include="Devices\Dumping\CompactDisc\CdiReady.cs"/>
<Compile Include="Devices\Dumping\CompactDisc\Data.cs"/>
<Compile Include="Devices\Dumping\CompactDisc\Dump.cs"/>
<Compile Include="Devices\Dumping\CompactDisc\Error.cs"/>
<Compile Include="Devices\Dumping\CompactDisc\LeadOuts.cs"/>
<Compile Include="Devices\Dumping\CompactDisc\Offset.cs"/>
<Compile Include="Devices\Dumping\CompactDisc\Plextor.cs"/>
<Compile Include="Devices\Dumping\CompactDisc\Pregap.cs"/>
<Compile Include="Devices\Dumping\CompactDisc\Subchannel.cs"/>
<Compile Include="Devices\Dumping\CompactDisc\Tags.cs"/>
<Compile Include="Devices\Dumping\CompactDisc\Tracks.cs"/>
<Compile Include="Devices\Dumping\CompactDisc\Trim.cs"/>
<Compile Include="Devices\Dumping\Dump.cs"/>
<Compile Include="Devices\Dumping\Metadata.cs"/>
<Compile Include="Devices\Dumping\MiniDisc.cs"/>
<Compile Include="Devices\Dumping\PlayStationPortable\MemoryStick.cs"/>
<Compile Include="Devices\Dumping\PlayStationPortable\PlayStationPortable.cs"/>
<Compile Include="Devices\Dumping\PlayStationPortable\UMD.cs"/>
<Compile Include="Devices\Dumping\Sbc\Data.cs"/>
<Compile Include="Devices\Dumping\Sbc\Error.cs"/>
<Compile Include="Devices\Dumping\Sbc\Dump.cs"/>
<Compile Include="Devices\Dumping\Sbc\Optical.cs"/>
<Compile Include="Devices\Dumping\Sbc\Trim.cs"/>
<Compile Include="Devices\Info\DeviceInfo.cs"/>
<Compile Include="Devices\Info\Plextor.cs"/>
<Compile Include="Devices\Info\Properties.cs"/>
<Compile Include="Devices\Report\DeviceReport.cs"/>
<Compile Include="Devices\Report\GdRomSwapTrick.cs"/>
<Compile Include="Devices\Report\Scsi.cs"/>
<Compile Include="Devices\Report\MMC.cs"/>
<Compile Include="Devices\Report\SSC.cs"/>
<Compile Include="Devices\Scanning\MediaScan.cs"/>
<Compile Include="Entropy.cs"/>
<Compile Include="GetPluginBase.cs"/>
<Compile Include="ImageInfo.cs"/>
<Compile Include="Logging\ErrorLog.cs"/>
<Compile Include="Logging\SubchannelLog.cs"/>
<Compile Include="Media\CompactDisc.cs"/>
<Compile Include="Media\Detection\MMC.cs"/>
<Compile Include="Media\Info\CompactDisc.cs"/>
<Compile Include="Media\Info\ScsiInfo.cs"/>
<Compile Include="Media\Info\XgdInfo.cs"/>
<Compile Include="Options.cs"/>
<Compile Include="ImageFormat.cs"/>
<Compile Include="Error.cs"/>
<Compile Include="PrintScsiModePages.cs"/>
<Compile Include="Sidecar\Files.cs"/>
<Compile Include="Statistics.cs"/>
<Compile Include="Checksum.cs"/>
<Compile Include="Logging\IBGLog.cs"/>
<Compile Include="Logging\MHDDLog.cs"/>
<Compile Include="Devices\Scanning\ATA.cs"/>
<Compile Include="Devices\Scanning\SecureDigital.cs"/>
<Compile Include="Devices\Scanning\NVMe.cs"/>
<Compile Include="Devices\Scanning\SCSI.cs"/>
<Compile Include="Devices\Dumping\ATA.cs"/>
<Compile Include="Devices\Dumping\NVMe.cs"/>
<Compile Include="Devices\Dumping\SCSI.cs"/>
<Compile Include="Devices\Dumping\SecureDigital.cs"/>
<Compile Include="DataFile.cs"/>
<Compile Include="Filesystems.cs"/>
<Compile Include="Devices\Scanning\ScanResults.cs"/>
<Compile Include="Devices\Report\ATA.cs"/>
<Compile Include="Devices\Report\FireWire.cs"/>
<Compile Include="Devices\Report\USB.cs"/>
<Compile Include="Devices\Report\SecureDigital.cs"/>
<Compile Include="Remote.cs"/>
<Compile Include="Devices\Report\PCMCIA.cs"/>
<Compile Include="Devices\Reader.cs"/>
<Compile Include="Devices\ReaderATA.cs"/>
<Compile Include="Devices\ReaderSCSI.cs"/>
<Compile Include="Devices\Dumping\SSC.cs"/>
<Compile Include="Devices\Dumping\MMC.cs"/>
<Compile Include="Devices\Dumping\XGD.cs"/>
<Compile Include="Devices\Dumping\ResumeSupport.cs"/>
<Compile Include="Partitions.cs"/>
<Compile Include="Sidecar\Events.cs"/>
<Compile Include="Sidecar\Helpers.cs"/>
<Compile Include="Sidecar\Sidecar.cs"/>
<Compile Include="Sidecar\OpticalDisc.cs"/>
<Compile Include="Sidecar\BlockMedia.cs"/>
<Compile Include="Sidecar\LinearMedia.cs"/>
<Compile Include="Sidecar\AudioMedia.cs"/>
<Compile Include="Sidecar\BlockTape.cs"/>
<Compile Include="Logging\DumpLog.cs"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Aaru.Archives\Aaru.Archives.csproj" />
<ProjectReference Include="..\Aaru.Archives\Aaru.Archives.csproj"/>
<ProjectReference Include="..\Aaru.Console\Aaru.Console.csproj">
<Project>{ccaa7afe-c094-4d82-a66d-630de8a3f545}</Project>
<Name>Aaru.Console</Name>
</ProjectReference>
<ProjectReference Include="..\Aaru.Database\Aaru.Database.csproj" />
<ProjectReference Include="..\Aaru.Decryption\Aaru.Decryption.csproj" />
<ProjectReference Include="..\Aaru.Dto\Aaru.Dto.csproj" />
<ProjectReference Include="..\Aaru.Database\Aaru.Database.csproj"/>
<ProjectReference Include="..\Aaru.Decryption\Aaru.Decryption.csproj"/>
<ProjectReference Include="..\Aaru.Dto\Aaru.Dto.csproj"/>
<ProjectReference Include="..\Aaru.Filesystems\Aaru.Filesystems.csproj">
<Project>{D7016DF2-5A5E-4524-B40D-BA2D59576688}</Project>
<Name>Aaru.Filesystems</Name>
@@ -194,60 +194,59 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Logging\" />
<Folder Include="Devices\" />
<Folder Include="Devices\Scanning\" />
<Folder Include="Devices\Dumping\" />
<Folder Include="Devices\Report\" />
<Folder Include="Sidecar\" />
</ItemGroup>
<ItemGroup>
<Folder Include="Logging\"/>
<Folder Include="Devices\"/>
<Folder Include="Devices\Scanning\"/>
<Folder Include="Devices\Dumping\"/>
<Folder Include="Devices\Report\"/>
<Folder Include="Sidecar\"/>
</ItemGroup>
<ItemGroup></ItemGroup>
<ItemGroup>
<Content Include="..\LICENSE">
<Link>LICENSE</Link>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.3.0" PrivateAssets="all" />
<PackageReference Include="System.Collections" Version="4.3.0" />
<PackageReference Include="System.Diagnostics.Debug" Version="4.3.0" />
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
<PackageReference Include="System.Runtime.Extensions" Version="4.3.1" />
<PackageReference Include="System.Runtime.Handles" Version="4.3.0" />
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0"/>
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.3.0" PrivateAssets="all"/>
<PackageReference Include="System.Collections" Version="4.3.0"/>
<PackageReference Include="System.Diagnostics.Debug" Version="4.3.0"/>
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0"/>
<PackageReference Include="System.Runtime.Extensions" Version="4.3.1"/>
<PackageReference Include="System.Runtime.Handles" Version="4.3.0"/>
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0"/>
</ItemGroup>
<ProjectExtensions>
<MonoDevelop>
<Properties>
<Policies>
<TextStylePolicy FileWidth="120" TabWidth="4" IndentWidth="4" RemoveTrailingWhitespace="True" NoTabsAfterNonTabs="False" EolMarker="Native" TabsToSpaces="True" scope="text/x-csharp" />
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchSection="True" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="True" NewLinesForBracesInAccessors="True" NewLinesForBracesInAnonymousMethods="True" NewLinesForBracesInControlBlocks="True" NewLinesForBracesInAnonymousTypes="True" NewLinesForBracesInObjectCollectionArrayInitializers="True" NewLinesForBracesInLambdaExpressionBody="True" NewLineForElse="True" NewLineForCatch="True" NewLineForFinally="True" SpacingAfterMethodDeclarationName="False" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="False" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="False" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" PlaceSystemDirectiveFirst="True" NewLineForMembersInObjectInit="False" NewLineForMembersInAnonymousTypes="False" NewLineForClausesInQuery="False" SpaceAfterControlFlowStatementKeyword="False" scope="text/x-csharp" />
<DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="MSBuild" />
<TextStylePolicy FileWidth="120" TabWidth="4" IndentWidth="4" RemoveTrailingWhitespace="True" NoTabsAfterNonTabs="False" EolMarker="Native" TabsToSpaces="True" scope="text/x-csharp"/>
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchSection="True" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="True" NewLinesForBracesInAccessors="True" NewLinesForBracesInAnonymousMethods="True" NewLinesForBracesInControlBlocks="True" NewLinesForBracesInAnonymousTypes="True" NewLinesForBracesInObjectCollectionArrayInitializers="True" NewLinesForBracesInLambdaExpressionBody="True" NewLineForElse="True" NewLineForCatch="True" NewLineForFinally="True" SpacingAfterMethodDeclarationName="False" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="False" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="False" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" PlaceSystemDirectiveFirst="True" NewLineForMembersInObjectInit="False" NewLineForMembersInAnonymousTypes="False" NewLineForClausesInQuery="False" SpaceAfterControlFlowStatementKeyword="False" scope="text/x-csharp"/>
<DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="MSBuild"/>
</Policies>
</Properties>
</MonoDevelop>
</ProjectExtensions>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
<!-- Look in the standard install locations -->
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net40'">$(BaseFrameworkPathOverrideForMono)/4.0-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
<!-- Look in the standard install locations -->
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net40'">$(BaseFrameworkPathOverrideForMono)/4.0-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
</PropertyGroup>
</Project>

View File

@@ -39,63 +39,35 @@ using Schemas;
namespace Aaru.Core
{
/// <summary>
/// Enabled checksums
/// </summary>
/// <summary>Enabled checksums</summary>
[Flags]
public enum EnableChecksum
{
/// <summary>
/// Enables Adler-32
/// </summary>
/// <summary>Enables Adler-32</summary>
Adler32 = 1,
/// <summary>
/// Enables CRC-16
/// </summary>
Crc16 = 2,
/// <summary>
/// Enables CRC-32
/// </summary>
Crc32 = 4,
/// <summary>
/// Enables CRC-64
/// </summary>
Crc64 = 8,
/// <summary>
/// Enables MD5
/// </summary>
Md5 = 16,
/// <summary>
/// Enables SHA1
/// </summary>
Sha1 = 64,
/// <summary>
/// Enables SHA2-256
/// </summary>
Sha256 = 128,
/// <summary>
/// Enables SHA2-384
/// </summary>
Sha384 = 256,
/// <summary>
/// Enables SHA2-512
/// </summary>
Sha512 = 512,
/// <summary>
/// Enables SpamSum
/// </summary>
/// <summary>Enables CRC-16</summary>
Crc16 = 2,
/// <summary>Enables CRC-32</summary>
Crc32 = 4,
/// <summary>Enables CRC-64</summary>
Crc64 = 8,
/// <summary>Enables MD5</summary>
Md5 = 16,
/// <summary>Enables SHA1</summary>
Sha1 = 64,
/// <summary>Enables SHA2-256</summary>
Sha256 = 128,
/// <summary>Enables SHA2-384</summary>
Sha384 = 256,
/// <summary>Enables SHA2-512</summary>
Sha512 = 512,
/// <summary>Enables SpamSum</summary>
SpamSum = 1024,
/// <summary>
/// Enables Fletcher-16
/// </summary>
/// <summary>Enables Fletcher-16</summary>
Fletcher16 = 2048,
/// <summary>
/// Enables Fletcher-32
/// </summary>
/// <summary>Enables Fletcher-32</summary>
Fletcher32 = 4096,
/// <summary>
/// Enables all known checksums
/// </summary>
/// <summary>Enables all known checksums</summary>
All = Adler32 | Crc16 | Crc32 | Crc64 | Md5 | Sha1 | Sha256 | Sha384 | Sha512 | SpamSum | Fletcher16 |
Fletcher32
}
@@ -141,9 +113,7 @@ namespace Aaru.Core
HashPacket _spamsumPkt;
Thread _spamsumThread;
/// <summary>
/// Initializes an instance of the checksum operations
/// </summary>
/// <summary>Initializes an instance of the checksum operations</summary>
/// <param name="enabled">Enabled checksums</param>
public Checksum(EnableChecksum enabled = EnableChecksum.All)
{
@@ -283,9 +253,7 @@ namespace Aaru.Core
_f32Thread = new Thread(UpdateHash);
}
/// <summary>
/// Updates the checksum with new data
/// </summary>
/// <summary>Updates the checksum with new data</summary>
/// <param name="data">New data</param>
public void Update(byte[] data)
{
@@ -411,9 +379,7 @@ namespace Aaru.Core
_f32Thread = new Thread(UpdateHash);
}
/// <summary>
/// Finishes the checksums
/// </summary>
/// <summary>Finishes the checksums</summary>
/// <returns>Returns the checksum results</returns>
public List<ChecksumType> End()
{

View File

@@ -89,7 +89,9 @@ namespace Aaru.Core.Devices.Dumping
readonly ushort _retryPasses;
readonly bool _retrySubchannel;
readonly bool _stopOnError;
readonly bool _storeEncrypted;
readonly DumpSubchannel _subchannel;
readonly bool _titleKeys;
readonly bool _trim;
readonly bool _useBufferedReads;
bool _aborted;
@@ -105,8 +107,6 @@ namespace Aaru.Core.Devices.Dumping
int _speed;
int _speedMultiplier;
bool _supportsPlextorD8;
readonly bool _storeEncrypted;
readonly bool _titleKeys;
/// <summary>Initializes dumpers</summary>
/// <param name="doResume">Should resume?</param>
@@ -275,9 +275,7 @@ namespace Aaru.Core.Devices.Dumping
fs.Close();
}
/// <summary>
/// Aborts the dump in progress
/// </summary>
/// <summary>Aborts the dump in progress</summary>
public void Abort()
{
_aborted = true;

View File

@@ -428,6 +428,7 @@ namespace Aaru.Core.Devices.Dumping
}
}
}
_dumpLog.WriteLine("Reading Disc Manufacturing Information");
sense = _dev.ReadDiscStructure(out cmdBuf, out _, MmcDiscStructureMediaType.Dvd, 0, 0,
@@ -458,8 +459,7 @@ namespace Aaru.Core.Devices.Dumping
sense = _dev.ScsiInquiry(out byte[] inqBuf, out _);
if(sense ||
Inquiry.Decode(inqBuf)?.KreonPresent != true)
if(sense || Inquiry.Decode(inqBuf)?.KreonPresent != true)
{
_dumpLog.WriteLine("Dumping Xbox Game Discs requires a drive with Kreon firmware.");
@@ -532,7 +532,8 @@ namespace Aaru.Core.Devices.Dumping
sense = dvdDecrypt.ReadBusKey(out cmdBuf, out _,
CSS_CPRM.DecodeLeadInCopyright(cmdBuf)?.
CopyrightType ?? CopyrightType.NoProtection, _dev.Timeout, out _);
CopyrightType ?? CopyrightType.NoProtection,
_dev.Timeout, out _);
if(!sense)
{

View File

@@ -36,9 +36,7 @@ namespace Aaru.Core.Devices.Dumping
{
public partial class Dump
{
/// <summary>
/// Dumps an NVMe device
/// </summary>
/// <summary>Dumps an NVMe device</summary>
public void NVMe() => StoppingErrorMessage?.Invoke("NVMe devices not yet supported.");
}
}

View File

@@ -56,7 +56,7 @@ namespace Aaru.Core.Devices.Dumping
if(sense)
{
var decSense = Sense.Decode(senseBuf);
DecodedSense? decSense = Sense.Decode(senseBuf);
if(decSense.HasValue)
{

View File

@@ -327,9 +327,9 @@ namespace Aaru.Core.Devices.Dumping
}
AaruConsole.DebugWriteLine("Dump-media command", "Unlocked total size: {0} sectors", totalSize);
ulong blocks = totalSize + 1;
ulong blocks = totalSize + 1;
var wxRipperPfiNullable = PFI.Decode(readBuffer, MediaType.DVDROM);
PFI.PhysicalFormatInformation? wxRipperPfiNullable = PFI.Decode(readBuffer, MediaType.DVDROM);
if(wxRipperPfiNullable == null)
{

View File

@@ -40,21 +40,17 @@ using Aaru.Decoders.ATA;
using Aaru.Decoders.DVD;
using Aaru.Decoders.SCSI;
using Aaru.Decryption;
using DVDDecryption = Aaru.Decryption.DVD.Dump;
using Aaru.Devices;
using Aaru.Helpers;
using DVDDecryption = Aaru.Decryption.DVD.Dump;
using Inquiry = Aaru.CommonTypes.Structs.Devices.SCSI.Inquiry;
namespace Aaru.Core.Devices.Info
{
/// <summary>
/// Obtains and contains information about a device
/// </summary>
/// <summary>Obtains and contains information about a device</summary>
public partial class DeviceInfo
{
/// <summary>
/// Initializes an instance of this class for the specified device
/// </summary>
/// <summary>Initializes an instance of this class for the specified device</summary>
/// <param name="dev">Device</param>
public DeviceInfo(Device dev)
{

View File

@@ -32,134 +32,70 @@
namespace Aaru.Core.Devices.Info
{
/// <summary>
/// Contains information about Plextor features
/// </summary>
/// <summary>Contains information about Plextor features</summary>
public class Plextor
{
/// <summary>
/// Access time limit
/// </summary>
public byte AccessTimeLimit;
/// <summary>
/// Drive supports setting book type bit for DVD+R
/// </summary>
public bool BitSetting;
/// <summary>
/// Drive supports setting book type bit for DVD+R DL
/// </summary>
public bool BitSettingDl;
/// <summary>
/// CD read speed limit
/// </summary>
public byte CdReadSpeedLimit;
/// <summary>
/// Time drive has spent reading CDs
/// </summary>
public uint CdReadTime;
/// <summary>
/// CD write speed limit
/// </summary>
public byte CdWriteSpeedLimit;
/// <summary>
/// Time drive has spent writing CDs
/// </summary>
public uint CdWriteTime;
/// <summary>
/// Total number of loaded discs
/// </summary>
/// <summary>Access time limit</summary>
public byte AccessTimeLimit;
/// <summary>Drive supports setting book type bit for DVD+R</summary>
public bool BitSetting;
/// <summary>Drive supports setting book type bit for DVD+R DL</summary>
public bool BitSettingDl;
/// <summary>CD read speed limit</summary>
public byte CdReadSpeedLimit;
/// <summary>Time drive has spent reading CDs</summary>
public uint CdReadTime;
/// <summary>CD write speed limit</summary>
public byte CdWriteSpeedLimit;
/// <summary>Time drive has spent writing CDs</summary>
public uint CdWriteTime;
/// <summary>Total number of loaded discs</summary>
public ushort Discs;
/// <summary>
/// Drive supports test writing DVD+
/// </summary>
public bool DvdPlusWriteTest;
/// <summary>
/// DVD read limit
/// </summary>
public byte DvdReadSpeedLimit;
/// <summary>
/// Time drive has spent reading DVDs
/// </summary>
public uint DvdReadTime;
/// <summary>
/// Time drive has spent writing DVDs
/// </summary>
public uint DvdWriteTime;
/// <summary>
/// Raw contents of EEPROM
/// </summary>
/// <summary>Drive supports test writing DVD+</summary>
public bool DvdPlusWriteTest;
/// <summary>DVD read limit</summary>
public byte DvdReadSpeedLimit;
/// <summary>Time drive has spent reading DVDs</summary>
public uint DvdReadTime;
/// <summary>Time drive has spent writing DVDs</summary>
public uint DvdWriteTime;
/// <summary>Raw contents of EEPROM</summary>
public byte[] Eeprom;
/// <summary>
/// Drive supports GigaRec
/// </summary>
public bool GigaRec;
/// <summary>
/// Drive will show recordable CDs as embossed
/// </summary>
public bool HidesRecordables;
/// <summary>
/// Drive will hide sessions
/// </summary>
public bool HidesSessions;
/// <summary>
/// Drive supports hiding recordable CDs and sessions
/// </summary>
public bool Hiding;
/// <summary>
/// Drive is a DVD capable drive
/// </summary>
public bool IsDvd;
/// <summary>
/// Drive supports PoweRec
/// </summary>
public bool PoweRec;
/// <summary>
/// Drive has PoweRec enabled
/// </summary>
public bool PoweRecEnabled;
/// <summary>
/// Last used PoweRec in KiB/sec
/// </summary>
/// <summary>Drive supports GigaRec</summary>
public bool GigaRec;
/// <summary>Drive will show recordable CDs as embossed</summary>
public bool HidesRecordables;
/// <summary>Drive will hide sessions</summary>
public bool HidesSessions;
/// <summary>Drive supports hiding recordable CDs and sessions</summary>
public bool Hiding;
/// <summary>Drive is a DVD capable drive</summary>
public bool IsDvd;
/// <summary>Drive supports PoweRec</summary>
public bool PoweRec;
/// <summary>Drive has PoweRec enabled</summary>
public bool PoweRecEnabled;
/// <summary>Last used PoweRec in KiB/sec</summary>
public ushort PoweRecLast;
/// <summary>
/// Maximum supported PoweRec for currently inserted media in KiB/sec
/// </summary>
/// <summary>Maximum supported PoweRec for currently inserted media in KiB/sec</summary>
public ushort PoweRecMax;
/// <summary>
/// Recommended supported PoweRec for currently inserted media in KiB/sec
/// </summary>
/// <summary>Recommended supported PoweRec for currently inserted media in KiB/sec</summary>
public ushort PoweRecRecommendedSpeed;
/// <summary>
/// Selected supported PoweRec for currently inserted media in KiB/sec
/// </summary>
/// <summary>Selected supported PoweRec for currently inserted media in KiB/sec</summary>
public ushort PoweRecSelected;
/// <summary>
/// Drive supports SecuRec
/// </summary>
public bool SecuRec;
/// <summary>
/// Drive supports SilentMode
/// </summary>
public bool SilentMode;
/// <summary>
/// Drive has SilentMode enabled
/// </summary>
public bool SilentModeEnabled;
/// <summary>
/// Drive supports SpeedRead
/// </summary>
public bool SpeedRead;
/// <summary>
/// Drive has SpeedRead enabled
/// </summary>
public bool SpeedReadEnabled;
/// <summary>
/// Drive supports VariRec
/// </summary>
public bool VariRec;
/// <summary>
/// Drive supports VariRec for DVDs
/// </summary>
public bool VariRecDvd;
/// <summary>Drive supports SecuRec</summary>
public bool SecuRec;
/// <summary>Drive supports SilentMode</summary>
public bool SilentMode;
/// <summary>Drive has SilentMode enabled</summary>
public bool SilentModeEnabled;
/// <summary>Drive supports SpeedRead</summary>
public bool SpeedRead;
/// <summary>Drive has SpeedRead enabled</summary>
public bool SpeedReadEnabled;
/// <summary>Drive supports VariRec</summary>
public bool VariRec;
/// <summary>Drive supports VariRec for DVDs</summary>
public bool VariRecDvd;
}
}

View File

@@ -44,189 +44,97 @@ namespace Aaru.Core.Devices.Info
{
public partial class DeviceInfo
{
/// <summary>
/// Raw IDENTIFY DEVICE response
/// </summary>
public byte[] AtaIdentify { get; }
/// <summary>
/// Raw IDENTIFY PACKET DEVICE response
/// </summary>
public byte[] AtapiIdentify { get; }
/// <summary>
/// Raw INQUIRY response
/// </summary>
public byte[] ScsiInquiryData { get; }
/// <summary>
/// Decoded INQUIRY response
/// </summary>
public Inquiry? ScsiInquiry { get; }
/// <summary>
/// Response for ATA Memory Card Pass Through
/// </summary>
public AtaErrorRegistersChs? AtaMcptError { get; }
/// <summary>
/// List of raw EVPD page indexed by page number
/// </summary>
public Dictionary<byte, byte[]> ScsiEvpdPages { get; }
/// <summary>
/// Decoded MODE SENSE response
/// </summary>
public Modes.DecodedMode? ScsiMode { get; }
/// <summary>
/// Raw MODE SENSE(6) response
/// </summary>
public byte[] ScsiModeSense6 { get; }
/// <summary>
/// Raw MODE SENSE(10) response
/// </summary>
public byte[] ScsiModeSense10 { get; }
/// <summary>
/// Raw GET CONFIGURATION response
/// </summary>
public byte[] MmcConfiguration { get; }
/// <summary>
/// Decoded Plextor features
/// </summary>
public Plextor PlextorFeatures { get; }
/// <summary>
/// Decoded Kreon features
/// </summary>
public KreonFeatures KreonFeatures { get; }
/// <summary>
/// Raw GET BLOCK LIMITS support
/// </summary>
public byte[] BlockLimits { get; }
/// <summary>
/// Raw density support
/// </summary>
public byte[] DensitySupport { get; }
/// <summary>
/// Decoded density support
/// </summary>
public DensitySupport.DensitySupportHeader? DensitySupportHeader { get; }
/// <summary>
/// Raw medium density support
/// </summary>
public byte[] MediumDensitySupport { get; }
/// <summary>
/// Decoded medium density support
/// </summary>
/// <summary>Raw IDENTIFY DEVICE response</summary>
public byte[] AtaIdentify { get; }
/// <summary>Raw IDENTIFY PACKET DEVICE response</summary>
public byte[] AtapiIdentify { get; }
/// <summary>Raw INQUIRY response</summary>
public byte[] ScsiInquiryData { get; }
/// <summary>Decoded INQUIRY response</summary>
public Inquiry? ScsiInquiry { get; }
/// <summary>Response for ATA Memory Card Pass Through</summary>
public AtaErrorRegistersChs? AtaMcptError { get; }
/// <summary>List of raw EVPD page indexed by page number</summary>
public Dictionary<byte, byte[]> ScsiEvpdPages { get; }
/// <summary>Decoded MODE SENSE response</summary>
public Modes.DecodedMode? ScsiMode { get; }
/// <summary>Raw MODE SENSE(6) response</summary>
public byte[] ScsiModeSense6 { get; }
/// <summary>Raw MODE SENSE(10) response</summary>
public byte[] ScsiModeSense10 { get; }
/// <summary>Raw GET CONFIGURATION response</summary>
public byte[] MmcConfiguration { get; }
/// <summary>Decoded Plextor features</summary>
public Plextor PlextorFeatures { get; }
/// <summary>Decoded Kreon features</summary>
public KreonFeatures KreonFeatures { get; }
/// <summary>Raw GET BLOCK LIMITS support</summary>
public byte[] BlockLimits { get; }
/// <summary>Raw density support</summary>
public byte[] DensitySupport { get; }
/// <summary>Decoded density support</summary>
public DensitySupport.DensitySupportHeader? DensitySupportHeader { get; }
/// <summary>Raw medium density support</summary>
public byte[] MediumDensitySupport { get; }
/// <summary>Decoded medium density support</summary>
public DensitySupport.MediaTypeSupportHeader? MediaTypeSupportHeader { get; }
/// <summary>
/// Raw CID registers
/// </summary>
public byte[] CID { get; }
/// <summary>
/// Raw CSD
/// </summary>
public byte[] CSD { get; }
/// <summary>
/// Raw extended CSD
/// </summary>
public byte[] ExtendedCSD { get; }
/// <summary>
/// Raw SCR registers
/// </summary>
public byte[] SCR { get; }
/// <summary>
/// Raw OCR registers
/// </summary>
public byte[] OCR { get; }
/// <summary>
/// Aaru's device type
/// </summary>
public DeviceType Type { get; }
/// <summary>
/// Device manufacturer
/// </summary>
public string Manufacturer { get; }
/// <summary>
/// Device model
/// </summary>
public string Model { get; }
/// <summary>
/// Device firmware version or revision
/// </summary>
public string FirmwareRevision { get; }
/// <summary>
/// Device serial number
/// </summary>
public string Serial { get; }
/// <summary>
/// SCSI Peripheral Device Type
/// </summary>
public PeripheralDeviceTypes ScsiType { get; }
/// <summary>
/// Is media removable from device?
/// </summary>
public bool IsRemovable { get; }
/// <summary>
/// Is device attached via USB?
/// </summary>
public bool IsUsb { get; }
/// <summary>
/// USB vendor ID
/// </summary>
public ushort UsbVendorId { get; }
/// <summary>
/// USB product ID
/// </summary>
public ushort UsbProductId { get; }
/// <summary>
/// Raw USB descriptors
/// </summary>
public byte[] UsbDescriptors { get; }
/// <summary>
/// USB manufacturer string
/// </summary>
public string UsbManufacturerString { get; }
/// <summary>
/// USB product string
/// </summary>
public string UsbProductString { get; }
/// <summary>
/// USB serial number string
/// </summary>
public string UsbSerialString { get; }
/// <summary>
/// Is device attached via FireWire?
/// </summary>
public bool IsFireWire { get; }
/// <summary>
/// FireWire's device GUID
/// </summary>
public ulong FireWireGuid { get; }
/// <summary>
/// FireWire's device model ID
/// </summary>
public uint FireWireModel { get; }
/// <summary>
/// FireWire's device model name
/// </summary>
public string FireWireModelName { get; }
/// <summary>
/// FireWire's device vendor ID
/// </summary>
public uint FireWireVendor { get; }
/// <summary>
/// FireWire's device vendor name
/// </summary>
public string FireWireVendorName { get; }
/// <summary>
/// Is device a CompactFlash device?
/// </summary>
public bool IsCompactFlash { get; }
/// <summary>
/// Is device a PCMCIA or CardBus device?
/// </summary>
public bool IsPcmcia { get; }
/// <summary>
/// PCMCIA/CardBus CIS
/// </summary>
public byte[] Cis { get; }
/// <summary>
/// MMC device CSS/CPRM Region Protection Code
/// </summary>
public CSS_CPRM.RegionalPlaybackControlState? RPC { get; }
/// <summary>Raw CID registers</summary>
public byte[] CID { get; }
/// <summary>Raw CSD</summary>
public byte[] CSD { get; }
/// <summary>Raw extended CSD</summary>
public byte[] ExtendedCSD { get; }
/// <summary>Raw SCR registers</summary>
public byte[] SCR { get; }
/// <summary>Raw OCR registers</summary>
public byte[] OCR { get; }
/// <summary>Aaru's device type</summary>
public DeviceType Type { get; }
/// <summary>Device manufacturer</summary>
public string Manufacturer { get; }
/// <summary>Device model</summary>
public string Model { get; }
/// <summary>Device firmware version or revision</summary>
public string FirmwareRevision { get; }
/// <summary>Device serial number</summary>
public string Serial { get; }
/// <summary>SCSI Peripheral Device Type</summary>
public PeripheralDeviceTypes ScsiType { get; }
/// <summary>Is media removable from device?</summary>
public bool IsRemovable { get; }
/// <summary>Is device attached via USB?</summary>
public bool IsUsb { get; }
/// <summary>USB vendor ID</summary>
public ushort UsbVendorId { get; }
/// <summary>USB product ID</summary>
public ushort UsbProductId { get; }
/// <summary>Raw USB descriptors</summary>
public byte[] UsbDescriptors { get; }
/// <summary>USB manufacturer string</summary>
public string UsbManufacturerString { get; }
/// <summary>USB product string</summary>
public string UsbProductString { get; }
/// <summary>USB serial number string</summary>
public string UsbSerialString { get; }
/// <summary>Is device attached via FireWire?</summary>
public bool IsFireWire { get; }
/// <summary>FireWire's device GUID</summary>
public ulong FireWireGuid { get; }
/// <summary>FireWire's device model ID</summary>
public uint FireWireModel { get; }
/// <summary>FireWire's device model name</summary>
public string FireWireModelName { get; }
/// <summary>FireWire's device vendor ID</summary>
public uint FireWireVendor { get; }
/// <summary>FireWire's device vendor name</summary>
public string FireWireVendorName { get; }
/// <summary>Is device a CompactFlash device?</summary>
public bool IsCompactFlash { get; }
/// <summary>Is device a PCMCIA or CardBus device?</summary>
public bool IsPcmcia { get; }
/// <summary>PCMCIA/CardBus CIS</summary>
public byte[] Cis { get; }
/// <summary>MMC device CSS/CPRM Region Protection Code</summary>
public CSS_CPRM.RegionalPlaybackControlState? RPC { get; }
}
}

View File

@@ -41,9 +41,7 @@ namespace Aaru.Core.Devices.Report
{
public sealed partial class DeviceReport
{
/// <summary>
/// Creates a report for media inserted into an ATA device
/// </summary>
/// <summary>Creates a report for media inserted into an ATA device</summary>
/// <returns>Media report</returns>
public TestedMedia ReportAtaMedia()
{
@@ -725,9 +723,7 @@ namespace Aaru.Core.Devices.Report
return capabilities;
}
/// <summary>
/// Clear serial numbers and other private fields from an IDENTIFY ATA DEVICE response
/// </summary>
/// <summary>Clear serial numbers and other private fields from an IDENTIFY ATA DEVICE response</summary>
/// <param name="buffer">IDENTIFY ATA DEVICE response</param>
/// <returns>IDENTIFY ATA DEVICE response without the private fields</returns>
public static byte[] ClearIdentify(byte[] buffer)

View File

@@ -38,9 +38,7 @@ namespace Aaru.Core.Devices.Report
{
readonly Device _dev;
/// <summary>
/// Initializes a device report for the specified device (must be opened)
/// </summary>
/// <summary>Initializes a device report for the specified device (must be opened)</summary>
/// <param name="device">Device</param>
public DeviceReport(Device device) => _dev = device;
}

View File

@@ -45,9 +45,7 @@ namespace Aaru.Core.Devices.Report
{
public sealed partial class DeviceReport
{
/// <summary>
/// Tries and checks reading a GD-ROM disc using the swap disc trick and adds the result to a device report
/// </summary>
/// <summary>Tries and checks reading a GD-ROM disc using the swap disc trick and adds the result to a device report</summary>
/// <param name="report">Device report</param>
public void ReportGdRomSwapTrick(ref DeviceReportV2 report)
{

View File

@@ -71,9 +71,7 @@ namespace Aaru.Core.Devices.Report
return response;
}
/// <summary>
/// Creates a report for the GET CONFIGURATION response of an MMC device
/// </summary>
/// <summary>Creates a report for the GET CONFIGURATION response of an MMC device</summary>
/// <returns>MMC features report</returns>
public MmcFeatures ReportMmcFeatures()
{
@@ -574,9 +572,7 @@ namespace Aaru.Core.Devices.Report
return report;
}
/// <summary>
/// Creates a report for media inserted into an MMC device
/// </summary>
/// <summary>Creates a report for media inserted into an MMC device</summary>
/// <param name="mediaType">Expected media type name</param>
/// <param name="tryPlextor">Try Plextor vendor commands</param>
/// <param name="tryPioneer">Try Pioneer vendor commands</param>

View File

@@ -41,9 +41,7 @@ namespace Aaru.Core.Devices.Report
{
public sealed partial class DeviceReport
{
/// <summary>
/// Creates a report from a SCSI Sequential Commands device
/// </summary>
/// <summary>Creates a report from a SCSI Sequential Commands device</summary>
/// <returns>SSC report</returns>
public Ssc ReportScsiSsc()
{
@@ -141,9 +139,7 @@ namespace Aaru.Core.Devices.Report
return report;
}
/// <summary>
/// Creates a report for media inserted into an SSC device
/// </summary>
/// <summary>Creates a report for media inserted into an SSC device</summary>
/// <returns>Media report</returns>
public TestedSequentialMedia ReportSscMedia()
{

View File

@@ -45,9 +45,7 @@ namespace Aaru.Core.Devices.Report
{
public sealed partial class DeviceReport
{
/// <summary>
/// Creates a report for the SCSI INQUIRY response
/// </summary>
/// <summary>Creates a report for the SCSI INQUIRY response</summary>
/// <returns>SCSI report</returns>
public Scsi ReportScsiInquiry()
{
@@ -89,9 +87,7 @@ namespace Aaru.Core.Devices.Report
return inquiry;
}
/// <summary>
/// Returns a list of decoded SCSI EVPD pages
/// </summary>
/// <summary>Returns a list of decoded SCSI EVPD pages</summary>
/// <param name="vendor">Decoded SCSI vendor identification</param>
/// <returns>List of decoded SCSI EVPD pages</returns>
public List<ScsiPage> ReportEvpdPages(string vendor)
@@ -196,9 +192,7 @@ namespace Aaru.Core.Devices.Report
return pageResponse;
}
/// <summary>
/// Adds reports for the decoded SCSI MODE SENSE pages to a device report
/// </summary>
/// <summary>Adds reports for the decoded SCSI MODE SENSE pages to a device report</summary>
/// <param name="report">Device report</param>
/// <param name="cdromMode">Returns raw MODE SENSE page 2Ah, aka CD-ROM page</param>
/// <param name="mediumType">Returns decoded list of supported media types response</param>
@@ -434,9 +428,7 @@ namespace Aaru.Core.Devices.Report
report.SCSI.ModeSense.ModePages = modePages;
}
/// <summary>
/// Creates a report for media inserted into a SCSI device
/// </summary>
/// <summary>Creates a report for media inserted into a SCSI device</summary>
/// <returns>Media report</returns>
public TestedMedia ReportScsiMedia()
{
@@ -703,9 +695,7 @@ namespace Aaru.Core.Devices.Report
return mediaTest;
}
/// <summary>
/// Creates a media report for a non-removable SCSI device
/// </summary>
/// <summary>Creates a media report for a non-removable SCSI device</summary>
/// <returns>Media report</returns>
public TestedMedia ReportScsi()
{

View File

@@ -68,9 +68,7 @@ namespace Aaru.Core.Devices.Scanning
_useBufferedReads = useBufferedReads;
}
/// <summary>
/// Starts a media scan
/// </summary>
/// <summary>Starts a media scan</summary>
/// <returns>Media scan results</returns>
/// <exception cref="NotSupportedException">Unknown device type</exception>
public ScanResults Scan()
@@ -87,9 +85,7 @@ namespace Aaru.Core.Devices.Scanning
}
}
/// <summary>
/// Aborts the running media scan
/// </summary>
/// <summary>Aborts the running media scan</summary>
public void Abort() => _aborted = true;
/// <summary>Event raised when the progress bar is not longer needed</summary>
@@ -105,12 +101,12 @@ namespace Aaru.Core.Devices.Scanning
/// <summary>Event raised to update the status of an indeterminate progress bar</summary>
public event PulseProgressHandler PulseProgress;
/// <summary>Updates lists of time taken on scanning from the specified sector</summary>
public event ScanTimeHandler ScanTime;
public event ScanTimeHandler ScanTime;
/// <summary>Specified a number of blocks could not be read on scan</summary>
public event ScanUnreadableHandler ScanUnreadable;
/// <summary>Initializes a block map that's going to be filled with a media scan</summary>
public event InitBlockMapHandler InitBlockMap;
public event InitBlockMapHandler InitBlockMap;
/// <summary>Sends the speed of scanning a specific sector</summary>
public event ScanSpeedHandler ScanSpeed;
public event ScanSpeedHandler ScanSpeed;
}
}

View File

@@ -41,17 +41,13 @@ using Aaru.Console;
namespace Aaru.Core
{
/// <summary>
/// Media image entropy operations
/// </summary>
/// <summary>Media image entropy operations</summary>
public sealed class Entropy
{
readonly bool _debug;
readonly IMediaImage _inputFormat;
/// <summary>
/// Initializes an instance with the specified parameters
/// </summary>
/// <summary>Initializes an instance with the specified parameters</summary>
/// <param name="debug">Debug enabled</param>
/// <param name="inputFormat">Media image</param>
public Entropy(bool debug, IMediaImage inputFormat)
@@ -61,21 +57,19 @@ namespace Aaru.Core
}
/// <summary>Event raised when a progress bar is needed</summary>
public event InitProgressHandler InitProgressEvent;
public event InitProgressHandler InitProgressEvent;
/// <summary>Event raised to update the values of a determinate progress bar</summary>
public event UpdateProgressHandler UpdateProgressEvent;
/// <summary>Event raised when the progress bar is not longer needed</summary>
public event EndProgressHandler EndProgressEvent;
public event EndProgressHandler EndProgressEvent;
/// <summary>Event raised when a progress bar is needed</summary>
public event InitProgressHandler InitProgress2Event;
public event InitProgressHandler InitProgress2Event;
/// <summary>Event raised to update the values of a determinate progress bar</summary>
public event UpdateProgressHandler UpdateProgress2Event;
/// <summary>Event raised when the progress bar is not longer needed</summary>
public event EndProgressHandler EndProgress2Event;
public event EndProgressHandler EndProgress2Event;
/// <summary>
/// Calculates the tracks entropy
/// </summary>
/// <summary>Calculates the tracks entropy</summary>
/// <param name="duplicatedSectors">Checks for duplicated sectors</param>
/// <returns>Calculated entropy</returns>
public EntropyResults[] CalculateTracksEntropy(bool duplicatedSectors)
@@ -163,9 +157,7 @@ namespace Aaru.Core
return entropyResults.ToArray();
}
/// <summary>
/// Calculates the media entropy
/// </summary>
/// <summary>Calculates the media entropy</summary>
/// <param name="duplicatedSectors">Checks for duplicated sectors</param>
/// <returns>Calculated entropy</returns>
public EntropyResults CalculateMediaEntropy(bool duplicatedSectors)
@@ -214,26 +206,16 @@ namespace Aaru.Core
}
}
/// <summary>
/// Entropy results
/// </summary>
/// <summary>Entropy results</summary>
public struct EntropyResults
{
/// <summary>
/// Track number, if applicable
/// </summary>
public uint Track;
/// <summary>
/// Entropy
/// </summary>
/// <summary>Track number, if applicable</summary>
public uint Track;
/// <summary>Entropy</summary>
public double Entropy;
/// <summary>
/// Number of unique sectors
/// </summary>
public int? UniqueSectors;
/// <summary>
/// Number of total sectors
/// </summary>
public ulong Sectors;
/// <summary>Number of unique sectors</summary>
public int? UniqueSectors;
/// <summary>Number of total sectors</summary>
public ulong Sectors;
}
}

View File

@@ -34,14 +34,10 @@ using Aaru.CommonTypes.Interop;
namespace Aaru.Core
{
/// <summary>
/// Prints the description of a system error number.
/// </summary>
/// <summary>Prints the description of a system error number.</summary>
public static class Error
{
/// <summary>
/// Prints the description of a system error number.
/// </summary>
/// <summary>Prints the description of a system error number.</summary>
/// <param name="errno">System error number.</param>
/// <returns>Error description.</returns>
public static string Print(int errno)

View File

@@ -37,9 +37,7 @@ using Aaru.CommonTypes.Interfaces;
namespace Aaru.Core
{
/// <summary>
/// Core filesystem operations
/// </summary>
/// <summary>Core filesystem operations</summary>
public static class Filesystems
{
/// <summary>

View File

@@ -36,14 +36,10 @@ using Aaru.CommonTypes.Interfaces;
namespace Aaru.Core
{
/// <summary>
/// Plugin base operations
/// </summary>
/// <summary>Plugin base operations</summary>
public static class GetPluginBase
{
/// <summary>
/// Gets an instance with all the known plugins
/// </summary>
/// <summary>Gets an instance with all the known plugins</summary>
public static PluginBase Instance
{
get
@@ -55,7 +51,7 @@ namespace Aaru.Core
IPluginRegister filesystemsRegister = new Aaru.Filesystems.Register();
IPluginRegister filtersRegister = new Filters.Register();
IPluginRegister partitionsRegister = new Aaru.Partitions.Register();
IPluginRegister archiveRegister = new Aaru.Archives.Register();
IPluginRegister archiveRegister = new Archives.Register();
instance.AddPlugins(checksumRegister);
instance.AddPlugins(imagesRegister);
@@ -68,4 +64,4 @@ namespace Aaru.Core
}
}
}
}
}

View File

@@ -38,9 +38,7 @@ using Aaru.Console;
namespace Aaru.Core
{
/// <summary>
/// Core media image format operations
/// </summary>
/// <summary>Core media image format operations</summary>
public static class ImageFormat
{
/// <summary>Detects the image plugin that recognizes the data inside a filter</summary>

View File

@@ -56,9 +56,7 @@ using Tuple = Aaru.Decoders.PCMCIA.Tuple;
namespace Aaru.Core
{
/// <summary>
/// Image information operations
/// </summary>
/// <summary>Image information operations</summary>
public static class ImageInfo
{
const string MANUFACTURER_STRING = "Manufacturer";
@@ -70,9 +68,7 @@ namespace Aaru.Core
const string START_STRING = "Start";
const string END_STRING = "End";
/// <summary>
/// Prints image information to console
/// </summary>
/// <summary>Prints image information to console</summary>
/// <param name="imageFormat">Media image</param>
public static void PrintImageInfo(IMediaImage imageFormat)
{

View File

@@ -35,9 +35,7 @@ using Aaru.Decoders.SCSI;
namespace Aaru.Core.Logging
{
/// <summary>
/// Logs errors
/// </summary>
/// <summary>Logs errors</summary>
public sealed class ErrorLog
{
readonly StreamWriter _logSw;
@@ -389,13 +387,14 @@ namespace Aaru.Core.Logging
prettySense = prettySense.Replace("\n", " - ");
_logSw.WriteLine("SCSI command {0} error: SENSE {1} ASC {2:X2}h ASCQ {3:X2}h, {4}, {5}.", command,
decodedSense.Value.SenseKey, decodedSense.Value.ASC, decodedSense.Value.ASCQ, hexSense,
prettySense);
decodedSense.Value.SenseKey, decodedSense.Value.ASC, decodedSense.Value.ASCQ,
hexSense, prettySense);
}
else
{
_logSw.WriteLine("SCSI command {0} error: SENSE {1} ASC {2:X2}h ASCQ {3:X2}h, {4}.", command,
decodedSense.Value.SenseKey, decodedSense.Value.ASC, decodedSense.Value.ASCQ, hexSense);
decodedSense.Value.SenseKey, decodedSense.Value.ASC, decodedSense.Value.ASCQ,
hexSense);
}
}
else
@@ -456,13 +455,14 @@ namespace Aaru.Core.Logging
prettySense = prettySense.Replace("\n", " - ");
_logSw.WriteLine("SCSI reading LBA {0} error: SENSE {1} ASC {2:X2}h ASCQ {3:X2}h, {4}, {5}.", block,
decodedSense.Value.SenseKey, decodedSense.Value.ASC, decodedSense.Value.ASCQ, hexSense,
prettySense);
decodedSense.Value.SenseKey, decodedSense.Value.ASC, decodedSense.Value.ASCQ,
hexSense, prettySense);
}
else
{
_logSw.WriteLine("SCSI reading LBA {0} error: SENSE {1} ASC {2:X2}h ASCQ {3:X2}h, {4}.", block,
decodedSense.Value.SenseKey, decodedSense.Value.ASC, decodedSense.Value.ASCQ, hexSense);
decodedSense.Value.SenseKey, decodedSense.Value.ASC, decodedSense.Value.ASCQ,
hexSense);
}
}
else

View File

@@ -32,9 +32,7 @@ using Aaru.Decoders.CD;
namespace Aaru.Core.Logging
{
/// <summary>
/// Logs subchannel data
/// </summary>
/// <summary>Logs subchannel data</summary>
public class SubchannelLog
{
const int SUB_SIZE = 96;
@@ -66,9 +64,7 @@ namespace Aaru.Core.Logging
_logSw.Close();
}
/// <summary>
/// Logs an entry to the subchannel log
/// </summary>
/// <summary>Logs an entry to the subchannel log</summary>
/// <param name="subchannel">Subchannel data</param>
/// <param name="raw">Set to <c>true</c> if the subchannel data is raw</param>
/// <param name="startingLba">First LBA read from drive to retrieve the data</param>
@@ -231,85 +227,59 @@ namespace Aaru.Core.Logging
_logSw.Flush();
}
/// <summary>
/// Logs message indicating the P subchannel has been fixed
/// </summary>
/// <summary>Logs message indicating the P subchannel has been fixed</summary>
/// <param name="lba">LBA fix belongs to</param>
public void WritePFix(long lba) => WriteMessageWithPosition(lba, "fixed P subchannel using weight average.");
/// <summary>
/// Logs message indicating the R-W subchannels have been fixed
/// </summary>
/// <summary>Logs message indicating the R-W subchannels have been fixed</summary>
/// <param name="lba">LBA fix belongs to</param>
public void WriteRwFix(long lba) => WriteMessageWithPosition(lba, "fixed R-W subchannels writing empty data.");
/// <summary>
/// Logs message indicating the ADR field of the Q subchannel has been fixed
/// </summary>
/// <summary>Logs message indicating the ADR field of the Q subchannel has been fixed</summary>
/// <param name="lba">LBA fix belongs to</param>
public void WriteQAdrFix(long lba) => WriteMessageWithPosition(lba, "fixed Q subchannel with correct ADR.");
/// <summary>
/// Logs message indicating the CONTROL field of the Q subchannel has been fixed
/// </summary>
/// <summary>Logs message indicating the CONTROL field of the Q subchannel has been fixed</summary>
/// <param name="lba">LBA fix belongs to</param>
public void WriteQCtrlFix(long lba) =>
WriteMessageWithPosition(lba, "fixed Q subchannel with correct CONTROL.");
/// <summary>
/// Logs message indicating the ZERO field of the Q subchannel has been fixed
/// </summary>
/// <summary>Logs message indicating the ZERO field of the Q subchannel has been fixed</summary>
/// <param name="lba">LBA fix belongs to</param>
public void WriteQZeroFix(long lba) => WriteMessageWithPosition(lba, "fixed Q subchannel with correct ZERO.");
/// <summary>
/// Logs message indicating the TNO field of the Q subchannel has been fixed
/// </summary>
/// <summary>Logs message indicating the TNO field of the Q subchannel has been fixed</summary>
/// <param name="lba">LBA fix belongs to</param>
public void WriteQTnoFix(long lba) => WriteMessageWithPosition(lba, "fixed Q subchannel with correct TNO.");
/// <summary>
/// Logs message indicating the INDEX field of the Q subchannel has been fixed
/// </summary>
/// <summary>Logs message indicating the INDEX field of the Q subchannel has been fixed</summary>
/// <param name="lba">LBA fix belongs to</param>
public void WriteQIndexFix(long lba) => WriteMessageWithPosition(lba, "fixed Q subchannel with correct INDEX.");
/// <summary>
/// Logs message indicating the relative position of the Q subchannel has been fixed
/// </summary>
/// <summary>Logs message indicating the relative position of the Q subchannel has been fixed</summary>
/// <param name="lba">LBA fix belongs to</param>
public void WriteQRelPosFix(long lba) =>
WriteMessageWithPosition(lba, "fixed Q subchannel with correct RELATIVE POSITION.");
/// <summary>
/// Logs message indicating the absolute position of the Q subchannel has been fixed
/// </summary>
/// <summary>Logs message indicating the absolute position of the Q subchannel has been fixed</summary>
/// <param name="lba">LBA fix belongs to</param>
public void WriteQAbsPosFix(long lba) =>
WriteMessageWithPosition(lba, "fixed Q subchannel with correct ABSOLUTE POSITION.");
/// <summary>
/// Logs message indicating the CRC of the Q subchannel has been fixed
/// </summary>
/// <summary>Logs message indicating the CRC of the Q subchannel has been fixed</summary>
/// <param name="lba">LBA fix belongs to</param>
public void WriteQCrcFix(long lba) => WriteMessageWithPosition(lba, "fixed Q subchannel with correct CRC.");
/// <summary>
/// Logs message indicating the the Q subchannel has been fixed with a known good MCN
/// </summary>
/// <summary>Logs message indicating the the Q subchannel has been fixed with a known good MCN</summary>
/// <param name="lba">LBA fix belongs to</param>
public void WriteQMcnFix(long lba) => WriteMessageWithPosition(lba, "fixed Q subchannel with known good MCN.");
/// <summary>
/// Logs message indicating the the Q subchannel has been fixed with a known good ISRC
/// </summary>
/// <summary>Logs message indicating the the Q subchannel has been fixed with a known good ISRC</summary>
/// <param name="lba">LBA fix belongs to</param>
public void WriteQIsrcFix(long lba) =>
WriteMessageWithPosition(lba, "fixed Q subchannel with known good ISRC.");
/// <summary>
/// Logs a message with a specified position
/// </summary>
/// <summary>Logs a message with a specified position</summary>
/// <param name="lba">LBA position</param>
/// <param name="message">Message to log</param>
public void WriteMessageWithPosition(long lba, string message)

View File

@@ -41,9 +41,7 @@ using Aaru.Helpers;
namespace Aaru.Core.Media
{
/// <summary>
/// Operations over CD based media
/// </summary>
/// <summary>Operations over CD based media</summary>
public static class CompactDisc
{
/// <summary>Writes subchannel data to an image</summary>

View File

@@ -51,9 +51,7 @@ using DMI = Aaru.Decoders.Xbox.DMI;
namespace Aaru.Core.Media.Detection
{
/// <summary>
/// Detects media type for MMC class devices
/// </summary>
/// <summary>Detects media type for MMC class devices</summary>
public static class MMC
{
/// <summary>SHA256 of PlayStation 2 boot sectors, seen in PAL discs</summary>

View File

@@ -45,9 +45,7 @@ using Device = Aaru.Database.Models.Device;
namespace Aaru.Core.Media.Info
{
/// <summary>
/// Core operations for retrieving information about CD based media
/// </summary>
/// <summary>Core operations for retrieving information about CD based media</summary>
public static class CompactDisc
{
/// <summary>Gets the offset bytes from a Compact Disc</summary>

View File

@@ -53,14 +53,10 @@ using Inquiry = Aaru.CommonTypes.Structs.Devices.SCSI.Inquiry;
namespace Aaru.Core.Media.Info
{
/// <summary>
/// Retrieves information from a SCSI device
/// </summary>
/// <summary>Retrieves information from a SCSI device</summary>
public sealed class ScsiInfo
{
/// <summary>
/// Initializes this class with the specific device, and fills in the information
/// </summary>
/// <summary>Initializes this class with the specific device, and fills in the information</summary>
/// <param name="dev">Device</param>
public ScsiInfo(Device dev)
{
@@ -1499,281 +1495,143 @@ namespace Aaru.Core.Media.Info
MediaType = tmpType;
}
/// <summary>
/// Decoded DVD Pre-Recorded Information
/// </summary>
public PRI.PreRecordedInformation? DecodedDvdPrePitInformation { get; }
/// <summary>
/// Decoded recordable DVD Physical Format Information
/// </summary>
public PFI.PhysicalFormatInformation? DecodedDvdrPfi { get; }
/// <summary>
/// Raw media serial number
/// </summary>
public byte[] MediaSerialNumber { get; }
/// <summary>
/// Raw Xbox security sectors
/// </summary>
public byte[] XboxSecuritySector { get; }
/// <summary>
/// Decoded Xbox security sectors
/// </summary>
public SS.SecuritySector? DecodedXboxSecuritySector { get; }
/// <summary>
/// Information about an XGD, XGD2 or XGD3 media
/// </summary>
public XgdInfo XgdInfo { get; }
/// <summary>
/// MMC drive raw GET CONFIGURATION
/// </summary>
public byte[] MmcConfiguration { get; }
/// <summary>
/// Raw recognized format layers
/// </summary>
public byte[] RecognizedFormatLayers { get; }
/// <summary>
/// Raw write protection status
/// </summary>
public byte[] WriteProtectionStatus { get; }
/// <summary>
/// Raw DVD Physical Format Information
/// </summary>
public byte[] DvdPfi { get; }
/// <summary>
/// Decoded DVD Physical Format Information
/// </summary>
public PFI.PhysicalFormatInformation? DecodedPfi { get; }
/// <summary>
/// Raw DVD Disc Manufacturing Information
/// </summary>
public byte[] DvdDmi { get; }
/// <summary>
/// Raw DVD Copyright Management Information
/// </summary>
public byte[] DvdCmi { get; }
/// <summary>
/// Raw DVD Burst Cutting Area
/// </summary>
public byte[] DvdBca { get; }
/// <summary>
/// Raw DVD AACS information
/// </summary>
public byte[] DvdAacs { get; }
/// <summary>
/// Raw DVD-RAM Disc Definition Structure
/// </summary>
public byte[] DvdRamDds { get; }
/// <summary>
/// Raw DVD-RAM Cartridge Status
/// </summary>
public byte[] DvdRamCartridgeStatus { get; }
/// <summary>
/// Raw DVD-RAM Spare Area Information
/// </summary>
public byte[] DvdRamSpareArea { get; }
/// <summary>
/// Raw DVD-R(W) Last Border-Out RMD
/// </summary>
public byte[] LastBorderOutRmd { get; }
/// <summary>
/// Raw DVD-R(W) Pre-Recorded Information
/// </summary>
public byte[] DvdPreRecordedInfo { get; }
/// <summary>
/// Raw DVD-R Media ID
/// </summary>
public byte[] DvdrMediaIdentifier { get; }
/// <summary>
/// Raw recordable DVD Physical Format Information
/// </summary>
public byte[] DvdrPhysicalInformation { get; }
/// <summary>
/// Raw DVD+R(W) ADIP
/// </summary>
public byte[] DvdPlusAdip { get; }
/// <summary>
/// Raw DVD+R(W) Disc Control Blocks
/// </summary>
public byte[] DvdPlusDcb { get; }
/// <summary>
/// Raw HD DVD Copyright Management Information
/// </summary>
public byte[] HddvdCopyrightInformation { get; }
/// <summary>
/// Raw HD DVD-R Medium Status
/// </summary>
public byte[] HddvdrMediumStatus { get; }
/// <summary>
/// Raw HD DVD-R(W) Last Border-Out RMD
/// </summary>
public byte[] HddvdrLastRmd { get; }
/// <summary>
/// Raw DVD-R(W) Layer Capacity
/// </summary>
public byte[] DvdrLayerCapacity { get; }
/// <summary>
/// Raw DVD-R DL Middle Zone start
/// </summary>
public byte[] DvdrDlMiddleZoneStart { get; }
/// <summary>
/// Raw DVD-R DL Jump Interval size
/// </summary>
public byte[] DvdrDlJumpIntervalSize { get; }
/// <summary>
/// Raw DVD-R DL Manual Layer Jump Start LBA
/// </summary>
public byte[] DvdrDlManualLayerJumpStartLba { get; }
/// <summary>
/// Raw DVD-R DL Remap Anchor Point
/// </summary>
public byte[] DvdrDlRemapAnchorPoint { get; }
/// <summary>
/// Raw Blu-ray Disc Information
/// </summary>
public byte[] BlurayDiscInformation { get; }
/// <summary>
/// Raw Blu-ray PAC
/// </summary>
public byte[] BlurayPac { get; }
/// <summary>
/// Raw Blu-ray Burst Cutting Area
/// </summary>
public byte[] BlurayBurstCuttingArea { get; }
/// <summary>
/// Raw Blu-ray Disc Definition Structure
/// </summary>
public byte[] BlurayDds { get; }
/// <summary>
/// Raw Blu-ray Cartridge Status
/// </summary>
public byte[] BlurayCartridgeStatus { get; }
/// <summary>
/// Raw Blu-ray Spare Area Information
/// </summary>
public byte[] BluraySpareAreaInformation { get; }
/// <summary>
/// Raw Blu-ray DFL
/// </summary>
public byte[] BlurayRawDfl { get; }
/// <summary>
/// Raw Blu-ray Pseudo OverWrite Resources
/// </summary>
public byte[] BlurayPowResources { get; }
/// <summary>
/// Raw READ TOC response
/// </summary>
public byte[] Toc { get; }
/// <summary>
/// Raw READ ATIP response
/// </summary>
public byte[] Atip { get; }
/// <summary>
/// Raw READ DISC INFORMATION response
/// </summary>
public byte[] DiscInformation { get; }
/// <summary>
/// Raw READ SESSION response
/// </summary>
public byte[] Session { get; }
/// <summary>
/// Raw READ FULL TOC response
/// </summary>
public byte[] RawToc { get; }
/// <summary>
/// Raw READ PMA response
/// </summary>
public byte[] Pma { get; }
/// <summary>
/// Raw Lead-In's CD-TEXT response
/// </summary>
public byte[] CdTextLeadIn { get; }
/// <summary>
/// Decoded READ TOC response
/// </summary>
public TOC.CDTOC? DecodedToc { get; }
/// <summary>
/// Decoded READ ATIP response
/// </summary>
public ATIP.CDATIP DecodedAtip { get; }
/// <summary>
/// Decoded READ SESSION response
/// </summary>
public Session.CDSessionInfo? DecodedSession { get; }
/// <summary>
/// Decoded READ FULL TOC response
/// </summary>
public FullTOC.CDFullTOC? FullToc { get; }
/// <summary>
/// Decoded Lead-In CD-TEXT response
/// </summary>
public CDTextOnLeadIn.CDText? DecodedCdTextLeadIn { get; }
/// <summary>
/// Raw Blu-ray track resources
/// </summary>
public byte[] BlurayTrackResources { get; }
/// <summary>
/// Decoded Blu-ray Disc Information
/// </summary>
public DiscInformation.StandardDiscInformation? DecodedDiscInformation { get; }
/// <summary>
/// Decoded Media Catalogue Number
/// </summary>
public string Mcn { get; }
/// <summary>
/// List of decoded track ISRCs
/// </summary>
public Dictionary<byte, string> Isrcs { get; }
/// <summary>
/// Set if media is inserted in drive
/// </summary>
public bool MediaInserted { get; }
/// <summary>
/// Detected media type
/// </summary>
public MediaType MediaType { get; }
/// <summary>
/// Device information
/// </summary>
public DeviceInfo DeviceInfo { get; }
/// <summary>
/// Raw READ CAPACITY(10) response
/// </summary>
public byte[] ReadCapacity { get; }
/// <summary>
/// Number of blocks in media
/// </summary>
public ulong Blocks { get; }
/// <summary>
/// Logical block size
/// </summary>
public uint BlockSize { get; }
/// <summary>
/// Raw READ CAPACITY(16) response
/// </summary>
public byte[] ReadCapacity16 { get; }
/// <summary>
/// Raw SSC Density support
/// </summary>
public byte[] DensitySupport { get; }
/// <summary>
/// Decoded SSC Density support
/// </summary>
public DensitySupport.DensitySupportHeader? DensitySupportHeader { get; }
/// <summary>
/// Raw SSC media support
/// </summary>
public byte[] MediaTypeSupport { get; }
/// <summary>
/// Decoded SSC media support
/// </summary>
public DensitySupport.MediaTypeSupportHeader? MediaTypeSupportHeader { get; }
/// <summary>
/// Raw data from DVD sector Copyright Management Information
/// </summary>
public byte[] DvdSectorCmi { get; }
/// <summary>
/// Raw DVD Disc Key
/// </summary>
public byte[] DvdDiscKey { get; }
/// <summary>Decoded DVD Pre-Recorded Information</summary>
public PRI.PreRecordedInformation? DecodedDvdPrePitInformation { get; }
/// <summary>Decoded recordable DVD Physical Format Information</summary>
public PFI.PhysicalFormatInformation? DecodedDvdrPfi { get; }
/// <summary>Raw media serial number</summary>
public byte[] MediaSerialNumber { get; }
/// <summary>Raw Xbox security sectors</summary>
public byte[] XboxSecuritySector { get; }
/// <summary>Decoded Xbox security sectors</summary>
public SS.SecuritySector? DecodedXboxSecuritySector { get; }
/// <summary>Information about an XGD, XGD2 or XGD3 media</summary>
public XgdInfo XgdInfo { get; }
/// <summary>MMC drive raw GET CONFIGURATION</summary>
public byte[] MmcConfiguration { get; }
/// <summary>Raw recognized format layers</summary>
public byte[] RecognizedFormatLayers { get; }
/// <summary>Raw write protection status</summary>
public byte[] WriteProtectionStatus { get; }
/// <summary>Raw DVD Physical Format Information</summary>
public byte[] DvdPfi { get; }
/// <summary>Decoded DVD Physical Format Information</summary>
public PFI.PhysicalFormatInformation? DecodedPfi { get; }
/// <summary>Raw DVD Disc Manufacturing Information</summary>
public byte[] DvdDmi { get; }
/// <summary>Raw DVD Copyright Management Information</summary>
public byte[] DvdCmi { get; }
/// <summary>Raw DVD Burst Cutting Area</summary>
public byte[] DvdBca { get; }
/// <summary>Raw DVD AACS information</summary>
public byte[] DvdAacs { get; }
/// <summary>Raw DVD-RAM Disc Definition Structure</summary>
public byte[] DvdRamDds { get; }
/// <summary>Raw DVD-RAM Cartridge Status</summary>
public byte[] DvdRamCartridgeStatus { get; }
/// <summary>Raw DVD-RAM Spare Area Information</summary>
public byte[] DvdRamSpareArea { get; }
/// <summary>Raw DVD-R(W) Last Border-Out RMD</summary>
public byte[] LastBorderOutRmd { get; }
/// <summary>Raw DVD-R(W) Pre-Recorded Information</summary>
public byte[] DvdPreRecordedInfo { get; }
/// <summary>Raw DVD-R Media ID</summary>
public byte[] DvdrMediaIdentifier { get; }
/// <summary>Raw recordable DVD Physical Format Information</summary>
public byte[] DvdrPhysicalInformation { get; }
/// <summary>Raw DVD+R(W) ADIP</summary>
public byte[] DvdPlusAdip { get; }
/// <summary>Raw DVD+R(W) Disc Control Blocks</summary>
public byte[] DvdPlusDcb { get; }
/// <summary>Raw HD DVD Copyright Management Information</summary>
public byte[] HddvdCopyrightInformation { get; }
/// <summary>Raw HD DVD-R Medium Status</summary>
public byte[] HddvdrMediumStatus { get; }
/// <summary>Raw HD DVD-R(W) Last Border-Out RMD</summary>
public byte[] HddvdrLastRmd { get; }
/// <summary>Raw DVD-R(W) Layer Capacity</summary>
public byte[] DvdrLayerCapacity { get; }
/// <summary>Raw DVD-R DL Middle Zone start</summary>
public byte[] DvdrDlMiddleZoneStart { get; }
/// <summary>Raw DVD-R DL Jump Interval size</summary>
public byte[] DvdrDlJumpIntervalSize { get; }
/// <summary>Raw DVD-R DL Manual Layer Jump Start LBA</summary>
public byte[] DvdrDlManualLayerJumpStartLba { get; }
/// <summary>Raw DVD-R DL Remap Anchor Point</summary>
public byte[] DvdrDlRemapAnchorPoint { get; }
/// <summary>Raw Blu-ray Disc Information</summary>
public byte[] BlurayDiscInformation { get; }
/// <summary>Raw Blu-ray PAC</summary>
public byte[] BlurayPac { get; }
/// <summary>Raw Blu-ray Burst Cutting Area</summary>
public byte[] BlurayBurstCuttingArea { get; }
/// <summary>Raw Blu-ray Disc Definition Structure</summary>
public byte[] BlurayDds { get; }
/// <summary>Raw Blu-ray Cartridge Status</summary>
public byte[] BlurayCartridgeStatus { get; }
/// <summary>Raw Blu-ray Spare Area Information</summary>
public byte[] BluraySpareAreaInformation { get; }
/// <summary>Raw Blu-ray DFL</summary>
public byte[] BlurayRawDfl { get; }
/// <summary>Raw Blu-ray Pseudo OverWrite Resources</summary>
public byte[] BlurayPowResources { get; }
/// <summary>Raw READ TOC response</summary>
public byte[] Toc { get; }
/// <summary>Raw READ ATIP response</summary>
public byte[] Atip { get; }
/// <summary>Raw READ DISC INFORMATION response</summary>
public byte[] DiscInformation { get; }
/// <summary>Raw READ SESSION response</summary>
public byte[] Session { get; }
/// <summary>Raw READ FULL TOC response</summary>
public byte[] RawToc { get; }
/// <summary>Raw READ PMA response</summary>
public byte[] Pma { get; }
/// <summary>Raw Lead-In's CD-TEXT response</summary>
public byte[] CdTextLeadIn { get; }
/// <summary>Decoded READ TOC response</summary>
public TOC.CDTOC? DecodedToc { get; }
/// <summary>Decoded READ ATIP response</summary>
public ATIP.CDATIP DecodedAtip { get; }
/// <summary>Decoded READ SESSION response</summary>
public Session.CDSessionInfo? DecodedSession { get; }
/// <summary>Decoded READ FULL TOC response</summary>
public FullTOC.CDFullTOC? FullToc { get; }
/// <summary>Decoded Lead-In CD-TEXT response</summary>
public CDTextOnLeadIn.CDText? DecodedCdTextLeadIn { get; }
/// <summary>Raw Blu-ray track resources</summary>
public byte[] BlurayTrackResources { get; }
/// <summary>Decoded Blu-ray Disc Information</summary>
public DiscInformation.StandardDiscInformation? DecodedDiscInformation { get; }
/// <summary>Decoded Media Catalogue Number</summary>
public string Mcn { get; }
/// <summary>List of decoded track ISRCs</summary>
public Dictionary<byte, string> Isrcs { get; }
/// <summary>Set if media is inserted in drive</summary>
public bool MediaInserted { get; }
/// <summary>Detected media type</summary>
public MediaType MediaType { get; }
/// <summary>Device information</summary>
public DeviceInfo DeviceInfo { get; }
/// <summary>Raw READ CAPACITY(10) response</summary>
public byte[] ReadCapacity { get; }
/// <summary>Number of blocks in media</summary>
public ulong Blocks { get; }
/// <summary>Logical block size</summary>
public uint BlockSize { get; }
/// <summary>Raw READ CAPACITY(16) response</summary>
public byte[] ReadCapacity16 { get; }
/// <summary>Raw SSC Density support</summary>
public byte[] DensitySupport { get; }
/// <summary>Decoded SSC Density support</summary>
public DensitySupport.DensitySupportHeader? DensitySupportHeader { get; }
/// <summary>Raw SSC media support</summary>
public byte[] MediaTypeSupport { get; }
/// <summary>Decoded SSC media support</summary>
public DensitySupport.MediaTypeSupportHeader? MediaTypeSupportHeader { get; }
/// <summary>Raw data from DVD sector Copyright Management Information</summary>
public byte[] DvdSectorCmi { get; }
/// <summary>Raw DVD Disc Key</summary>
public byte[] DvdDiscKey { get; }
}
}

View File

@@ -32,34 +32,20 @@
namespace Aaru.Core.Media.Info
{
/// <summary>
/// Information about an XGD, XGD2 or XGD3 media.
/// </summary>
/// <summary>Information about an XGD, XGD2 or XGD3 media.</summary>
public sealed class XgdInfo
{
/// <summary>
/// Size of the game partition
/// </summary>
/// <summary>Size of the game partition</summary>
public ulong GameSize;
/// <summary>
/// Size of layer 0 of the video partition
/// </summary>
/// <summary>Size of layer 0 of the video partition</summary>
public ulong L0Video;
/// <summary>
/// Size of layer 1 of the video partition
/// </summary>
/// <summary>Size of layer 1 of the video partition</summary>
public ulong L1Video;
/// <summary>
/// Real layer break
/// </summary>
/// <summary>Real layer break</summary>
public ulong LayerBreak;
/// <summary>
/// Size of the middle zone
/// </summary>
/// <summary>Size of the middle zone</summary>
public ulong MiddleZone;
/// <summary>
/// Total size of media
/// </summary>
/// <summary>Total size of media</summary>
public ulong TotalSize;
}
}

View File

@@ -36,14 +36,10 @@ using System.Text;
namespace Aaru.Core
{
/// <summary>
/// Option parsing
/// </summary>
/// <summary>Option parsing</summary>
public static class Options
{
/// <summary>
/// Parses a string with options
/// </summary>
/// <summary>Parses a string with options</summary>
/// <param name="options">Options string</param>
/// <returns>Options name-value dictionary</returns>
public static Dictionary<string, string> Parse(string options)

View File

@@ -37,14 +37,10 @@ using Aaru.Helpers;
namespace Aaru.Core
{
/// <summary>
/// Prints all SCSI MODE pages
/// </summary>
/// <summary>Prints all SCSI MODE pages</summary>
public static class PrintScsiModePages
{
/// <summary>
/// Prints all SCSI MODE pages
/// </summary>
/// <summary>Prints all SCSI MODE pages</summary>
/// <param name="decMode">Decoded SCSI MODE SENSE</param>
/// <param name="devType">SCSI Peripheral Type</param>
/// <param name="vendorId">SCSI vendor identification</param>

View File

@@ -111,9 +111,7 @@ namespace Aaru.Core
submitThread.Start();
}
/// <summary>
/// Updates the main database
/// </summary>
/// <summary>Updates the main database</summary>
/// <param name="create">If <c>true</c> creates the database from scratch, otherwise updates an existing database</param>
public static void UpdateMainDatabase(bool create)
{

View File

@@ -36,9 +36,7 @@ using Schemas;
namespace Aaru.Core
{
/// <summary>
/// Sidecar operations
/// </summary>
/// <summary>Sidecar operations</summary>
public sealed partial class Sidecar
{
/// <summary>Creates a metadata sidecar for a block tape (e.g. scsi streaming)</summary>
@@ -116,8 +114,8 @@ namespace Aaru.Core
};
const uint sectorsToRead = 512;
ulong sectors = (ulong)_fs.Length / blockSize;
ulong doneSectors = 0;
ulong sectors = (ulong)_fs.Length / blockSize;
ulong doneSectors = 0;
InitProgress2();

View File

@@ -37,19 +37,19 @@ namespace Aaru.Core
public sealed partial class Sidecar
{
/// <summary>Initializes a progress indicator (e.g. makes a progress bar visible)</summary>
public event InitProgressHandler InitProgressEvent;
public event InitProgressHandler InitProgressEvent;
/// <summary>Updates a progress indicator with text</summary>
public event UpdateProgressHandler UpdateProgressEvent;
public event UpdateProgressHandler UpdateProgressEvent;
/// <summary>Uninitializes a progress indicator (e.g. adds a newline to the console)</summary>
public event EndProgressHandler EndProgressEvent;
public event EndProgressHandler EndProgressEvent;
/// <summary>Initializes a secondary progress indicator (e.g. makes a progress bar visible)</summary>
public event InitProgressHandler2 InitProgressEvent2;
public event InitProgressHandler2 InitProgressEvent2;
/// <summary>Event raised to update the values of a determinate progress bar</summary>
public event UpdateProgressHandler2 UpdateProgressEvent2;
/// <summary>Event raised when the progress bar is not longer needed</summary>
public event EndProgressHandler2 EndProgressEvent2;
public event EndProgressHandler2 EndProgressEvent2;
/// <summary>Updates a status indicator</summary>
public event UpdateStatusHandler UpdateStatusEvent;
public event UpdateStatusHandler UpdateStatusEvent;
/// <summary>Initializes a progress indicator (e.g. makes a progress bar visible)</summary>
public void InitProgress() => InitProgressEvent?.Invoke();

View File

@@ -56,9 +56,7 @@ namespace Aaru.Core
FileStream _fs;
CICMMetadataType _sidecar;
/// <summary>
/// Initializes a new instance of this class
/// </summary>
/// <summary>Initializes a new instance of this class</summary>
public Sidecar()
{
_plugins = GetPluginBase.Instance;
@@ -170,9 +168,7 @@ namespace Aaru.Core
return _sidecar;
}
/// <summary>
/// Aborts sidecar running operation
/// </summary>
/// <summary>Aborts sidecar running operation</summary>
public void Abort()
{
UpdateStatus("Aborting...");

View File

@@ -627,8 +627,8 @@ namespace Aaru.Core
{
dto.Filters = new List<NameValueStats>();
foreach(string nvs in ctx.Filters.Where(c => !c.Synchronized).Select(c => c.Name).Distinct()
)
foreach(string nvs in ctx.Filters.Where(c => !c.Synchronized).Select(c => c.Name).
Distinct())
dto.Filters.Add(new NameValueStats
{
name = nvs,
@@ -868,8 +868,8 @@ namespace Aaru.Core
}
if(ctx.Filters.Any(c => !c.Synchronized))
foreach(string nvs in ctx.Filters.Where(c => !c.Synchronized).Select(c => c.Name).Distinct()
)
foreach(string nvs in ctx.Filters.Where(c => !c.Synchronized).Select(c => c.Name).
Distinct())
{
Filter existing = ctx.Filters.FirstOrDefault(c => c.Synchronized && c.Name == nvs) ??
new Filter

View File

@@ -53,7 +53,7 @@
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System"/>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\LICENSE.LGPL">
@@ -61,134 +61,134 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="EntityFramework" Version="6.4.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="3.1.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="1.1.6" />
<PackageReference Include="EntityFramework" Version="6.4.4"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.5"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="3.1.5"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.5"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="1.1.6"/>
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.3.0" PrivateAssets="all"/>
</ItemGroup>
<ItemGroup>
<Compile Include="Context.cs" />
<Compile Include="ContextFactory.cs" />
<Compile Include="Migrations\20181126222301_DeviceReportV2.cs" />
<Compile Include="Migrations\20181126222301_DeviceReportV2.Designer.cs" />
<Compile Include="Migrations\20181127001622_AddDeviceBasicFields.cs" />
<Compile Include="Migrations\20181127001622_AddDeviceBasicFields.Designer.cs" />
<Compile Include="Migrations\20181127013131_CorrectReportsDbSet.cs" />
<Compile Include="Migrations\20181127013131_CorrectReportsDbSet.Designer.cs" />
<Compile Include="Migrations\20181221015906_NameValueStatistics.cs" />
<Compile Include="Migrations\20181221015906_NameValueStatistics.Designer.cs" />
<Compile Include="Migrations\20181221032605_MediaStatistics.cs" />
<Compile Include="Migrations\20181221032605_MediaStatistics.Designer.cs" />
<Compile Include="Migrations\20181221034941_SeenDevicesStatistics.cs" />
<Compile Include="Migrations\20181221034941_SeenDevicesStatistics.Designer.cs" />
<Compile Include="Migrations\20181221040408_OperatingSystemStatistics.cs" />
<Compile Include="Migrations\20181221040408_OperatingSystemStatistics.Designer.cs" />
<Compile Include="Migrations\20181221041242_VersionStatistics.cs" />
<Compile Include="Migrations\20181221041242_VersionStatistics.Designer.cs" />
<Compile Include="Migrations\20181221125353_AddStatsCounters.cs" />
<Compile Include="Migrations\20181221125353_AddStatsCounters.Designer.cs" />
<Compile Include="Migrations\20181223183913_FixUnsignedFields.cs" />
<Compile Include="Migrations\20181223183913_FixUnsignedFields.Designer.cs" />
<Compile Include="Migrations\20181223214411_UseBinaryDataForIdentifyInquiryAndModesInReports.cs" />
<Compile Include="Migrations\20181223214411_UseBinaryDataForIdentifyInquiryAndModesInReports.Designer.cs" />
<Compile Include="Migrations\20181224044809_StoreUsbIdsInDatabase.cs" />
<Compile Include="Migrations\20181224044809_StoreUsbIdsInDatabase.Designer.cs" />
<Compile Include="Migrations\20181224172147_FixUsbIdsAndIndexes.cs" />
<Compile Include="Migrations\20181224172147_FixUsbIdsAndIndexes.Designer.cs" />
<Compile Include="Migrations\20181225002740_AddCdOffsets.cs" />
<Compile Include="Migrations\20181225002740_AddCdOffsets.Designer.cs" />
<Compile Include="Migrations\20181225152947_StoreMmcGetConfigurationResponse.cs" />
<Compile Include="Migrations\20181225152947_StoreMmcGetConfigurationResponse.Designer.cs" />
<Compile Include="Migrations\20181225214500_StoreReadResultsInReportDatabase.cs" />
<Compile Include="Migrations\20181225214500_StoreReadResultsInReportDatabase.Designer.cs" />
<Compile Include="Migrations\20190102061236_AddMultisessionLeadTest.cs" />
<Compile Include="Migrations\20190102061236_AddMultisessionLeadTest.Designer.cs" />
<Compile Include="Migrations\20190102230036_AddOptimalReadMultipleCount.cs" />
<Compile Include="Migrations\20190102230036_AddOptimalReadMultipleCount.Designer.cs" />
<Compile Include="Migrations\20190108013456_AddChangeableScsiModes.cs" />
<Compile Include="Migrations\20190108013456_AddChangeableScsiModes.Designer.cs" />
<Compile Include="Migrations\20190525183723_IdForDensityCode.cs" />
<Compile Include="Migrations\20190525183723_IdForDensityCode.Designer.cs" />
<Compile Include="Migrations\20191103000828_MakeFieldsUnsigned.cs" />
<Compile Include="Migrations\20191103000828_MakeFieldsUnsigned.Designer.cs" />
<Compile Include="Migrations\20191207175444_SyncWithServerChanges.cs" />
<Compile Include="Migrations\20191207175444_SyncWithServerChanges.Designer.cs" />
<Compile Include="Migrations\20191207183522_AddNameCountModel.cs" />
<Compile Include="Migrations\20191207183522_AddNameCountModel.Designer.cs" />
<Compile Include="Migrations\20191207184342_AddRemoteStats.cs" />
<Compile Include="Migrations\20191207184342_AddRemoteStats.Designer.cs" />
<Compile Include="Migrations\20200710140320_FixIndexes.cs" />
<Compile Include="Migrations\20200710140320_FixIndexes.Designer.cs" />
<Compile Include="Migrations\20200710164101_AddCanReadGdRomUsingSwapDisc.cs" />
<Compile Include="Migrations\20200710164101_AddCanReadGdRomUsingSwapDisc.Designer.cs" />
<Compile Include="Migrations\20200710170129_AddGdRomSwapDiscCapabilities.cs" />
<Compile Include="Migrations\20200710170129_AddGdRomSwapDiscCapabilities.Designer.cs" />
<Compile Include="Migrations\20200710192426_MakeCanReadGdRomUsingSwapDiscNullable.cs" />
<Compile Include="Migrations\20200710192426_MakeCanReadGdRomUsingSwapDiscNullable.Designer.cs" />
<Compile Include="Migrations\20200710194507_AddAudioFieldsToGdromReadCapabilities.cs" />
<Compile Include="Migrations\20200710194507_AddAudioFieldsToGdromReadCapabilities.Designer.cs" />
<Compile Include="Migrations\20200711182425_AddFieldsForF1hCommand06hSubcommand.cs" />
<Compile Include="Migrations\20200711182425_AddFieldsForF1hCommand06hSubcommand.Designer.cs" />
<Compile Include="Migrations\20200711230202_FixGdRomCapabilitiesFieldName.cs" />
<Compile Include="Migrations\20200711230202_FixGdRomCapabilitiesFieldName.Designer.cs" />
<Compile Include="Migrations\AaruContextModelSnapshot.cs" />
<Compile Include="Models\BaseModel.cs" />
<Compile Include="Models\BaseOperatingSystem.cs" />
<Compile Include="Models\CdOffset.cs" />
<Compile Include="Models\Command.cs" />
<Compile Include="Models\Device.cs" />
<Compile Include="Models\DeviceStat.cs" />
<Compile Include="Models\Filesystem.cs" />
<Compile Include="Models\Filter.cs" />
<Compile Include="Models\Media.cs" />
<Compile Include="Models\MediaFormat.cs" />
<Compile Include="Models\NameCountModel.cs" />
<Compile Include="Models\OperatingSystem.cs" />
<Compile Include="Models\Partition.cs" />
<Compile Include="Models\RemoteApplication.cs" />
<Compile Include="Models\RemoteArchitecture.cs" />
<Compile Include="Models\RemoteOperatingSystem.cs" />
<Compile Include="Models\Report.cs" />
<Compile Include="Models\UsbProduct.cs" />
<Compile Include="Models\UsbVendor.cs" />
<Compile Include="Models\Version.cs" />
<Compile Include="Context.cs"/>
<Compile Include="ContextFactory.cs"/>
<Compile Include="Migrations\20181126222301_DeviceReportV2.cs"/>
<Compile Include="Migrations\20181126222301_DeviceReportV2.Designer.cs"/>
<Compile Include="Migrations\20181127001622_AddDeviceBasicFields.cs"/>
<Compile Include="Migrations\20181127001622_AddDeviceBasicFields.Designer.cs"/>
<Compile Include="Migrations\20181127013131_CorrectReportsDbSet.cs"/>
<Compile Include="Migrations\20181127013131_CorrectReportsDbSet.Designer.cs"/>
<Compile Include="Migrations\20181221015906_NameValueStatistics.cs"/>
<Compile Include="Migrations\20181221015906_NameValueStatistics.Designer.cs"/>
<Compile Include="Migrations\20181221032605_MediaStatistics.cs"/>
<Compile Include="Migrations\20181221032605_MediaStatistics.Designer.cs"/>
<Compile Include="Migrations\20181221034941_SeenDevicesStatistics.cs"/>
<Compile Include="Migrations\20181221034941_SeenDevicesStatistics.Designer.cs"/>
<Compile Include="Migrations\20181221040408_OperatingSystemStatistics.cs"/>
<Compile Include="Migrations\20181221040408_OperatingSystemStatistics.Designer.cs"/>
<Compile Include="Migrations\20181221041242_VersionStatistics.cs"/>
<Compile Include="Migrations\20181221041242_VersionStatistics.Designer.cs"/>
<Compile Include="Migrations\20181221125353_AddStatsCounters.cs"/>
<Compile Include="Migrations\20181221125353_AddStatsCounters.Designer.cs"/>
<Compile Include="Migrations\20181223183913_FixUnsignedFields.cs"/>
<Compile Include="Migrations\20181223183913_FixUnsignedFields.Designer.cs"/>
<Compile Include="Migrations\20181223214411_UseBinaryDataForIdentifyInquiryAndModesInReports.cs"/>
<Compile Include="Migrations\20181223214411_UseBinaryDataForIdentifyInquiryAndModesInReports.Designer.cs"/>
<Compile Include="Migrations\20181224044809_StoreUsbIdsInDatabase.cs"/>
<Compile Include="Migrations\20181224044809_StoreUsbIdsInDatabase.Designer.cs"/>
<Compile Include="Migrations\20181224172147_FixUsbIdsAndIndexes.cs"/>
<Compile Include="Migrations\20181224172147_FixUsbIdsAndIndexes.Designer.cs"/>
<Compile Include="Migrations\20181225002740_AddCdOffsets.cs"/>
<Compile Include="Migrations\20181225002740_AddCdOffsets.Designer.cs"/>
<Compile Include="Migrations\20181225152947_StoreMmcGetConfigurationResponse.cs"/>
<Compile Include="Migrations\20181225152947_StoreMmcGetConfigurationResponse.Designer.cs"/>
<Compile Include="Migrations\20181225214500_StoreReadResultsInReportDatabase.cs"/>
<Compile Include="Migrations\20181225214500_StoreReadResultsInReportDatabase.Designer.cs"/>
<Compile Include="Migrations\20190102061236_AddMultisessionLeadTest.cs"/>
<Compile Include="Migrations\20190102061236_AddMultisessionLeadTest.Designer.cs"/>
<Compile Include="Migrations\20190102230036_AddOptimalReadMultipleCount.cs"/>
<Compile Include="Migrations\20190102230036_AddOptimalReadMultipleCount.Designer.cs"/>
<Compile Include="Migrations\20190108013456_AddChangeableScsiModes.cs"/>
<Compile Include="Migrations\20190108013456_AddChangeableScsiModes.Designer.cs"/>
<Compile Include="Migrations\20190525183723_IdForDensityCode.cs"/>
<Compile Include="Migrations\20190525183723_IdForDensityCode.Designer.cs"/>
<Compile Include="Migrations\20191103000828_MakeFieldsUnsigned.cs"/>
<Compile Include="Migrations\20191103000828_MakeFieldsUnsigned.Designer.cs"/>
<Compile Include="Migrations\20191207175444_SyncWithServerChanges.cs"/>
<Compile Include="Migrations\20191207175444_SyncWithServerChanges.Designer.cs"/>
<Compile Include="Migrations\20191207183522_AddNameCountModel.cs"/>
<Compile Include="Migrations\20191207183522_AddNameCountModel.Designer.cs"/>
<Compile Include="Migrations\20191207184342_AddRemoteStats.cs"/>
<Compile Include="Migrations\20191207184342_AddRemoteStats.Designer.cs"/>
<Compile Include="Migrations\20200710140320_FixIndexes.cs"/>
<Compile Include="Migrations\20200710140320_FixIndexes.Designer.cs"/>
<Compile Include="Migrations\20200710164101_AddCanReadGdRomUsingSwapDisc.cs"/>
<Compile Include="Migrations\20200710164101_AddCanReadGdRomUsingSwapDisc.Designer.cs"/>
<Compile Include="Migrations\20200710170129_AddGdRomSwapDiscCapabilities.cs"/>
<Compile Include="Migrations\20200710170129_AddGdRomSwapDiscCapabilities.Designer.cs"/>
<Compile Include="Migrations\20200710192426_MakeCanReadGdRomUsingSwapDiscNullable.cs"/>
<Compile Include="Migrations\20200710192426_MakeCanReadGdRomUsingSwapDiscNullable.Designer.cs"/>
<Compile Include="Migrations\20200710194507_AddAudioFieldsToGdromReadCapabilities.cs"/>
<Compile Include="Migrations\20200710194507_AddAudioFieldsToGdromReadCapabilities.Designer.cs"/>
<Compile Include="Migrations\20200711182425_AddFieldsForF1hCommand06hSubcommand.cs"/>
<Compile Include="Migrations\20200711182425_AddFieldsForF1hCommand06hSubcommand.Designer.cs"/>
<Compile Include="Migrations\20200711230202_FixGdRomCapabilitiesFieldName.cs"/>
<Compile Include="Migrations\20200711230202_FixGdRomCapabilitiesFieldName.Designer.cs"/>
<Compile Include="Migrations\AaruContextModelSnapshot.cs"/>
<Compile Include="Models\BaseModel.cs"/>
<Compile Include="Models\BaseOperatingSystem.cs"/>
<Compile Include="Models\CdOffset.cs"/>
<Compile Include="Models\Command.cs"/>
<Compile Include="Models\Device.cs"/>
<Compile Include="Models\DeviceStat.cs"/>
<Compile Include="Models\Filesystem.cs"/>
<Compile Include="Models\Filter.cs"/>
<Compile Include="Models\Media.cs"/>
<Compile Include="Models\MediaFormat.cs"/>
<Compile Include="Models\NameCountModel.cs"/>
<Compile Include="Models\OperatingSystem.cs"/>
<Compile Include="Models\Partition.cs"/>
<Compile Include="Models\RemoteApplication.cs"/>
<Compile Include="Models\RemoteArchitecture.cs"/>
<Compile Include="Models\RemoteOperatingSystem.cs"/>
<Compile Include="Models\Report.cs"/>
<Compile Include="Models\UsbProduct.cs"/>
<Compile Include="Models\UsbVendor.cs"/>
<Compile Include="Models\Version.cs"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Aaru.CommonTypes\Aaru.CommonTypes.csproj" />
<ProjectReference Include="..\Aaru.Decoders\Aaru.Decoders.csproj" />
<ProjectReference Include="..\Aaru.CommonTypes\Aaru.CommonTypes.csproj"/>
<ProjectReference Include="..\Aaru.Decoders\Aaru.Decoders.csproj"/>
</ItemGroup>
<ProjectExtensions>
<MonoDevelop>
<Properties>
<Policies>
<StandardHeader IncludeInNewFiles="True" Text="/***************************************************************************&#xA;Aaru Data Preservation Suite&#xA;----------------------------------------------------------------------------&#xA; &#xA;Filename : ${FileName}&#xA;Author(s) : ${AuthorName} &lt;${AuthorEmail}&gt;&#xA;&#xA;Component : Component&#xA; &#xA;--[ Description ] ----------------------------------------------------------&#xA; &#xA; Description&#xA; &#xA;--[ License ] --------------------------------------------------------------&#xA; &#xA; This library is free software; you can redistribute it and/or modify&#xA; it under the terms of the GNU Lesser General Public License as&#xA; published by the Free Software Foundation; either version 2.1 of the&#xA; License, or (at your option) any later version.&#xA;&#xA; This library is distributed in the hope that it will be useful, but&#xA; WITHOUT ANY WARRANTY; without even the implied warranty of&#xA; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU&#xA; Lesser General Public License for more details.&#xA;&#xA; You should have received a copy of the GNU Lesser General Public&#xA; License along with this library; if not, see &lt;http://www.gnu.org/licenses/&gt;.&#xA;&#xA;----------------------------------------------------------------------------&#xA;Copyright © 2011-${Year} ${CopyrightHolder}&#xA;****************************************************************************/" />
<TextStylePolicy FileWidth="120" TabWidth="4" IndentWidth="4" RemoveTrailingWhitespace="True" NoTabsAfterNonTabs="False" EolMarker="Native" TabsToSpaces="True" scope="text/x-csharp" />
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchSection="True" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="True" NewLinesForBracesInAccessors="True" NewLinesForBracesInAnonymousMethods="True" NewLinesForBracesInControlBlocks="True" NewLinesForBracesInAnonymousTypes="True" NewLinesForBracesInObjectCollectionArrayInitializers="True" NewLinesForBracesInLambdaExpressionBody="True" NewLineForElse="True" NewLineForCatch="True" NewLineForFinally="True" NewLineForMembersInObjectInit="True" NewLineForMembersInAnonymousTypes="True" NewLineForClausesInQuery="True" SpacingAfterMethodDeclarationName="False" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="False" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="False" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" PlaceSystemDirectiveFirst="True" SpaceAfterControlFlowStatementKeyword="False" scope="text/x-csharp" />
<StandardHeader IncludeInNewFiles="True" Text="/***************************************************************************&#xA;Aaru Data Preservation Suite&#xA;----------------------------------------------------------------------------&#xA; &#xA;Filename : ${FileName}&#xA;Author(s) : ${AuthorName} &lt;${AuthorEmail}&gt;&#xA;&#xA;Component : Component&#xA; &#xA;--[ Description ] ----------------------------------------------------------&#xA; &#xA; Description&#xA; &#xA;--[ License ] --------------------------------------------------------------&#xA; &#xA; This library is free software; you can redistribute it and/or modify&#xA; it under the terms of the GNU Lesser General Public License as&#xA; published by the Free Software Foundation; either version 2.1 of the&#xA; License, or (at your option) any later version.&#xA;&#xA; This library is distributed in the hope that it will be useful, but&#xA; WITHOUT ANY WARRANTY; without even the implied warranty of&#xA; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU&#xA; Lesser General Public License for more details.&#xA;&#xA; You should have received a copy of the GNU Lesser General Public&#xA; License along with this library; if not, see &lt;http://www.gnu.org/licenses/&gt;.&#xA;&#xA;----------------------------------------------------------------------------&#xA;Copyright © 2011-${Year} ${CopyrightHolder}&#xA;****************************************************************************/"/>
<TextStylePolicy FileWidth="120" TabWidth="4" IndentWidth="4" RemoveTrailingWhitespace="True" NoTabsAfterNonTabs="False" EolMarker="Native" TabsToSpaces="True" scope="text/x-csharp"/>
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchSection="True" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="True" NewLinesForBracesInAccessors="True" NewLinesForBracesInAnonymousMethods="True" NewLinesForBracesInControlBlocks="True" NewLinesForBracesInAnonymousTypes="True" NewLinesForBracesInObjectCollectionArrayInitializers="True" NewLinesForBracesInLambdaExpressionBody="True" NewLineForElse="True" NewLineForCatch="True" NewLineForFinally="True" NewLineForMembersInObjectInit="True" NewLineForMembersInAnonymousTypes="True" NewLineForClausesInQuery="True" SpacingAfterMethodDeclarationName="False" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="False" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="False" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" PlaceSystemDirectiveFirst="True" SpaceAfterControlFlowStatementKeyword="False" scope="text/x-csharp"/>
</Policies>
</Properties>
</MonoDevelop>
</ProjectExtensions>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
<!-- Look in the standard install locations -->
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net40'">$(BaseFrameworkPathOverrideForMono)/4.0-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
<!-- Look in the standard install locations -->
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net40'">$(BaseFrameworkPathOverrideForMono)/4.0-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
</PropertyGroup>
</Project>

View File

@@ -36,92 +36,52 @@ using Microsoft.EntityFrameworkCore;
namespace Aaru.Database
{
/// <inheritdoc />
/// <summary>
/// Database context
/// </summary>
/// <summary>Database context</summary>
public sealed class AaruContext : DbContext
{
/// <inheritdoc />
/// <summary>
/// Creates a database context with the specified options
/// </summary>
/// <summary>Creates a database context with the specified options</summary>
/// <param name="options">Options</param>
public AaruContext(DbContextOptions options) : base(options) {}
/// <summary>
/// List of known devices
/// </summary>
public DbSet<Device> Devices { get; set; }
/// <summary>
/// List of local device reports
/// </summary>
public DbSet<Report> Reports { get; set; }
/// <summary>
/// Command usage statistics
/// </summary>
public DbSet<Command> Commands { get; set; }
/// <summary>
/// Statistics for found filesystems
/// </summary>
public DbSet<Filesystem> Filesystems { get; set; }
/// <summary>
/// Statistics for used filters
/// </summary>
public DbSet<Filter> Filters { get; set; }
/// <summary>
/// Statistics for media image formats
/// </summary>
public DbSet<MediaFormat> MediaFormats { get; set; }
/// <summary>
/// Statistics for partitioning schemes
/// </summary>
public DbSet<Partition> Partitions { get; set; }
/// <summary>
/// Statistics for media types
/// </summary>
public DbSet<Media> Medias { get; set; }
/// <summary>
/// Statistics for devices seen using commands
/// </summary>
public DbSet<DeviceStat> SeenDevices { get; set; }
/// <summary>
/// Statistics for operating systems
/// </summary>
public DbSet<OperatingSystem> OperatingSystems { get; set; }
/// <summary>
/// Statistics for used Aaru versions
/// </summary>
public DbSet<Version> Versions { get; set; }
/// <summary>
/// List of known USB vendors
/// </summary>
public DbSet<UsbVendor> UsbVendors { get; set; }
/// <summary>
/// List of known USB products
/// </summary>
public DbSet<UsbProduct> UsbProducts { get; set; }
/// <summary>
/// List of CD reading offsets
/// </summary>
public DbSet<CdOffset> CdOffsets { get; set; }
/// <summary>
/// Statistics of remote applications
/// </summary>
public DbSet<RemoteApplication> RemoteApplications { get; set; }
/// <summary>
/// Statistics of remote architectures
/// </summary>
public DbSet<RemoteArchitecture> RemoteArchitectures { get; set; }
/// <summary>
/// Statistics of remote operating systems
/// </summary>
/// <summary>List of known devices</summary>
public DbSet<Device> Devices { get; set; }
/// <summary>List of local device reports</summary>
public DbSet<Report> Reports { get; set; }
/// <summary>Command usage statistics</summary>
public DbSet<Command> Commands { get; set; }
/// <summary>Statistics for found filesystems</summary>
public DbSet<Filesystem> Filesystems { get; set; }
/// <summary>Statistics for used filters</summary>
public DbSet<Filter> Filters { get; set; }
/// <summary>Statistics for media image formats</summary>
public DbSet<MediaFormat> MediaFormats { get; set; }
/// <summary>Statistics for partitioning schemes</summary>
public DbSet<Partition> Partitions { get; set; }
/// <summary>Statistics for media types</summary>
public DbSet<Media> Medias { get; set; }
/// <summary>Statistics for devices seen using commands</summary>
public DbSet<DeviceStat> SeenDevices { get; set; }
/// <summary>Statistics for operating systems</summary>
public DbSet<OperatingSystem> OperatingSystems { get; set; }
/// <summary>Statistics for used Aaru versions</summary>
public DbSet<Version> Versions { get; set; }
/// <summary>List of known USB vendors</summary>
public DbSet<UsbVendor> UsbVendors { get; set; }
/// <summary>List of known USB products</summary>
public DbSet<UsbProduct> UsbProducts { get; set; }
/// <summary>List of CD reading offsets</summary>
public DbSet<CdOffset> CdOffsets { get; set; }
/// <summary>Statistics of remote applications</summary>
public DbSet<RemoteApplication> RemoteApplications { get; set; }
/// <summary>Statistics of remote architectures</summary>
public DbSet<RemoteArchitecture> RemoteArchitectures { get; set; }
/// <summary>Statistics of remote operating systems</summary>
public DbSet<RemoteOperatingSystem> RemoteOperatingSystems { get; set; }
// Note: If table does not appear check that last migration has been REALLY added to the project
/// <summary>
/// Creates a database context with the database in the specified path
/// </summary>
/// <summary>Creates a database context with the database in the specified path</summary>
/// <param name="dbPath">Path to database file</param>
/// <returns>Database context</returns>
public static AaruContext Create(string dbPath)

View File

@@ -35,15 +35,11 @@ using Microsoft.EntityFrameworkCore.Design;
namespace Aaru.Database
{
/// <inheritdoc />
/// <summary>
/// Database context factory, for design time
/// </summary>
/// <summary>Database context factory, for design time</summary>
public class AaruContextFactory : IDesignTimeDbContextFactory<AaruContext>
{
/// <inheritdoc />
/// <summary>
/// Creates a database context
/// </summary>
/// <summary>Creates a database context</summary>
/// <param name="args">Ignored parameters</param>
/// <returns>A database context</returns>
public AaruContext CreateDbContext(string[] args) => AaruContext.Create("aaru.db");

View File

@@ -34,14 +34,10 @@ using System.ComponentModel.DataAnnotations;
namespace Aaru.Database.Models
{
/// <summary>
/// Base database model
/// </summary>
/// <summary>Base database model</summary>
public abstract class BaseModel
{
/// <summary>
/// Database ID
/// </summary>
/// <summary>Database ID</summary>
[Key]
public int Id { get; set; }
}

View File

@@ -33,26 +33,16 @@
namespace Aaru.Database.Models
{
/// <inheritdoc />
/// <summary>
/// Operating system statistics
/// </summary>
/// <summary>Operating system statistics</summary>
public abstract class BaseOperatingSystem : BaseModel
{
/// <summary>
/// Operating system name
/// </summary>
public string Name { get; set; }
/// <summary>
/// Operating system version
/// </summary>
public string Version { get; set; }
/// <summary>
/// Has already been synchronized with Aaru's server
/// </summary>
public bool Synchronized { get; set; }
/// <summary>
/// Statistical count
/// </summary>
public ulong Count { get; set; }
/// <summary>Operating system name</summary>
public string Name { get; set; }
/// <summary>Operating system version</summary>
public string Version { get; set; }
/// <summary>Has already been synchronized with Aaru's server</summary>
public bool Synchronized { get; set; }
/// <summary>Statistical count</summary>
public ulong Count { get; set; }
}
}

View File

@@ -35,19 +35,13 @@ using System;
namespace Aaru.Database.Models
{
/// <inheritdoc />
/// <summary>
/// CD read offset
/// </summary>
/// <summary>CD read offset</summary>
public class CdOffset : CommonTypes.Metadata.CdOffset
{
/// <summary>
/// Builds an empty CD read offset
/// </summary>
/// <summary>Builds an empty CD read offset</summary>
public CdOffset() {}
/// <summary>
/// Builds a CD read offset with the specified parameters
/// </summary>
/// <summary>Builds a CD read offset with the specified parameters</summary>
/// <param name="manufacturer">Manufacturer</param>
/// <param name="model">Model</param>
/// <param name="offset">Read offset</param>
@@ -63,9 +57,7 @@ namespace Aaru.Database.Models
AddedWhen = ModifiedWhen = DateTime.UtcNow;
}
/// <summary>
/// Builds a CD read offset from the metadata type
/// </summary>
/// <summary>Builds a CD read offset from the metadata type</summary>
/// <param name="offset">Read offset metadata</param>
public CdOffset(CommonTypes.Metadata.CdOffset offset)
{
@@ -77,17 +69,11 @@ namespace Aaru.Database.Models
AddedWhen = ModifiedWhen = DateTime.UtcNow;
}
/// <summary>
/// Database ID
/// </summary>
public int Id { get; set; }
/// <summary>
/// Date when model has been added to the database
/// </summary>
public DateTime AddedWhen { get; set; }
/// <summary>
/// Date when model was last modified
/// </summary>
/// <summary>Database ID</summary>
public int Id { get; set; }
/// <summary>Date when model has been added to the database</summary>
public DateTime AddedWhen { get; set; }
/// <summary>Date when model was last modified</summary>
public DateTime ModifiedWhen { get; set; }
}
}

View File

@@ -33,8 +33,6 @@
namespace Aaru.Database.Models
{
/// <inheritdoc />
/// <summary>
/// Command statistics.
/// </summary>
/// <summary>Command statistics.</summary>
public class Command : NameCountModel {}
}

View File

@@ -37,19 +37,13 @@ using Aaru.CommonTypes.Metadata;
namespace Aaru.Database.Models
{
/// <summary>
/// Known device
/// </summary>
/// <summary>Known device</summary>
public class Device : DeviceReportV2
{
/// <summary>
/// Builds an empty device
/// </summary>
/// <summary>Builds an empty device</summary>
public Device() => LastSynchronized = DateTime.UtcNow;
/// <summary>
/// Builds a device from a device report
/// </summary>
/// <summary>Builds a device from a device report</summary>
/// <param name="report">Device report</param>
[SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")]
public Device(DeviceReportV2 report)
@@ -71,20 +65,14 @@ namespace Aaru.Database.Models
GdRomSwapDiscCapabilities = report.GdRomSwapDiscCapabilities;
}
/// <summary>
/// When this known device was last synchronized with the server
/// </summary>
/// <summary>When this known device was last synchronized with the server</summary>
public DateTime LastSynchronized { get; set; }
/// <summary>
/// Optimal number of blocks to read at once
/// </summary>
/// <summary>Optimal number of blocks to read at once</summary>
[DefaultValue(0)]
public int OptimalMultipleSectorsRead { get; set; }
/// <summary>
/// Can read GD-ROM using swap trick?
/// </summary>
/// <summary>Can read GD-ROM using swap trick?</summary>
[DefaultValue(null)]
public bool? CanReadGdRomUsingSwapDisc { get; set; }
}

View File

@@ -33,30 +33,18 @@
namespace Aaru.Database.Models
{
/// <inheritdoc />
/// <summary>
/// Device found in usage
/// </summary>
/// <summary>Device found in usage</summary>
public class DeviceStat : BaseModel
{
/// <summary>
/// Manufacturer
/// </summary>
/// <summary>Manufacturer</summary>
public string Manufacturer { get; set; }
/// <summary>
/// Model
/// </summary>
public string Model { get; set; }
/// <summary>
/// Revision or firmware version
/// </summary>
public string Revision { get; set; }
/// <summary>
/// Bus
/// </summary>
public string Bus { get; set; }
/// <summary>
/// Has already been synchronized with Aaru's server
/// </summary>
public bool Synchronized { get; set; }
/// <summary>Model</summary>
public string Model { get; set; }
/// <summary>Revision or firmware version</summary>
public string Revision { get; set; }
/// <summary>Bus</summary>
public string Bus { get; set; }
/// <summary>Has already been synchronized with Aaru's server</summary>
public bool Synchronized { get; set; }
}
}

View File

@@ -33,8 +33,6 @@
namespace Aaru.Database.Models
{
/// <inheritdoc />
/// <summary>
/// Filesystem found
/// </summary>
/// <summary>Filesystem found</summary>
public class Filesystem : NameCountModel {}
}

View File

@@ -33,8 +33,6 @@
namespace Aaru.Database.Models
{
/// <inheritdoc />
/// <summary>
/// Filter used
/// </summary>
/// <summary>Filter used</summary>
public class Filter : NameCountModel {}
}

View File

@@ -33,26 +33,16 @@
namespace Aaru.Database.Models
{
/// <inheritdoc />
/// <summary>
/// Media type found
/// </summary>
/// <summary>Media type found</summary>
public class Media : BaseModel
{
/// <summary>
/// Media type name
/// </summary>
public string Type { get; set; }
/// <summary>
/// Found physically, or in image
/// </summary>
public bool Real { get; set; }
/// <summary>
/// Has already been synchronized with Aaru's server
/// </summary>
public bool Synchronized { get; set; }
/// <summary>
/// Count of times found
/// </summary>
public ulong Count { get; set; }
/// <summary>Media type name</summary>
public string Type { get; set; }
/// <summary>Found physically, or in image</summary>
public bool Real { get; set; }
/// <summary>Has already been synchronized with Aaru's server</summary>
public bool Synchronized { get; set; }
/// <summary>Count of times found</summary>
public ulong Count { get; set; }
}
}

View File

@@ -33,8 +33,6 @@
namespace Aaru.Database.Models
{
/// <inheritdoc />
/// <summary>
/// Media image format
/// </summary>
/// <summary>Media image format</summary>
public class MediaFormat : NameCountModel {}
}

View File

@@ -33,22 +33,14 @@
namespace Aaru.Database.Models
{
/// <inheritdoc />
/// <summary>
/// Model for name-count values.
/// </summary>
/// <summary>Model for name-count values.</summary>
public abstract class NameCountModel : BaseModel
{
/// <summary>
/// Value name
/// </summary>
public string Name { get; set; }
/// <summary>
/// Has already been synchronized with Aaru's server
/// </summary>
public bool Synchronized { get; set; }
/// <summary>
/// Value count
/// </summary>
public ulong Count { get; set; }
/// <summary>Value name</summary>
public string Name { get; set; }
/// <summary>Has already been synchronized with Aaru's server</summary>
public bool Synchronized { get; set; }
/// <summary>Value count</summary>
public ulong Count { get; set; }
}
}

View File

@@ -33,8 +33,6 @@
namespace Aaru.Database.Models
{
/// <inheritdoc />
/// <summary>
/// Operating system
/// </summary>
/// <summary>Operating system</summary>
public class OperatingSystem : BaseOperatingSystem {}
}

View File

@@ -33,8 +33,6 @@
namespace Aaru.Database.Models
{
/// <inheritdoc />
/// <summary>
/// Partitioning scheme
/// </summary>
/// <summary>Partitioning scheme</summary>
public class Partition : NameCountModel {}
}

View File

@@ -33,8 +33,6 @@
namespace Aaru.Database.Models
{
/// <inheritdoc />
/// <summary>
/// Remote application
/// </summary>
/// <summary>Remote application</summary>
public class RemoteApplication : BaseOperatingSystem {}
}

View File

@@ -33,8 +33,6 @@
namespace Aaru.Database.Models
{
/// <inheritdoc />
/// <summary>
/// Remote architecture
/// </summary>
/// <summary>Remote architecture</summary>
public class RemoteArchitecture : NameCountModel {}
}

View File

@@ -33,8 +33,6 @@
namespace Aaru.Database.Models
{
/// <inheritdoc />
/// <summary>
/// Remote operating system
/// </summary>
/// <summary>Remote operating system</summary>
public class RemoteOperatingSystem : BaseOperatingSystem {}
}

View File

@@ -36,23 +36,17 @@ using Aaru.CommonTypes.Metadata;
namespace Aaru.Database.Models
{
/// <summary>
/// Device report
/// </summary>
/// <summary>Device report</summary>
public class Report : DeviceReportV2
{
/// <summary>
/// Builds an empty device report
/// </summary>
/// <summary>Builds an empty device report</summary>
public Report()
{
Created = DateTime.UtcNow;
Uploaded = false;
}
/// <summary>
/// Builds a device report model from a device report
/// </summary>
/// <summary>Builds a device report model from a device report</summary>
/// <param name="report">Device report</param>
[SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")]
public Report(DeviceReportV2 report)
@@ -74,13 +68,9 @@ namespace Aaru.Database.Models
Type = report.Type;
}
/// <summary>
/// Date when the device report was created
/// </summary>
public DateTime Created { get; set; }
/// <summary>
/// If this model has already been upload
/// </summary>
public bool Uploaded { get; set; }
/// <summary>Date when the device report was created</summary>
public DateTime Created { get; set; }
/// <summary>If this model has already been upload</summary>
public bool Uploaded { get; set; }
}
}

View File

@@ -35,19 +35,13 @@ using System.ComponentModel.DataAnnotations;
namespace Aaru.Database.Models
{
/// <summary>
/// USB product
/// </summary>
/// <summary>USB product</summary>
public class UsbProduct
{
/// <summary>
/// Builds an empty USB product
/// </summary>
/// <summary>Builds an empty USB product</summary>
public UsbProduct() {}
/// <summary>
/// Builds a USB product with the specified parameters
/// </summary>
/// <summary>Builds a USB product with the specified parameters</summary>
/// <param name="vendorId">Vendor ID</param>
/// <param name="id">Product ID</param>
/// <param name="product">Product name</param>
@@ -59,34 +53,20 @@ namespace Aaru.Database.Models
AddedWhen = ModifiedWhen = DateTime.UtcNow;
}
/// <summary>
/// Database ID
/// </summary>
/// <summary>Database ID</summary>
[Key]
public int Id { get; set; }
/// <summary>
/// Product ID
/// </summary>
public ushort ProductId { get; set; }
/// <summary>
/// Product name
/// </summary>
public string Product { get; set; }
/// <summary>
/// Date when model has been added to the database
/// </summary>
public DateTime AddedWhen { get; set; }
/// <summary>
/// Date when model was last modified
/// </summary>
public DateTime ModifiedWhen { get; set; }
/// <summary>
/// USB vendor ID
/// </summary>
public ushort VendorId { get; set; }
/// <summary>
/// Database link to USB vendor
/// </summary>
public virtual UsbVendor Vendor { get; set; }
public int Id { get; set; }
/// <summary>Product ID</summary>
public ushort ProductId { get; set; }
/// <summary>Product name</summary>
public string Product { get; set; }
/// <summary>Date when model has been added to the database</summary>
public DateTime AddedWhen { get; set; }
/// <summary>Date when model was last modified</summary>
public DateTime ModifiedWhen { get; set; }
/// <summary>USB vendor ID</summary>
public ushort VendorId { get; set; }
/// <summary>Database link to USB vendor</summary>
public virtual UsbVendor Vendor { get; set; }
}
}

View File

@@ -36,19 +36,13 @@ using System.ComponentModel.DataAnnotations;
namespace Aaru.Database.Models
{
/// <summary>
/// USB vendor
/// </summary>
/// <summary>USB vendor</summary>
public class UsbVendor
{
/// <summary>
/// Builds an empty USB vendor
/// </summary>
/// <summary>Builds an empty USB vendor</summary>
public UsbVendor() {}
/// <summary>
/// Builds a USB vendor with the specified parameters
/// </summary>
/// <summary>Builds a USB vendor with the specified parameters</summary>
/// <param name="id">Vendor ID</param>
/// <param name="vendor">Vendor name</param>
public UsbVendor(ushort id, string vendor)
@@ -58,27 +52,17 @@ namespace Aaru.Database.Models
AddedWhen = ModifiedWhen = DateTime.UtcNow;
}
/// <summary>
/// Database ID
/// </summary>
/// <summary>Database ID</summary>
[Key]
public ushort Id { get; set; }
/// <summary>
/// Vendor name
/// </summary>
public string Vendor { get; set; }
/// <summary>
/// Date when model has been added to the database
/// </summary>
public DateTime AddedWhen { get; set; }
/// <summary>
/// Date when model was last modified
/// </summary>
public ushort Id { get; set; }
/// <summary>Vendor name</summary>
public string Vendor { get; set; }
/// <summary>Date when model has been added to the database</summary>
public DateTime AddedWhen { get; set; }
/// <summary>Date when model was last modified</summary>
public DateTime ModifiedWhen { get; set; }
/// <summary>
/// List of products from this vendor
/// </summary>
/// <summary>List of products from this vendor</summary>
public virtual ICollection<UsbProduct> Products { get; set; }
}
}

View File

@@ -33,8 +33,6 @@
namespace Aaru.Database.Models
{
/// <inheritdoc />
/// <summary>
/// Aaru version
/// </summary>
/// <summary>Aaru version</summary>
public class Version : NameCountModel {}
}

View File

@@ -55,87 +55,87 @@
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Management" />
<Reference Include="System"/>
<Reference Include="System.Management"/>
</ItemGroup>
<ItemGroup>
<Compile Include="Device\DeviceException.cs" />
<Compile Include="Device\ScsiCommands\MediaTek.cs" />
<Compile Include="Device\ScsiCommands\MiniDisc.cs" />
<Compile Include="Device\ScsiCommands\Optical.cs" />
<Compile Include="FreeBSD\ListDevices.cs" />
<Compile Include="Linux\Extern.cs" />
<Compile Include="Linux\Structs.cs" />
<Compile Include="Linux\Enums.cs" />
<Compile Include="Enums.cs" />
<Compile Include="Remote\Consts.cs" />
<Compile Include="Remote\Enums.cs" />
<Compile Include="Remote\Remote.cs" />
<Compile Include="Remote\Structs.cs" />
<Compile Include="Windows\Extern.cs" />
<Compile Include="Windows\ListDevices.cs" />
<Compile Include="Windows\Structs.cs" />
<Compile Include="Windows\Enums.cs" />
<Compile Include="Windows\Command.cs" />
<Compile Include="Linux\Command.cs" />
<Compile Include="Command.cs" />
<Compile Include="Device\Constructor.cs" />
<Compile Include="Device\Variables.cs" />
<Compile Include="Device\Destructor.cs" />
<Compile Include="Device\Commands.cs" />
<Compile Include="Device\ScsiCommands\MMC.cs" />
<Compile Include="Device\ScsiCommands\SPC.cs" />
<Compile Include="Device\ScsiCommands\SBC.cs" />
<Compile Include="Device\ScsiCommands\Pioneer.cs" />
<Compile Include="Device\ScsiCommands\Plextor.cs" />
<Compile Include="Device\ScsiCommands\NEC.cs" />
<Compile Include="Device\ScsiCommands\HL-DT-ST.cs" />
<Compile Include="Device\ScsiCommands\SSC.cs" />
<Compile Include="Device\ScsiCommands\SMC.cs" />
<Compile Include="Device\ScsiCommands\Adaptec.cs" />
<Compile Include="Device\ScsiCommands\ArchiveCorp.cs" />
<Compile Include="Device\ScsiCommands\Certance.cs" />
<Compile Include="Device\ScsiCommands\Fujitsu.cs" />
<Compile Include="Device\ScsiCommands\HP.cs" />
<Compile Include="Device\ScsiCommands\Plasmon.cs" />
<Compile Include="Device\ScsiCommands\SyQuest.cs" />
<Compile Include="Device\AtaCommands\AtaCHS.cs" />
<Compile Include="Device\AtaCommands\Atapi.cs" />
<Compile Include="Device\AtaCommands\Ata28.cs" />
<Compile Include="Device\AtaCommands\Ata48.cs" />
<Compile Include="Device\AtaCommands\Smart.cs" />
<Compile Include="Device\AtaCommands\Cfa.cs" />
<Compile Include="Device\AtaCommands\MCPT.cs" />
<Compile Include="FreeBSD\Command.cs" />
<Compile Include="FreeBSD\Enums.cs" />
<Compile Include="FreeBSD\Extern.cs" />
<Compile Include="FreeBSD\Structs.cs" />
<Compile Include="Device\MmcCommands\MMC.cs" />
<Compile Include="Device\MmcCommands\SecureDigital.cs" />
<Compile Include="Device\ScsiCommands\Kreon.cs" />
<Compile Include="Device\List.cs" />
<Compile Include="Linux\ListDevices.cs" />
<Compile Include="Windows\Usb.cs" />
<Compile Include="Windows\UsbFunctions.cs" />
<Compile Include="Device\DeviceException.cs"/>
<Compile Include="Device\ScsiCommands\MediaTek.cs"/>
<Compile Include="Device\ScsiCommands\MiniDisc.cs"/>
<Compile Include="Device\ScsiCommands\Optical.cs"/>
<Compile Include="FreeBSD\ListDevices.cs"/>
<Compile Include="Linux\Extern.cs"/>
<Compile Include="Linux\Structs.cs"/>
<Compile Include="Linux\Enums.cs"/>
<Compile Include="Enums.cs"/>
<Compile Include="Remote\Consts.cs"/>
<Compile Include="Remote\Enums.cs"/>
<Compile Include="Remote\Remote.cs"/>
<Compile Include="Remote\Structs.cs"/>
<Compile Include="Windows\Extern.cs"/>
<Compile Include="Windows\ListDevices.cs"/>
<Compile Include="Windows\Structs.cs"/>
<Compile Include="Windows\Enums.cs"/>
<Compile Include="Windows\Command.cs"/>
<Compile Include="Linux\Command.cs"/>
<Compile Include="Command.cs"/>
<Compile Include="Device\Constructor.cs"/>
<Compile Include="Device\Variables.cs"/>
<Compile Include="Device\Destructor.cs"/>
<Compile Include="Device\Commands.cs"/>
<Compile Include="Device\ScsiCommands\MMC.cs"/>
<Compile Include="Device\ScsiCommands\SPC.cs"/>
<Compile Include="Device\ScsiCommands\SBC.cs"/>
<Compile Include="Device\ScsiCommands\Pioneer.cs"/>
<Compile Include="Device\ScsiCommands\Plextor.cs"/>
<Compile Include="Device\ScsiCommands\NEC.cs"/>
<Compile Include="Device\ScsiCommands\HL-DT-ST.cs"/>
<Compile Include="Device\ScsiCommands\SSC.cs"/>
<Compile Include="Device\ScsiCommands\SMC.cs"/>
<Compile Include="Device\ScsiCommands\Adaptec.cs"/>
<Compile Include="Device\ScsiCommands\ArchiveCorp.cs"/>
<Compile Include="Device\ScsiCommands\Certance.cs"/>
<Compile Include="Device\ScsiCommands\Fujitsu.cs"/>
<Compile Include="Device\ScsiCommands\HP.cs"/>
<Compile Include="Device\ScsiCommands\Plasmon.cs"/>
<Compile Include="Device\ScsiCommands\SyQuest.cs"/>
<Compile Include="Device\AtaCommands\AtaCHS.cs"/>
<Compile Include="Device\AtaCommands\Atapi.cs"/>
<Compile Include="Device\AtaCommands\Ata28.cs"/>
<Compile Include="Device\AtaCommands\Ata48.cs"/>
<Compile Include="Device\AtaCommands\Smart.cs"/>
<Compile Include="Device\AtaCommands\Cfa.cs"/>
<Compile Include="Device\AtaCommands\MCPT.cs"/>
<Compile Include="FreeBSD\Command.cs"/>
<Compile Include="FreeBSD\Enums.cs"/>
<Compile Include="FreeBSD\Extern.cs"/>
<Compile Include="FreeBSD\Structs.cs"/>
<Compile Include="Device\MmcCommands\MMC.cs"/>
<Compile Include="Device\MmcCommands\SecureDigital.cs"/>
<Compile Include="Device\ScsiCommands\Kreon.cs"/>
<Compile Include="Device\List.cs"/>
<Compile Include="Linux\ListDevices.cs"/>
<Compile Include="Windows\Usb.cs"/>
<Compile Include="Windows\UsbFunctions.cs"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Management" Version="4.7.0" />
<PackageReference Include="System.Management" Version="4.7.0"/>
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.3.0" PrivateAssets="all"/>
</ItemGroup>
<ProjectExtensions>
<MonoDevelop>
<Properties>
<Policies>
<DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="MSBuild" />
<StandardHeader IncludeInNewFiles="True" Text="/***************************************************************************&#xA;Aaru Data Preservation Suite&#xA;----------------------------------------------------------------------------&#xA; &#xA;Filename : ${FileName}&#xA;Author(s) : ${AuthorName} &lt;${AuthorEmail}&gt;&#xA;&#xA;Component : Component&#xA; &#xA;--[ Description ] ----------------------------------------------------------&#xA; &#xA; Description&#xA; &#xA;--[ License ] --------------------------------------------------------------&#xA; &#xA; This library is free software; you can redistribute it and/or modify&#xA; it under the terms of the GNU Lesser General Public License as&#xA; published by the Free Software Foundation; either version 2.1 of the&#xA; License, or (at your option) any later version.&#xA;&#xA; This library is distributed in the hope that it will be useful, but&#xA; WITHOUT ANY WARRANTY; without even the implied warranty of&#xA; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU&#xA; Lesser General Public License for more details.&#xA;&#xA; You should have received a copy of the GNU Lesser General Public&#xA; License along with this library; if not, see &lt;http://www.gnu.org/licenses/&gt;.&#xA;&#xA;----------------------------------------------------------------------------&#xA;Copyright © 2011-${Year} ${CopyrightHolder}&#xA;****************************************************************************/" />
<TextStylePolicy FileWidth="120" TabWidth="4" IndentWidth="4" RemoveTrailingWhitespace="True" NoTabsAfterNonTabs="False" EolMarker="Native" TabsToSpaces="True" scope="text/x-csharp" />
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchSection="True" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="True" NewLinesForBracesInAccessors="True" NewLinesForBracesInAnonymousMethods="True" NewLinesForBracesInControlBlocks="True" NewLinesForBracesInAnonymousTypes="True" NewLinesForBracesInObjectCollectionArrayInitializers="True" NewLinesForBracesInLambdaExpressionBody="True" NewLineForElse="True" NewLineForCatch="True" NewLineForFinally="True" NewLineForMembersInObjectInit="True" NewLineForMembersInAnonymousTypes="True" NewLineForClausesInQuery="True" SpacingAfterMethodDeclarationName="False" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="False" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="False" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" PlaceSystemDirectiveFirst="True" SpaceAfterControlFlowStatementKeyword="False" scope="text/x-csharp" />
<DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="MSBuild"/>
<StandardHeader IncludeInNewFiles="True" Text="/***************************************************************************&#xA;Aaru Data Preservation Suite&#xA;----------------------------------------------------------------------------&#xA; &#xA;Filename : ${FileName}&#xA;Author(s) : ${AuthorName} &lt;${AuthorEmail}&gt;&#xA;&#xA;Component : Component&#xA; &#xA;--[ Description ] ----------------------------------------------------------&#xA; &#xA; Description&#xA; &#xA;--[ License ] --------------------------------------------------------------&#xA; &#xA; This library is free software; you can redistribute it and/or modify&#xA; it under the terms of the GNU Lesser General Public License as&#xA; published by the Free Software Foundation; either version 2.1 of the&#xA; License, or (at your option) any later version.&#xA;&#xA; This library is distributed in the hope that it will be useful, but&#xA; WITHOUT ANY WARRANTY; without even the implied warranty of&#xA; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU&#xA; Lesser General Public License for more details.&#xA;&#xA; You should have received a copy of the GNU Lesser General Public&#xA; License along with this library; if not, see &lt;http://www.gnu.org/licenses/&gt;.&#xA;&#xA;----------------------------------------------------------------------------&#xA;Copyright © 2011-${Year} ${CopyrightHolder}&#xA;****************************************************************************/"/>
<TextStylePolicy FileWidth="120" TabWidth="4" IndentWidth="4" RemoveTrailingWhitespace="True" NoTabsAfterNonTabs="False" EolMarker="Native" TabsToSpaces="True" scope="text/x-csharp"/>
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchSection="True" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="True" NewLinesForBracesInAccessors="True" NewLinesForBracesInAnonymousMethods="True" NewLinesForBracesInControlBlocks="True" NewLinesForBracesInAnonymousTypes="True" NewLinesForBracesInObjectCollectionArrayInitializers="True" NewLinesForBracesInLambdaExpressionBody="True" NewLineForElse="True" NewLineForCatch="True" NewLineForFinally="True" NewLineForMembersInObjectInit="True" NewLineForMembersInAnonymousTypes="True" NewLineForClausesInQuery="True" SpacingAfterMethodDeclarationName="False" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="False" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="False" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" PlaceSystemDirectiveFirst="True" SpaceAfterControlFlowStatementKeyword="False" scope="text/x-csharp"/>
</Policies>
</Properties>
</MonoDevelop>
</ProjectExtensions>
<ItemGroup>
<ProjectReference Include="..\Aaru.CommonTypes\Aaru.CommonTypes.csproj" />
<ProjectReference Include="..\Aaru.CommonTypes\Aaru.CommonTypes.csproj"/>
<ProjectReference Include="..\Aaru.Console\Aaru.Console.csproj">
<Project>{CCAA7AFE-C094-4D82-A66D-630DE8A3F545}</Project>
<Name>Aaru.Console</Name>
@@ -154,25 +154,25 @@
<Link>LICENSE.LGPL</Link>
</EmbeddedResource>
</ItemGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
<!-- Look in the standard install locations -->
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net40'">$(BaseFrameworkPathOverrideForMono)/4.0-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
<!-- Look in the standard install locations -->
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net40'">$(BaseFrameworkPathOverrideForMono)/4.0-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
</PropertyGroup>
</Project>

View File

@@ -38,9 +38,7 @@ namespace Aaru.Devices
{
public sealed partial class Device
{
/// <summary>
/// Reads the drive buffer using PIO transfer
/// </summary>
/// <summary>Reads the drive buffer using PIO transfer</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="timeout">Timeout to wait for command execution</param>
@@ -67,9 +65,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads the drive buffer using DMA transfer
/// </summary>
/// <summary>Reads the drive buffer using DMA transfer</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="timeout">Timeout to wait for command execution</param>
@@ -95,9 +91,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads sectors using 28-bit addressing and DMA transfer, retrying on error
/// </summary>
/// <summary>Reads sectors using 28-bit addressing and DMA transfer, retrying on error</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="lba">LBA of read start</param>
@@ -109,9 +103,7 @@ namespace Aaru.Devices
uint timeout, out double duration) =>
ReadDma(out buffer, out statusRegisters, true, lba, count, timeout, out duration);
/// <summary>
/// Reads sectors using 48-bit addressing and DMA transfer
/// </summary>
/// <summary>Reads sectors using 48-bit addressing and DMA transfer</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="retry">Retry on error</param>
@@ -148,7 +140,8 @@ namespace Aaru.Devices
}
/// <summary>
/// Reads sectors using 28-bit addressing and PIO transfer, sending an interrupt only after all the sectors have been transferred
/// Reads sectors using 28-bit addressing and PIO transfer, sending an interrupt only after all the sectors have
/// been transferred
/// </summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
@@ -185,9 +178,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads native max address using 28-bit addressing
/// </summary>
/// <summary>Reads native max address using 28-bit addressing</summary>
/// <param name="lba">Maximum addressable block</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="timeout">Timeout to wait for command execution</param>
@@ -226,9 +217,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads sectors using 28-bit addressing and PIO transfer, retrying on error
/// </summary>
/// <summary>Reads sectors using 28-bit addressing and PIO transfer, retrying on error</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="lba">LBA of read start</param>
@@ -240,9 +229,7 @@ namespace Aaru.Devices
uint timeout, out double duration) =>
Read(out buffer, out statusRegisters, true, lba, count, timeout, out duration);
/// <summary>
/// Reads sectors using 28-bit addressing and PIO transfer, retrying on error
/// </summary>
/// <summary>Reads sectors using 28-bit addressing and PIO transfer, retrying on error</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="retry">Retry on error</param>
@@ -279,9 +266,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads a long sector using 28-bit addressing and PIO transfer, retrying on error
/// </summary>
/// <summary>Reads a long sector using 28-bit addressing and PIO transfer, retrying on error</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="lba">LBA of read start</param>
@@ -293,9 +278,7 @@ namespace Aaru.Devices
uint timeout, out double duration) =>
ReadLong(out buffer, out statusRegisters, true, lba, blockSize, timeout, out duration);
/// <summary>
/// Reads a long sector using 28-bit addressing and PIO transfer, retrying on error
/// </summary>
/// <summary>Reads a long sector using 28-bit addressing and PIO transfer, retrying on error</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="retry">Retry on error</param>
@@ -332,9 +315,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Sets the reading mechanism ready to read the specified block using 28-bit LBA addressing
/// </summary>
/// <summary>Sets the reading mechanism ready to read the specified block using 28-bit LBA addressing</summary>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="lba">LBA to position reading mechanism ready to read</param>
/// <param name="timeout">Timeout to wait for command execution</param>

View File

@@ -38,9 +38,7 @@ namespace Aaru.Devices
{
public sealed partial class Device
{
/// <summary>
/// Gets native max address using 48-bit addressing
/// </summary>
/// <summary>Gets native max address using 48-bit addressing</summary>
/// <param name="lba">Maximum addressable block</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="timeout">Timeout to wait for command execution</param>
@@ -80,9 +78,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads sectors using 48-bit addressing and DMA transfer
/// </summary>
/// <summary>Reads sectors using 48-bit addressing and DMA transfer</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="lba">LBA of read start</param>
@@ -119,9 +115,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads a drive log using PIO transfer
/// </summary>
/// <summary>Reads a drive log using PIO transfer</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="logAddress">Log address</param>
@@ -156,9 +150,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads a drive log using DMA transfer
/// </summary>
/// <summary>Reads a drive log using DMA transfer</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="logAddress">Log address</param>
@@ -193,7 +185,8 @@ namespace Aaru.Devices
}
/// <summary>
/// Reads sectors using 48-bit addressing and PIO transfer, sending an interrupt only after all the sectors have been transferred
/// Reads sectors using 48-bit addressing and PIO transfer, sending an interrupt only after all the sectors have
/// been transferred
/// </summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
@@ -232,9 +225,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads native max address using 48-bit addressing
/// </summary>
/// <summary>Reads native max address using 48-bit addressing</summary>
/// <param name="lba">Maximum addressable block</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="timeout">Timeout to wait for command execution</param>
@@ -275,9 +266,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads sectors using 48-bit addressing and PIO transfer
/// </summary>
/// <summary>Reads sectors using 48-bit addressing and PIO transfer</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="lba">LBA of read start</param>

View File

@@ -88,9 +88,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads sectors using CHS addressing and DMA transfer, retrying on error
/// </summary>
/// <summary>Reads sectors using CHS addressing and DMA transfer, retrying on error</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="cylinder">Cylinder of read start</param>
@@ -104,9 +102,7 @@ namespace Aaru.Devices
byte sector, byte count, uint timeout, out double duration) =>
ReadDma(out buffer, out statusRegisters, true, cylinder, head, sector, count, timeout, out duration);
/// <summary>
/// Reads sectors using CHS addressing and DMA transfer
/// </summary>
/// <summary>Reads sectors using CHS addressing and DMA transfer</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="retry">Retry on error</param>
@@ -143,7 +139,8 @@ namespace Aaru.Devices
}
/// <summary>
/// Reads sectors using CHS addressing and PIO transfer, sending an interrupt only after all the sectors have been transferred
/// Reads sectors using CHS addressing and PIO transfer, sending an interrupt only after all the sectors have been
/// transferred
/// </summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
@@ -180,9 +177,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads sectors using CHS addressing and PIO transfer, retrying on error
/// </summary>
/// <summary>Reads sectors using CHS addressing and PIO transfer, retrying on error</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="cylinder">Cylinder of read start</param>
@@ -196,9 +191,7 @@ namespace Aaru.Devices
byte sector, byte count, uint timeout, out double duration) =>
Read(out buffer, out statusRegisters, true, cylinder, head, sector, count, timeout, out duration);
/// <summary>
/// Reads sectors using CHS addressing and PIO transfer
/// </summary>
/// <summary>Reads sectors using CHS addressing and PIO transfer</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="retry">Retry on error</param>
@@ -235,9 +228,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads a long sector using CHS addressing and PIO transfer, retrying on error
/// </summary>
/// <summary>Reads a long sector using CHS addressing and PIO transfer, retrying on error</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="cylinder">Cylinder of read start</param>
@@ -251,9 +242,7 @@ namespace Aaru.Devices
byte sector, uint blockSize, uint timeout, out double duration) =>
ReadLong(out buffer, out statusRegisters, true, cylinder, head, sector, blockSize, timeout, out duration);
/// <summary>
/// Reads a long sector using CHS addressing and PIO transfer, retrying on error
/// </summary>
/// <summary>Reads a long sector using CHS addressing and PIO transfer, retrying on error</summary>
/// <param name="buffer">Buffer that contains the read data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="retry">Retry on error</param>
@@ -290,9 +279,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Sets the reading mechanism ready to read the specified block using CHS addressing
/// </summary>
/// <summary>Sets the reading mechanism ready to read the specified block using CHS addressing</summary>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="cylinder">Cylinder to position reading mechanism ready to read</param>
/// <param name="head">Head to position reading mechanism ready to read</param>
@@ -325,9 +312,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Enables drive features
/// </summary>
/// <summary>Enables drive features</summary>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="feature">Feature to enable</param>
/// <param name="timeout">Timeout to wait for command execution</param>
@@ -337,9 +322,7 @@ namespace Aaru.Devices
out double duration) =>
SetFeatures(out statusRegisters, feature, 0, 0, 0, 0, timeout, out duration);
/// <summary>
/// Enables drive features
/// </summary>
/// <summary>Enables drive features</summary>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="feature">Feature to enable</param>
/// <param name="cylinder">Value for the cylinder register</param>
@@ -376,9 +359,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Prevents ejection of the media inserted in the drive
/// </summary>
/// <summary>Prevents ejection of the media inserted in the drive</summary>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="timeout">Timeout to wait for command execution</param>
/// <param name="duration">Time the device took to execute the command in milliseconds</param>
@@ -403,9 +384,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Allows ejection of the media inserted in the drive
/// </summary>
/// <summary>Allows ejection of the media inserted in the drive</summary>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="timeout">Timeout to wait for command execution</param>
/// <param name="duration">Time the device took to execute the command in milliseconds</param>
@@ -430,9 +409,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Ejects the media inserted in the drive
/// </summary>
/// <summary>Ejects the media inserted in the drive</summary>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="timeout">Timeout to wait for command execution</param>
/// <param name="duration">Time the device took to execute the command in milliseconds</param>

View File

@@ -38,9 +38,7 @@ namespace Aaru.Devices
{
public sealed partial class Device
{
/// <summary>
/// Requests to translate an LBA to a card physical address
/// </summary>
/// <summary>Requests to translate an LBA to a card physical address</summary>
/// <param name="buffer">Data buffer</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="lba">LBA to start reading from</param>
@@ -74,9 +72,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Requests to translate a CHS to a card physical address
/// </summary>
/// <summary>Requests to translate a CHS to a card physical address</summary>
/// <param name="buffer">Data buffer</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="cylinder">Cylinder</param>
@@ -110,9 +106,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Requests an extended error code
/// </summary>
/// <summary>Requests an extended error code</summary>
/// <param name="errorCode">Error code</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="timeout">Timeout to wait for command execution</param>

View File

@@ -38,9 +38,7 @@ namespace Aaru.Devices
{
public sealed partial class Device
{
/// <summary>
/// Enables media card pass through
/// </summary>
/// <summary>Enables media card pass through</summary>
/// <param name="statusRegisters">Status registers.</param>
/// <param name="timeout">Timeout in seconds</param>
/// <param name="duration">Time it took to execute the command in milliseconds</param>
@@ -49,9 +47,7 @@ namespace Aaru.Devices
out double duration) =>
CheckMediaCardType(1, out statusRegisters, timeout, out duration);
/// <summary>
/// Disables media card pass through
/// </summary>
/// <summary>Disables media card pass through</summary>
/// <param name="statusRegisters">Status registers.</param>
/// <param name="timeout">Timeout in seconds</param>
/// <param name="duration">Time it took to execute the command in milliseconds</param>
@@ -60,9 +56,7 @@ namespace Aaru.Devices
out double duration) =>
CheckMediaCardType(0, out statusRegisters, timeout, out duration);
/// <summary>
/// Checks media card pass through
/// </summary>
/// <summary>Checks media card pass through</summary>
/// <param name="feature">Feature</param>
/// <param name="statusRegisters">Status registers.</param>
/// <param name="timeout">Timeout in seconds</param>

View File

@@ -38,9 +38,7 @@ namespace Aaru.Devices
{
public sealed partial class Device
{
/// <summary>
/// Disables S.M.A.R.T.
/// </summary>
/// <summary>Disables S.M.A.R.T.</summary>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="timeout">Timeout to wait for command execution</param>
/// <param name="duration">Time the device took to execute the command in milliseconds</param>
@@ -68,9 +66,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Enables auto-saving of S.M.A.R.T. attributes
/// </summary>
/// <summary>Enables auto-saving of S.M.A.R.T. attributes</summary>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="timeout">Timeout to wait for command execution</param>
/// <param name="duration">Time the device took to execute the command in milliseconds</param>
@@ -100,9 +96,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Disables auto-saving of S.M.A.R.T. attributes
/// </summary>
/// <summary>Disables auto-saving of S.M.A.R.T. attributes</summary>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="timeout">Timeout to wait for command execution</param>
/// <param name="duration">Time the device took to execute the command in milliseconds</param>
@@ -131,9 +125,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Enables S.M.A.R.T.
/// </summary>
/// <summary>Enables S.M.A.R.T.</summary>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="timeout">Timeout to wait for command execution</param>
/// <param name="duration">Time the device took to execute the command in milliseconds</param>
@@ -161,9 +153,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Requests drive to execute offline immediate S.M.A.R.T. test
/// </summary>
/// <summary>Requests drive to execute offline immediate S.M.A.R.T. test</summary>
/// <param name="subcommand">Subcommand</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="timeout">Timeout to wait for command execution</param>
@@ -194,9 +184,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads S.M.A.R.T. data
/// </summary>
/// <summary>Reads S.M.A.R.T. data</summary>
/// <param name="buffer">Buffer containing data</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="timeout">Timeout to wait for command execution</param>
@@ -226,9 +214,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads S.M.A.R.T. log
/// </summary>
/// <summary>Reads S.M.A.R.T. log</summary>
/// <param name="buffer">Buffer containing log</param>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="logAddress">Log address</param>
@@ -260,9 +246,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Retrieves S.M.A.R.T. status
/// </summary>
/// <summary>Retrieves S.M.A.R.T. status</summary>
/// <param name="statusRegisters">Returned status registers</param>
/// <param name="timeout">Timeout to wait for command execution</param>
/// <param name="duration">Time the device took to execute the command in milliseconds</param>

View File

@@ -242,53 +242,33 @@ namespace Aaru.Devices
timeout);
}
/// <summary>
/// Encapsulates a single MMC command to send in a queue
/// </summary>
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
/// <summary>Encapsulates a single MMC command to send in a queue</summary>
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal")]
public class MmcSingleCommand
{
/// <summary>
/// Command argument
/// </summary>
public uint argument;
/// <summary>
/// How many blocks to transfer
/// </summary>
public uint blocks;
/// <summary>
/// Size of block in bytes
/// </summary>
public uint blockSize;
/// <summary>
/// Buffer for MMC/SD command response
/// </summary>
public byte[] buffer;
/// <summary>
/// MMC/SD opcode
/// </summary>
/// <summary>Command argument</summary>
public uint argument;
/// <summary>How many blocks to transfer</summary>
public uint blocks;
/// <summary>Size of block in bytes</summary>
public uint blockSize;
/// <summary>Buffer for MMC/SD command response</summary>
public byte[] buffer;
/// <summary>MMC/SD opcode</summary>
public MmcCommands command;
/// <summary>
/// Flags indicating kind and place of response
/// </summary>
public MmcFlags flags;
/// <summary>
/// <c>True</c> if command should be preceded with CMD55
/// </summary>
public bool isApplication;
/// <summary>
/// Response registers
/// </summary>
public uint[] response;
/// <summary>
/// <c>True</c> if data is sent from host to card
/// </summary>
public bool write;
/// <summary>Flags indicating kind and place of response</summary>
public MmcFlags flags;
/// <summary><c>True</c> if command should be preceded with CMD55</summary>
public bool isApplication;
/// <summary>Response registers</summary>
public uint[] response;
/// <summary><c>True</c> if data is sent from host to card</summary>
public bool write;
}
/// <summary>
/// Concatenates a queue of commands to be send to a remote SecureDigital or MultiMediaCard attached to an SDHCI controller
/// Concatenates a queue of commands to be send to a remote SecureDigital or MultiMediaCard attached to an SDHCI
/// controller
/// </summary>
/// <param name="commands">List of commands</param>
/// <param name="duration">Duration to execute all commands, in milliseconds</param>
@@ -333,9 +313,7 @@ namespace Aaru.Devices
return error;
}
/// <summary>
/// Closes then immediately reopens a device
/// </summary>
/// <summary>Closes then immediately reopens a device</summary>
/// <returns>Returned error number if any</returns>
public bool ReOpen()
{
@@ -352,9 +330,7 @@ namespace Aaru.Devices
return Error;
}
/// <summary>
/// Reads data using operating system buffers.
/// </summary>
/// <summary>Reads data using operating system buffers.</summary>
/// <param name="buffer">Data buffer</param>
/// <param name="offset">Offset in remote device to start reading, in bytes</param>
/// <param name="length">Number of bytes to read</param>

View File

@@ -59,9 +59,7 @@ using VendorString = Aaru.Decoders.SecureDigital.VendorString;
namespace Aaru.Devices
{
/// <summary>
/// Implements a device or media containing drive
/// </summary>
/// <summary>Implements a device or media containing drive</summary>
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "UnusedMember.Global"),
SuppressMessage("ReSharper", "UnusedMethodReturnValue.Global")]
public sealed partial class Device

View File

@@ -45,9 +45,7 @@ namespace Aaru.Devices
/// </summary>
~Device() => Close();
/// <summary>
/// Closes a device
/// </summary>
/// <summary>Closes a device</summary>
public void Close()
{
if(_remote != null)

View File

@@ -38,66 +38,49 @@ using PlatformID = Aaru.CommonTypes.Interop.PlatformID;
namespace Aaru.Devices
{
/// <summary>
/// Contains device information
/// </summary>
/// <summary>Contains device information</summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct DeviceInfo
{
/// <summary>
/// Device path
/// </summary>
/// <summary>Device path</summary>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
public string Path;
/// <summary>
/// Device vendor or manufacturer
/// </summary>
/// <summary>Device vendor or manufacturer</summary>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string Vendor;
/// <summary>
/// Device model or product name
/// </summary>
/// <summary>Device model or product name</summary>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string Model;
/// <summary>
/// Device serial number
/// </summary>
/// <summary>Device serial number</summary>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string Serial;
/// <summary>
/// Bus the device is attached to
/// </summary>
/// <summary>Bus the device is attached to</summary>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
public string Bus;
/// <summary>
/// Set to <c>true</c> if Aaru can send commands to the device in the current machine or remote, <c>false</c> otherwise
/// Set to <c>true</c> if Aaru can send commands to the device in the current machine or remote, <c>false</c>
/// otherwise
/// </summary>
[MarshalAs(UnmanagedType.U1)]
public bool Supported;
/// <summary>
/// Padding
/// </summary>
/// <summary>Padding</summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
public readonly byte[] Padding;
}
public sealed partial class Device
{
/// <summary>
/// Lists devices attached to current machine
/// </summary>
/// <summary>Lists devices attached to current machine</summary>
/// <returns>List of devices</returns>
public static DeviceInfo[] ListDevices() => ListDevices(out _, out _, out _, out _, out _, out _);
/// <summary>
/// Lists devices attached to current machine or specified remote
/// </summary>
/// <summary>Lists devices attached to current machine or specified remote</summary>
/// <param name="isRemote">Is remote</param>
/// <param name="serverApplication">Remote application</param>
/// <param name="serverVersion">Remote application version</param>

View File

@@ -37,9 +37,7 @@ namespace Aaru.Devices
{
public sealed partial class Device
{
/// <summary>
/// Reads the CSD register from a SecureDigital or MultiMediaCard device
/// </summary>
/// <summary>Reads the CSD register from a SecureDigital or MultiMediaCard device</summary>
/// <param name="buffer">Data buffer</param>
/// <param name="response">Response</param>
/// <param name="timeout">Timeout to wait for command execution</param>
@@ -60,9 +58,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads the CID register from a SecureDigital or MultiMediaCard device
/// </summary>
/// <summary>Reads the CID register from a SecureDigital or MultiMediaCard device</summary>
/// <param name="buffer">Data buffer</param>
/// <param name="response">Response</param>
/// <param name="timeout">Timeout to wait for command execution</param>
@@ -83,9 +79,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads the OCR register from a MultiMediaCard device
/// </summary>
/// <summary>Reads the OCR register from a MultiMediaCard device</summary>
/// <param name="buffer">Data buffer</param>
/// <param name="response">Response</param>
/// <param name="timeout">Timeout to wait for command execution</param>
@@ -106,9 +100,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads the extended CSD from a MultiMediaCard device
/// </summary>
/// <summary>Reads the extended CSD from a MultiMediaCard device</summary>
/// <param name="buffer">Data buffer</param>
/// <param name="response">Response</param>
/// <param name="timeout">Timeout to wait for command execution</param>
@@ -129,9 +121,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Sets the block length for transfers from a SecureDigital or MultiMediaCard device
/// </summary>
/// <summary>Sets the block length for transfers from a SecureDigital or MultiMediaCard device</summary>
/// <param name="length">Block length in bytes</param>
/// <param name="response">Response</param>
/// <param name="timeout">Timeout to wait for command execution</param>
@@ -152,9 +142,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads blocks from a SecureDigital or MultiMediaCard device
/// </summary>
/// <summary>Reads blocks from a SecureDigital or MultiMediaCard device</summary>
/// <param name="buffer">Data buffer</param>
/// <param name="response">Response</param>
/// <param name="lba">LBA to start reading from</param>
@@ -186,9 +174,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads a single block from a SecureDigital or MultiMediaCard device
/// </summary>
/// <summary>Reads a single block from a SecureDigital or MultiMediaCard device</summary>
/// <param name="buffer">Data buffer</param>
/// <param name="response">Response</param>
/// <param name="lba">LBA to start reading from</param>
@@ -222,9 +208,7 @@ namespace Aaru.Devices
static bool _readMultipleBlockCannotSetBlockCount;
/// <summary>
/// Reads multiple blocks from a SecureDigital or MultiMediaCard device
/// </summary>
/// <summary>Reads multiple blocks from a SecureDigital or MultiMediaCard device</summary>
/// <param name="buffer">Data buffer</param>
/// <param name="response">Response</param>
/// <param name="lba">LBA to start reading from</param>
@@ -265,9 +249,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads blocks using a single block read from a SecureDigital or MultiMediaCard device
/// </summary>
/// <summary>Reads blocks using a single block read from a SecureDigital or MultiMediaCard device</summary>
/// <param name="buffer">Data buffer</param>
/// <param name="response">Response</param>
/// <param name="lba">LBA to start reading from</param>
@@ -316,9 +298,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads status register from a MultiMediaCard device
/// </summary>
/// <summary>Reads status register from a MultiMediaCard device</summary>
/// <param name="buffer">Data buffer</param>
/// <param name="response">Response</param>
/// <param name="timeout">Timeout to wait for command execution</param>
@@ -339,9 +319,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads blocks with block count from a SecureDigital or MultiMediaCard device
/// </summary>
/// <summary>Reads blocks with block count from a SecureDigital or MultiMediaCard device</summary>
/// <param name="buffer">Data buffer</param>
/// <param name="response">Response</param>
/// <param name="lba">LBA to start reading from</param>

View File

@@ -36,9 +36,7 @@ namespace Aaru.Devices
{
public sealed partial class Device
{
/// <summary>
/// Reads the status register from a SecureDigital device
/// </summary>
/// <summary>Reads the status register from a SecureDigital device</summary>
/// <param name="buffer">Data buffer</param>
/// <param name="response">Response</param>
/// <param name="timeout">Timeout to wait for command execution</param>
@@ -59,9 +57,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads the OCR register from a SecureDigital device
/// </summary>
/// <summary>Reads the OCR register from a SecureDigital device</summary>
/// <param name="buffer">Data buffer</param>
/// <param name="response">Response</param>
/// <param name="timeout">Timeout to wait for command execution</param>
@@ -82,9 +78,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Reads the SCR register from a SecureDigital device
/// </summary>
/// <summary>Reads the SCR register from a SecureDigital device</summary>
/// <param name="buffer">Data buffer</param>
/// <param name="response">Response</param>
/// <param name="timeout">Timeout to wait for command execution</param>

View File

@@ -39,9 +39,7 @@ namespace Aaru.Devices
{
public sealed partial class Device
{
/// <summary>
/// Sets the data for the integrated display
/// </summary>
/// <summary>Sets the data for the integrated display</summary>
/// <param name="senseBuffer">Returned SENSE buffer</param>
/// <param name="flash">If the display should start flashing</param>
/// <param name="mode">Display mode</param>

View File

@@ -32,6 +32,7 @@
using System;
using Aaru.Console;
// ReSharper disable InconsistentNaming
namespace Aaru.Devices
@@ -137,8 +138,7 @@ namespace Aaru.Devices
/// <param name="timeout">Timeout in seconds.</param>
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
public bool MiniDiscStopPlaying(out byte[] buffer, out byte[] senseBuffer, uint timeout,
out double duration)
public bool MiniDiscStopPlaying(out byte[] buffer, out byte[] senseBuffer, uint timeout, out double duration)
{
senseBuffer = new byte[64];
byte[] cdb = new byte[10];

View File

@@ -777,9 +777,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Requests the device fixed sense
/// </summary>
/// <summary>Requests the device fixed sense</summary>
/// <param name="buffer">Sense buffer</param>
/// <param name="timeout">Timeout in seconds.</param>
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
@@ -787,9 +785,7 @@ namespace Aaru.Devices
public bool RequestSense(out byte[] buffer, uint timeout, out double duration) =>
RequestSense(false, out buffer, timeout, out duration);
/// <summary>
/// Requests the device sense
/// </summary>
/// <summary>Requests the device sense</summary>
/// <param name="descriptor">Request a descriptor sense</param>
/// <param name="buffer">Sense buffer</param>
/// <param name="timeout">Timeout in seconds.</param>

View File

@@ -952,9 +952,7 @@ namespace Aaru.Devices
return sense;
}
/// <summary>
/// Writes a space mark in the media
/// </summary>
/// <summary>Writes a space mark in the media</summary>
/// <param name="senseBuffer">Sense buffer.</param>
/// <param name="code">Space type code.</param>
/// <param name="count">How many marks to write</param>

View File

@@ -166,9 +166,7 @@ namespace Aaru.Devices
bool? _isRemoteAdmin;
readonly string _devicePath;
/// <summary>
/// Returns if remote is running under administrative (aka root) privileges
/// </summary>
/// <summary>Returns if remote is running under administrative (aka root) privileges</summary>
public bool IsRemoteAdmin
{
get
@@ -179,33 +177,19 @@ namespace Aaru.Devices
}
}
/// <summary>
/// Current device is remote
/// </summary>
public bool IsRemote => _remote != null;
/// <summary>
/// Remote application
/// </summary>
public string RemoteApplication => _remote?.ServerApplication;
/// <summary>
/// Remote application server
/// </summary>
public string RemoteVersion => _remote?.ServerVersion;
/// <summary>
/// Remote operating system name
/// </summary>
public string RemoteOperatingSystem => _remote?.ServerOperatingSystem;
/// <summary>
/// Remote operating system version
/// </summary>
/// <summary>Current device is remote</summary>
public bool IsRemote => _remote != null;
/// <summary>Remote application</summary>
public string RemoteApplication => _remote?.ServerApplication;
/// <summary>Remote application server</summary>
public string RemoteVersion => _remote?.ServerVersion;
/// <summary>Remote operating system name</summary>
public string RemoteOperatingSystem => _remote?.ServerOperatingSystem;
/// <summary>Remote operating system version</summary>
public string RemoteOperatingSystemVersion => _remote?.ServerOperatingSystemVersion;
/// <summary>
/// Remote architecture
/// </summary>
public string RemoteArchitecture => _remote?.ServerArchitecture;
/// <summary>
/// Remote protocol version
/// </summary>
public int RemoteProtocolVersion => _remote?.ServerProtocolVersion ?? 0;
/// <summary>Remote architecture</summary>
public string RemoteArchitecture => _remote?.ServerArchitecture;
/// <summary>Remote protocol version</summary>
public int RemoteProtocolVersion => _remote?.ServerProtocolVersion ?? 0;
}
}

View File

@@ -2674,8 +2674,7 @@ namespace Aaru.Devices
SendScr = 51
}
[Flags]
[SuppressMessage("ReSharper", "ShiftExpressionZeroLeftOperand")]
[Flags, SuppressMessage("ReSharper", "ShiftExpressionZeroLeftOperand")]
public enum MmcFlags : uint
{
ResponsePresent = 1 << 0, Response136 = 1 << 1, ResponseCrc = 1 << 2,

View File

@@ -32,26 +32,16 @@
namespace Aaru.Devices.Remote
{
/// <summary>
/// AaruRemote protocol constants
/// </summary>
/// <summary>AaruRemote protocol constants</summary>
public class Consts
{
/// <summary>
/// Primary unique packet identifier
/// </summary>
public const uint REMOTE_ID = 0x52434944; // "DICR"
/// <summary>
/// Secondary unique packet identifier
/// </summary>
public const uint PACKET_ID = 0x544B4350; // "PCKT"
/// <summary>
/// Default packet version
/// </summary>
public const int PACKET_VERSION = 1;
/// <summary>
/// Maximum supported protocol version
/// </summary>
public const int MAX_PROTOCOL = 2;
/// <summary>Primary unique packet identifier</summary>
public const uint REMOTE_ID = 0x52434944; // "DICR"
/// <summary>Secondary unique packet identifier</summary>
public const uint PACKET_ID = 0x544B4350; // "PCKT"
/// <summary>Default packet version</summary>
public const int PACKET_VERSION = 1;
/// <summary>Maximum supported protocol version</summary>
public const int MAX_PROTOCOL = 2;
}
}

View File

@@ -32,9 +32,7 @@
namespace Aaru.Devices.Remote
{
/// <summary>
/// Packet type enumeration
/// </summary>
/// <summary>Packet type enumeration</summary>
public enum AaruPacketType : sbyte
{
#pragma warning disable 1591
@@ -52,42 +50,24 @@ namespace Aaru.Devices.Remote
#pragma warning restore 1591
}
/// <summary>
/// Reasons for non-data request or response
/// </summary>
/// <summary>Reasons for non-data request or response</summary>
public enum AaruNopReason : byte
{
/// <summary>
/// Request or response has arrived unexpectedly
/// </summary>
OutOfOrder = 0,
/// <summary>
/// Packet or version of packet is not implemented
/// </summary>
/// <summary>Request or response has arrived unexpectedly</summary>
OutOfOrder = 0,
/// <summary>Packet or version of packet is not implemented</summary>
NotImplemented = 1,
/// <summary>
/// Unknown or non-recognized packet
/// </summary>
/// <summary>Unknown or non-recognized packet</summary>
NotRecognized = 2,
/// <summary>
/// Error trying to get list of devices
/// </summary>
/// <summary>Error trying to get list of devices</summary>
ErrorListDevices = 3,
/// <summary>
/// Device opened correctly
/// </summary>
OpenOk = 4,
/// <summary>
/// An error occurred opening the device
/// </summary>
OpenError = 5,
/// <summary>
/// Device re-opened correctly
/// </summary>
ReOpenOk = 6,
/// <summary>
/// An error occurred closing the device
/// </summary>
CloseError = 7
/// <summary>Device opened correctly</summary>
OpenOk = 4,
/// <summary>An error occurred opening the device</summary>
OpenError = 5,
/// <summary>Device re-opened correctly</summary>
ReOpenOk = 6,
/// <summary>An error occurred closing the device</summary>
CloseError = 7
}
}

View File

@@ -43,22 +43,19 @@ using Aaru.Console;
using Aaru.Decoders.ATA;
using Marshal = Aaru.Helpers.Marshal;
using Version = Aaru.CommonTypes.Interop.Version;
// ReSharper disable MemberCanBeInternal
namespace Aaru.Devices.Remote
{
/// <inheritdoc />
/// <summary>
/// Handles communication with a remote device that's connected using the AaruRemote protocol
/// </summary>
/// <summary>Handles communication with a remote device that's connected using the AaruRemote protocol</summary>
public class Remote : IDisposable
{
readonly string _host;
readonly Socket _socket;
/// <summary>
/// Connects using TCP/IP to the specified remote
/// </summary>
/// <summary>Connects using TCP/IP to the specified remote</summary>
/// <param name="uri">URI of the remote</param>
/// <exception cref="ArgumentException">Unsupported or invalid remote protocol.</exception>
/// <exception cref="SocketException">Host not found.</exception>
@@ -197,34 +194,20 @@ namespace Aaru.Devices.Remote
throw new IOException();
}
/// <summary>
/// Remote server application
/// </summary>
public string ServerApplication { get; }
/// <summary>
/// Remote server application version
/// </summary>
public string ServerVersion { get; }
/// <summary>
/// Remote server operating system
/// </summary>
public string ServerOperatingSystem { get; }
/// <summary>
/// Remote server operating system version
/// </summary>
/// <summary>Remote server application</summary>
public string ServerApplication { get; }
/// <summary>Remote server application version</summary>
public string ServerVersion { get; }
/// <summary>Remote server operating system</summary>
public string ServerOperatingSystem { get; }
/// <summary>Remote server operating system version</summary>
public string ServerOperatingSystemVersion { get; }
/// <summary>
/// Remote server architecture
/// </summary>
public string ServerArchitecture { get; }
/// <summary>
/// Remote server protocol version
/// </summary>
public int ServerProtocolVersion { get; }
/// <summary>Remote server architecture</summary>
public string ServerArchitecture { get; }
/// <summary>Remote server protocol version</summary>
public int ServerProtocolVersion { get; }
/// <summary>
/// Is remote running with administrative (aka root) privileges?
/// </summary>
/// <summary>Is remote running with administrative (aka root) privileges?</summary>
public bool IsRoot
{
get
@@ -300,9 +283,7 @@ namespace Aaru.Devices.Remote
/// <inheritdoc />
public void Dispose() => Disconnect();
/// <summary>
/// Disconnects from remote
/// </summary>
/// <summary>Disconnects from remote</summary>
public void Disconnect()
{
try
@@ -316,9 +297,7 @@ namespace Aaru.Devices.Remote
}
}
/// <summary>
/// Lists devices attached to remote
/// </summary>
/// <summary>Lists devices attached to remote</summary>
/// <returns>List of devices</returns>
public DeviceInfo[] ListDevices()
{
@@ -428,13 +407,14 @@ namespace Aaru.Devices.Remote
return devices.ToArray();
}
/// <summary>
/// Opens the specified device path on the remote
/// </summary>
/// <summary>Opens the specified device path on the remote</summary>
/// <param name="devicePath">Device path</param>
/// <param name="lastError">Returned error</param>
/// <returns><c>true</c> if opened correctly, <c>false</c>otherwise</returns>
/// <exception cref="NotImplementedException">Support for the specified device has not yet been implemented in the remote application.</exception>
/// <exception cref="NotImplementedException">
/// Support for the specified device has not yet been implemented in the remote
/// application.
/// </exception>
public bool Open(string devicePath, out int lastError)
{
lastError = 0;
@@ -1080,10 +1060,10 @@ namespace Aaru.Devices.Remote
return (int)res.res.error_no;
}
/// <summary>
/// Gets the <see cref="DeviceType"/> for the remote device
/// </summary>
/// <returns><see cref="DeviceType"/></returns>
/// <summary>Gets the <see cref="DeviceType" /> for the remote device</summary>
/// <returns>
/// <see cref="DeviceType" />
/// </returns>
public DeviceType GetDeviceType()
{
var cmdPkt = new AaruPacketCmdGetDeviceType
@@ -1153,9 +1133,7 @@ namespace Aaru.Devices.Remote
return res.device_type;
}
/// <summary>
/// Retrieves the SDHCI registers from the remote device
/// </summary>
/// <summary>Retrieves the SDHCI registers from the remote device</summary>
/// <param name="csd">CSD register</param>
/// <param name="cid">CID register</param>
/// <param name="ocr">OCR register</param>
@@ -1276,9 +1254,7 @@ namespace Aaru.Devices.Remote
return res.isSdhci;
}
/// <summary>
/// Gets the USB data from the remote device
/// </summary>
/// <summary>Gets the USB data from the remote device</summary>
/// <param name="descriptors">USB descriptors</param>
/// <param name="idVendor">USB vendor ID</param>
/// <param name="idProduct">USB product ID</param>
@@ -1373,9 +1349,7 @@ namespace Aaru.Devices.Remote
return true;
}
/// <summary>
/// Gets the FireWire data from the remote device
/// </summary>
/// <summary>Gets the FireWire data from the remote device</summary>
/// <param name="idVendor">FireWire vendor ID</param>
/// <param name="idProduct">FireWire product ID</param>
/// <param name="vendor">FireWire vendor string</param>
@@ -1468,9 +1442,7 @@ namespace Aaru.Devices.Remote
return true;
}
/// <summary>
/// Gets the PCMCIA/CardBus data from the remote device
/// </summary>
/// <summary>Gets the PCMCIA/CardBus data from the remote device</summary>
/// <param name="cis">Card Information Structure</param>
/// <returns><c>true</c> if the device is attached via PCMCIA or CardBus, <c>false</c> otherwise</returns>
public bool GetPcmciaData(out byte[] cis)
@@ -1549,9 +1521,7 @@ namespace Aaru.Devices.Remote
return true;
}
/// <summary>
/// Receives data from a socket into a buffer
/// </summary>
/// <summary>Receives data from a socket into a buffer</summary>
/// <param name="socket">Socket</param>
/// <param name="buffer">Data buffer</param>
/// <param name="size">Expected total size in bytes</param>
@@ -1575,9 +1545,7 @@ namespace Aaru.Devices.Remote
return offset;
}
/// <summary>
/// Closes the remote device, without closing the network connection
/// </summary>
/// <summary>Closes the remote device, without closing the network connection</summary>
public void Close()
{
var cmdPkt = new AaruPacketCmdClose
@@ -1605,7 +1573,8 @@ namespace Aaru.Devices.Remote
}
/// <summary>
/// Concatenates a queue of commands to be send to a remote SecureDigital or MultiMediaCard attached to an SDHCI controller
/// Concatenates a queue of commands to be send to a remote SecureDigital or MultiMediaCard attached to an SDHCI
/// controller
/// </summary>
/// <param name="commands">List of commands</param>
/// <param name="duration">Duration to execute all commands, in milliseconds</param>
@@ -1766,7 +1735,8 @@ namespace Aaru.Devices.Remote
}
/// <summary>
/// Concatenates a queue of commands to be send to a remote SecureDigital or MultiMediaCard attached to an SDHCI controller, using protocol version 1 without specific support for such a queueing
/// Concatenates a queue of commands to be send to a remote SecureDigital or MultiMediaCard attached to an SDHCI
/// controller, using protocol version 1 without specific support for such a queueing
/// </summary>
/// <param name="commands">List of commands</param>
/// <param name="duration">Duration to execute all commands, in milliseconds</param>
@@ -1795,9 +1765,7 @@ namespace Aaru.Devices.Remote
return error;
}
/// <summary>
/// Closes then immediately reopens a remote device
/// </summary>
/// <summary>Closes then immediately reopens a remote device</summary>
/// <returns>Returned error number if any</returns>
public bool ReOpen()
{
@@ -1891,9 +1859,7 @@ namespace Aaru.Devices.Remote
return false;
}
/// <summary>
/// Reads data using operating system buffers.
/// </summary>
/// <summary>Reads data using operating system buffers.</summary>
/// <param name="buffer">Data buffer</param>
/// <param name="offset">Offset in remote device to start reading, in bytes</param>
/// <param name="length">Number of bytes to read</param>

File diff suppressed because it is too large Load Diff

View File

@@ -45,9 +45,7 @@ namespace Aaru.Filesystems
// Information has been extracted looking at available disk images
// This may be missing fields, or not, I don't know russian so any help is appreciated
/// <inheritdoc />
/// <summary>
/// Implements detection of the AO-DOS filesystem
/// </summary>
/// <summary>Implements detection of the AO-DOS filesystem</summary>
public sealed class AODOS : IFilesystem
{
readonly byte[] _identifier =
@@ -57,13 +55,13 @@ namespace Aaru.Filesystems
/// <inheritdoc />
public FileSystemType XmlFsType { get; private set; }
/// <inheritdoc />
public string Name => "Alexander Osipov DOS file system";
public string Name => "Alexander Osipov DOS file system";
/// <inheritdoc />
public Guid Id => new Guid("668E5039-9DDD-442A-BE1B-A315D6E38E26");
public Guid Id => new Guid("668E5039-9DDD-442A-BE1B-A315D6E38E26");
/// <inheritdoc />
public Encoding Encoding { get; private set; }
public Encoding Encoding { get; private set; }
/// <inheritdoc />
public string Author => "Natalia Portillo";
public string Author => "Natalia Portillo";
/// <inheritdoc />
public bool Identify(IMediaImage imagePlugin, Partition partition)

View File

@@ -42,9 +42,7 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
/// <inheritdoc />
/// <summary>
/// Implements detection of the Apple File System (APFS)
/// </summary>
/// <summary>Implements detection of the Apple File System (APFS)</summary>
[SuppressMessage("ReSharper", "UnusedMember.Local")]
public sealed class APFS : IFilesystem
{
@@ -54,13 +52,13 @@ namespace Aaru.Filesystems
/// <inheritdoc />
public FileSystemType XmlFsType { get; private set; }
/// <inheritdoc />
public Encoding Encoding { get; private set; }
public Encoding Encoding { get; private set; }
/// <inheritdoc />
public string Name => "Apple File System";
public string Name => "Apple File System";
/// <inheritdoc />
public Guid Id => new Guid("A4060F9D-2909-42E2-9D95-DB31FA7EA797");
public Guid Id => new Guid("A4060F9D-2909-42E2-9D95-DB31FA7EA797");
/// <inheritdoc />
public string Author => "Natalia Portillo";
public string Author => "Natalia Portillo";
/// <inheritdoc />
public bool Identify(IMediaImage imagePlugin, Partition partition)

View File

@@ -55,179 +55,179 @@
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System"/>
<Reference Include="System.Xml"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Claunia.Encoding" Version="1.9.1" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.3.0" PrivateAssets="all" />
<PackageReference Include="Claunia.Encoding" Version="1.9.1"/>
<PackageReference Include="System.ValueTuple" Version="4.5.0"/>
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.3.0" PrivateAssets="all"/>
</ItemGroup>
<ItemGroup>
<Compile Include="AppleCommon\Consts.cs" />
<Compile Include="AppleCommon\Enums.cs" />
<Compile Include="AppleCommon\Info.cs" />
<Compile Include="AppleCommon\Structs.cs" />
<Compile Include="AppleHFS\AppleHFS.cs" />
<Compile Include="AppleHFS\Consts.cs" />
<Compile Include="AppleHFS\Enums.cs" />
<Compile Include="AppleHFS\Info.cs" />
<Compile Include="AppleHFS\Structs.cs" />
<Compile Include="FATX\Consts.cs" />
<Compile Include="FATX\Dir.cs" />
<Compile Include="FATX\FATX.cs" />
<Compile Include="FATX\File.cs" />
<Compile Include="FATX\Info.cs" />
<Compile Include="FATX\Structs.cs" />
<Compile Include="FATX\Super.cs" />
<Compile Include="FAT\BPB.cs" />
<Compile Include="FAT\Consts.cs" />
<Compile Include="FAT\Dir.cs" />
<Compile Include="FAT\FAT.cs" />
<Compile Include="FAT\File.cs" />
<Compile Include="FAT\Info.cs" />
<Compile Include="FAT\Structs.cs" />
<Compile Include="FAT\Super.cs" />
<Compile Include="FAT\Xattr.cs" />
<Compile Include="HPOFS\Consts.cs" />
<Compile Include="HPOFS\HPOFS.cs" />
<Compile Include="HPOFS\Info.cs" />
<Compile Include="HPOFS\Structs.cs" />
<Compile Include="ISO9660\Consts\Internal.cs" />
<Compile Include="ISO9660\Date.cs" />
<Compile Include="ISO9660\Dir.cs" />
<Compile Include="ISO9660\File.cs" />
<Compile Include="ISO9660\Mode2.cs" />
<Compile Include="ISO9660\PathTable.cs" />
<Compile Include="ISO9660\Super.cs" />
<Compile Include="ISO9660\Xattr.cs" />
<Compile Include="Opera\Consts.cs" />
<Compile Include="Opera\Dir.cs" />
<Compile Include="Opera\File.cs" />
<Compile Include="Opera\Info.cs" />
<Compile Include="Opera\Opera.cs" />
<Compile Include="Opera\Structs.cs" />
<Compile Include="Opera\Super.cs" />
<Compile Include="PCFX.cs" />
<Compile Include="AmigaDOS.cs" />
<Compile Include="AppleHFSPlus.cs" />
<Compile Include="BFS.cs" />
<Compile Include="ext2FS.cs" />
<Compile Include="extFS.cs" />
<Compile Include="FFS.cs" />
<Compile Include="HPFS.cs" />
<Compile Include="MinixFS.cs" />
<Compile Include="NTFS.cs" />
<Compile Include="ODS.cs" />
<Compile Include="PCEngine.cs" />
<Compile Include="ProDOS.cs" />
<Compile Include="ReFS.cs" />
<Compile Include="Register.cs" />
<Compile Include="SolarFS.cs" />
<Compile Include="Symbian.cs" />
<Compile Include="SysV.cs" />
<Compile Include="UNIXBFS.cs" />
<Compile Include="Acorn.cs" />
<Compile Include="Nintendo.cs" />
<Compile Include="BTRFS.cs" />
<Compile Include="APFS.cs" />
<Compile Include="LisaFS\LisaFS.cs" />
<Compile Include="LisaFS\Consts.cs" />
<Compile Include="LisaFS\Structs.cs" />
<Compile Include="LisaFS\Info.cs" />
<Compile Include="LisaFS\Super.cs" />
<Compile Include="LisaFS\Xattr.cs" />
<Compile Include="LisaFS\Dir.cs" />
<Compile Include="LisaFS\File.cs" />
<Compile Include="LisaFS\Extent.cs" />
<Compile Include="UCSDPascal\UCSDPascal.cs" />
<Compile Include="UCSDPascal\Consts.cs" />
<Compile Include="UCSDPascal\File.cs" />
<Compile Include="UCSDPascal\Info.cs" />
<Compile Include="UCSDPascal\Structs.cs" />
<Compile Include="UCSDPascal\Super.cs" />
<Compile Include="UCSDPascal\Dir.cs" />
<Compile Include="AppleMFS\AppleMFS.cs" />
<Compile Include="AppleMFS\Consts.cs" />
<Compile Include="AppleMFS\Dir.cs" />
<Compile Include="AppleMFS\File.cs" />
<Compile Include="AppleMFS\Info.cs" />
<Compile Include="AppleMFS\Structs.cs" />
<Compile Include="AppleMFS\Super.cs" />
<Compile Include="AppleMFS\Xattr.cs" />
<Compile Include="exFAT.cs" />
<Compile Include="CPM\Info.cs" />
<Compile Include="CPM\CPM.cs" />
<Compile Include="CPM\Structs.cs" />
<Compile Include="CPM\Definitions.cs" />
<Compile Include="CPM\Dir.cs" />
<Compile Include="CPM\Super.cs" />
<Compile Include="CPM\Consts.cs" />
<Compile Include="CPM\File.cs" />
<Compile Include="CPM\Xattr.cs" />
<Compile Include="QNX4.cs" />
<Compile Include="QNX6.cs" />
<Compile Include="JFS.cs" />
<Compile Include="F2FS.cs" />
<Compile Include="NILFS2.cs" />
<Compile Include="Reiser.cs" />
<Compile Include="Reiser4.cs" />
<Compile Include="XFS.cs" />
<Compile Include="PFS.cs" />
<Compile Include="SFS.cs" />
<Compile Include="VMfs.cs" />
<Compile Include="VxFS.cs" />
<Compile Include="Squash.cs" />
<Compile Include="Cram.cs" />
<Compile Include="CBM.cs" />
<Compile Include="UDF.cs" />
<Compile Include="ECMA67.cs" />
<Compile Include="Xia.cs" />
<Compile Include="ZFS.cs" />
<Compile Include="AppleDOS\Dir.cs" />
<Compile Include="AppleDOS\File.cs" />
<Compile Include="AppleDOS\Info.cs" />
<Compile Include="AppleDOS\AppleDOS.cs" />
<Compile Include="AppleDOS\Structs.cs" />
<Compile Include="AppleDOS\Super.cs" />
<Compile Include="AppleDOS\Xattr.cs" />
<Compile Include="AtheOS.cs" />
<Compile Include="HAMMER.cs" />
<Compile Include="Fossil.cs" />
<Compile Include="EFS.cs" />
<Compile Include="UNICOS.cs" />
<Compile Include="RBF.cs" />
<Compile Include="AODOS.cs" />
<Compile Include="RT11.cs" />
<Compile Include="LIF.cs" />
<Compile Include="Locus.cs" />
<Compile Include="dump.cs" />
<Compile Include="MicroDOS.cs" />
<Compile Include="ISO9660\Info.cs" />
<Compile Include="ISO9660\ISO9660.cs" />
<Compile Include="ISO9660\Structs\ISO.cs" />
<Compile Include="ISO9660\Structs\RRIP.cs" />
<Compile Include="ISO9660\Structs\SUSP.cs" />
<Compile Include="ISO9660\Structs\Amiga.cs" />
<Compile Include="ISO9660\Structs\HighSierra.cs" />
<Compile Include="ISO9660\Structs\Apple.cs" />
<Compile Include="ISO9660\Structs\ElTorito.cs" />
<Compile Include="ISO9660\Structs\XA.cs" />
<Compile Include="ISO9660\Structs\Ziso.cs" />
<Compile Include="ISO9660\Structs\Joliet.cs" />
<Compile Include="ISO9660\Structs\Internal.cs" />
<Compile Include="ISO9660\Consts\ISO.cs" />
<Compile Include="ISO9660\Consts\HighSierra.cs" />
<Compile Include="ISO9660\Consts\XA.cs" />
<Compile Include="ISO9660\Consts\ElTorito.cs" />
<Compile Include="ISO9660\Consts\Apple.cs" />
<Compile Include="ISO9660\Consts\RRIP.cs" />
<Compile Include="ISO9660\Consts\Amiga.cs" />
<Compile Include="ISO9660\Consts\SUSP.cs" />
<Compile Include="ISO9660\Consts\Ziso.cs" />
<Compile Include="ISO9660\Consts\AAIP.cs" />
<Compile Include="ISO9660\Structs\CDi.cs" />
<Compile Include="ISO9660\Consts\CDi.cs" />
<Compile Include="AppleCommon\Consts.cs"/>
<Compile Include="AppleCommon\Enums.cs"/>
<Compile Include="AppleCommon\Info.cs"/>
<Compile Include="AppleCommon\Structs.cs"/>
<Compile Include="AppleHFS\AppleHFS.cs"/>
<Compile Include="AppleHFS\Consts.cs"/>
<Compile Include="AppleHFS\Enums.cs"/>
<Compile Include="AppleHFS\Info.cs"/>
<Compile Include="AppleHFS\Structs.cs"/>
<Compile Include="FATX\Consts.cs"/>
<Compile Include="FATX\Dir.cs"/>
<Compile Include="FATX\FATX.cs"/>
<Compile Include="FATX\File.cs"/>
<Compile Include="FATX\Info.cs"/>
<Compile Include="FATX\Structs.cs"/>
<Compile Include="FATX\Super.cs"/>
<Compile Include="FAT\BPB.cs"/>
<Compile Include="FAT\Consts.cs"/>
<Compile Include="FAT\Dir.cs"/>
<Compile Include="FAT\FAT.cs"/>
<Compile Include="FAT\File.cs"/>
<Compile Include="FAT\Info.cs"/>
<Compile Include="FAT\Structs.cs"/>
<Compile Include="FAT\Super.cs"/>
<Compile Include="FAT\Xattr.cs"/>
<Compile Include="HPOFS\Consts.cs"/>
<Compile Include="HPOFS\HPOFS.cs"/>
<Compile Include="HPOFS\Info.cs"/>
<Compile Include="HPOFS\Structs.cs"/>
<Compile Include="ISO9660\Consts\Internal.cs"/>
<Compile Include="ISO9660\Date.cs"/>
<Compile Include="ISO9660\Dir.cs"/>
<Compile Include="ISO9660\File.cs"/>
<Compile Include="ISO9660\Mode2.cs"/>
<Compile Include="ISO9660\PathTable.cs"/>
<Compile Include="ISO9660\Super.cs"/>
<Compile Include="ISO9660\Xattr.cs"/>
<Compile Include="Opera\Consts.cs"/>
<Compile Include="Opera\Dir.cs"/>
<Compile Include="Opera\File.cs"/>
<Compile Include="Opera\Info.cs"/>
<Compile Include="Opera\Opera.cs"/>
<Compile Include="Opera\Structs.cs"/>
<Compile Include="Opera\Super.cs"/>
<Compile Include="PCFX.cs"/>
<Compile Include="AmigaDOS.cs"/>
<Compile Include="AppleHFSPlus.cs"/>
<Compile Include="BFS.cs"/>
<Compile Include="ext2FS.cs"/>
<Compile Include="extFS.cs"/>
<Compile Include="FFS.cs"/>
<Compile Include="HPFS.cs"/>
<Compile Include="MinixFS.cs"/>
<Compile Include="NTFS.cs"/>
<Compile Include="ODS.cs"/>
<Compile Include="PCEngine.cs"/>
<Compile Include="ProDOS.cs"/>
<Compile Include="ReFS.cs"/>
<Compile Include="Register.cs"/>
<Compile Include="SolarFS.cs"/>
<Compile Include="Symbian.cs"/>
<Compile Include="SysV.cs"/>
<Compile Include="UNIXBFS.cs"/>
<Compile Include="Acorn.cs"/>
<Compile Include="Nintendo.cs"/>
<Compile Include="BTRFS.cs"/>
<Compile Include="APFS.cs"/>
<Compile Include="LisaFS\LisaFS.cs"/>
<Compile Include="LisaFS\Consts.cs"/>
<Compile Include="LisaFS\Structs.cs"/>
<Compile Include="LisaFS\Info.cs"/>
<Compile Include="LisaFS\Super.cs"/>
<Compile Include="LisaFS\Xattr.cs"/>
<Compile Include="LisaFS\Dir.cs"/>
<Compile Include="LisaFS\File.cs"/>
<Compile Include="LisaFS\Extent.cs"/>
<Compile Include="UCSDPascal\UCSDPascal.cs"/>
<Compile Include="UCSDPascal\Consts.cs"/>
<Compile Include="UCSDPascal\File.cs"/>
<Compile Include="UCSDPascal\Info.cs"/>
<Compile Include="UCSDPascal\Structs.cs"/>
<Compile Include="UCSDPascal\Super.cs"/>
<Compile Include="UCSDPascal\Dir.cs"/>
<Compile Include="AppleMFS\AppleMFS.cs"/>
<Compile Include="AppleMFS\Consts.cs"/>
<Compile Include="AppleMFS\Dir.cs"/>
<Compile Include="AppleMFS\File.cs"/>
<Compile Include="AppleMFS\Info.cs"/>
<Compile Include="AppleMFS\Structs.cs"/>
<Compile Include="AppleMFS\Super.cs"/>
<Compile Include="AppleMFS\Xattr.cs"/>
<Compile Include="exFAT.cs"/>
<Compile Include="CPM\Info.cs"/>
<Compile Include="CPM\CPM.cs"/>
<Compile Include="CPM\Structs.cs"/>
<Compile Include="CPM\Definitions.cs"/>
<Compile Include="CPM\Dir.cs"/>
<Compile Include="CPM\Super.cs"/>
<Compile Include="CPM\Consts.cs"/>
<Compile Include="CPM\File.cs"/>
<Compile Include="CPM\Xattr.cs"/>
<Compile Include="QNX4.cs"/>
<Compile Include="QNX6.cs"/>
<Compile Include="JFS.cs"/>
<Compile Include="F2FS.cs"/>
<Compile Include="NILFS2.cs"/>
<Compile Include="Reiser.cs"/>
<Compile Include="Reiser4.cs"/>
<Compile Include="XFS.cs"/>
<Compile Include="PFS.cs"/>
<Compile Include="SFS.cs"/>
<Compile Include="VMfs.cs"/>
<Compile Include="VxFS.cs"/>
<Compile Include="Squash.cs"/>
<Compile Include="Cram.cs"/>
<Compile Include="CBM.cs"/>
<Compile Include="UDF.cs"/>
<Compile Include="ECMA67.cs"/>
<Compile Include="Xia.cs"/>
<Compile Include="ZFS.cs"/>
<Compile Include="AppleDOS\Dir.cs"/>
<Compile Include="AppleDOS\File.cs"/>
<Compile Include="AppleDOS\Info.cs"/>
<Compile Include="AppleDOS\AppleDOS.cs"/>
<Compile Include="AppleDOS\Structs.cs"/>
<Compile Include="AppleDOS\Super.cs"/>
<Compile Include="AppleDOS\Xattr.cs"/>
<Compile Include="AtheOS.cs"/>
<Compile Include="HAMMER.cs"/>
<Compile Include="Fossil.cs"/>
<Compile Include="EFS.cs"/>
<Compile Include="UNICOS.cs"/>
<Compile Include="RBF.cs"/>
<Compile Include="AODOS.cs"/>
<Compile Include="RT11.cs"/>
<Compile Include="LIF.cs"/>
<Compile Include="Locus.cs"/>
<Compile Include="dump.cs"/>
<Compile Include="MicroDOS.cs"/>
<Compile Include="ISO9660\Info.cs"/>
<Compile Include="ISO9660\ISO9660.cs"/>
<Compile Include="ISO9660\Structs\ISO.cs"/>
<Compile Include="ISO9660\Structs\RRIP.cs"/>
<Compile Include="ISO9660\Structs\SUSP.cs"/>
<Compile Include="ISO9660\Structs\Amiga.cs"/>
<Compile Include="ISO9660\Structs\HighSierra.cs"/>
<Compile Include="ISO9660\Structs\Apple.cs"/>
<Compile Include="ISO9660\Structs\ElTorito.cs"/>
<Compile Include="ISO9660\Structs\XA.cs"/>
<Compile Include="ISO9660\Structs\Ziso.cs"/>
<Compile Include="ISO9660\Structs\Joliet.cs"/>
<Compile Include="ISO9660\Structs\Internal.cs"/>
<Compile Include="ISO9660\Consts\ISO.cs"/>
<Compile Include="ISO9660\Consts\HighSierra.cs"/>
<Compile Include="ISO9660\Consts\XA.cs"/>
<Compile Include="ISO9660\Consts\ElTorito.cs"/>
<Compile Include="ISO9660\Consts\Apple.cs"/>
<Compile Include="ISO9660\Consts\RRIP.cs"/>
<Compile Include="ISO9660\Consts\Amiga.cs"/>
<Compile Include="ISO9660\Consts\SUSP.cs"/>
<Compile Include="ISO9660\Consts\Ziso.cs"/>
<Compile Include="ISO9660\Consts\AAIP.cs"/>
<Compile Include="ISO9660\Structs\CDi.cs"/>
<Compile Include="ISO9660\Consts\CDi.cs"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Aaru.Checksums\Aaru.Checksums.csproj">
@@ -260,54 +260,53 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="LisaFS\" />
<Folder Include="UCSDPascal\" />
<Folder Include="AppleMFS\" />
<Folder Include="CPM\" />
<Folder Include="AppleDOS\" />
<Folder Include="ISO9660\" />
<Folder Include="ISO9660\Structs\" />
<Folder Include="ISO9660\Consts\" />
<Folder Include="LisaFS\"/>
<Folder Include="UCSDPascal\"/>
<Folder Include="AppleMFS\"/>
<Folder Include="CPM\"/>
<Folder Include="AppleDOS\"/>
<Folder Include="ISO9660\"/>
<Folder Include="ISO9660\Structs\"/>
<Folder Include="ISO9660\Consts\"/>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\LICENSE.LGPL">
<Link>LICENSE.LGPL</Link>
</EmbeddedResource>
<EmbeddedResource Include="CPM\cpmdefs.xml" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="CPM\cpmdefs.xml"/>
</ItemGroup>
<ItemGroup></ItemGroup>
<ProjectExtensions>
<MonoDevelop>
<Properties>
<Policies>
<TextStylePolicy FileWidth="120" TabWidth="4" IndentWidth="4" RemoveTrailingWhitespace="True" NoTabsAfterNonTabs="False" EolMarker="Native" TabsToSpaces="True" scope="text/x-csharp" />
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchSection="True" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="True" NewLinesForBracesInAccessors="True" NewLinesForBracesInAnonymousMethods="True" NewLinesForBracesInControlBlocks="True" NewLinesForBracesInAnonymousTypes="True" NewLinesForBracesInObjectCollectionArrayInitializers="True" NewLinesForBracesInLambdaExpressionBody="True" NewLineForElse="True" NewLineForCatch="True" NewLineForFinally="True" NewLineForMembersInObjectInit="True" NewLineForMembersInAnonymousTypes="True" NewLineForClausesInQuery="True" SpacingAfterMethodDeclarationName="False" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="False" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="False" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" PlaceSystemDirectiveFirst="True" SpaceAfterControlFlowStatementKeyword="False" scope="text/x-csharp" />
<DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="MSBuild" />
<StandardHeader IncludeInNewFiles="True" Text="/***************************************************************************&#xA;Aaru Data Preservation Suite&#xA;----------------------------------------------------------------------------&#xA; &#xA;Filename : ${FileName}&#xA;Author(s) : ${AuthorName} &lt;${AuthorEmail}&gt;&#xA;&#xA;Component : Component&#xA; &#xA;--[ Description ] ----------------------------------------------------------&#xA; &#xA; Description&#xA; &#xA;--[ License ] --------------------------------------------------------------&#xA; &#xA; This library is free software; you can redistribute it and/or modify&#xA; it under the terms of the GNU Lesser General Public License as&#xA; published by the Free Software Foundation; either version 2.1 of the&#xA; License, or (at your option) any later version.&#xA;&#xA; This library is distributed in the hope that it will be useful, but&#xA; WITHOUT ANY WARRANTY; without even the implied warranty of&#xA; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU&#xA; Lesser General Public License for more details.&#xA;&#xA; You should have received a copy of the GNU Lesser General Public&#xA; License along with this library; if not, see &lt;http://www.gnu.org/licenses/&gt;.&#xA;&#xA;----------------------------------------------------------------------------&#xA;Copyright © 2011-${Year} ${CopyrightHolder}&#xA;****************************************************************************/" />
<TextStylePolicy FileWidth="120" TabWidth="4" IndentWidth="4" RemoveTrailingWhitespace="True" NoTabsAfterNonTabs="False" EolMarker="Native" TabsToSpaces="True" scope="text/x-csharp"/>
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchSection="True" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="True" NewLinesForBracesInAccessors="True" NewLinesForBracesInAnonymousMethods="True" NewLinesForBracesInControlBlocks="True" NewLinesForBracesInAnonymousTypes="True" NewLinesForBracesInObjectCollectionArrayInitializers="True" NewLinesForBracesInLambdaExpressionBody="True" NewLineForElse="True" NewLineForCatch="True" NewLineForFinally="True" NewLineForMembersInObjectInit="True" NewLineForMembersInAnonymousTypes="True" NewLineForClausesInQuery="True" SpacingAfterMethodDeclarationName="False" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="False" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="False" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" PlaceSystemDirectiveFirst="True" SpaceAfterControlFlowStatementKeyword="False" scope="text/x-csharp"/>
<DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="MSBuild"/>
<StandardHeader IncludeInNewFiles="True" Text="/***************************************************************************&#xA;Aaru Data Preservation Suite&#xA;----------------------------------------------------------------------------&#xA; &#xA;Filename : ${FileName}&#xA;Author(s) : ${AuthorName} &lt;${AuthorEmail}&gt;&#xA;&#xA;Component : Component&#xA; &#xA;--[ Description ] ----------------------------------------------------------&#xA; &#xA; Description&#xA; &#xA;--[ License ] --------------------------------------------------------------&#xA; &#xA; This library is free software; you can redistribute it and/or modify&#xA; it under the terms of the GNU Lesser General Public License as&#xA; published by the Free Software Foundation; either version 2.1 of the&#xA; License, or (at your option) any later version.&#xA;&#xA; This library is distributed in the hope that it will be useful, but&#xA; WITHOUT ANY WARRANTY; without even the implied warranty of&#xA; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU&#xA; Lesser General Public License for more details.&#xA;&#xA; You should have received a copy of the GNU Lesser General Public&#xA; License along with this library; if not, see &lt;http://www.gnu.org/licenses/&gt;.&#xA;&#xA;----------------------------------------------------------------------------&#xA;Copyright © 2011-${Year} ${CopyrightHolder}&#xA;****************************************************************************/"/>
</Policies>
</Properties>
</MonoDevelop>
</ProjectExtensions>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
<!-- Look in the standard install locations -->
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net40'">$(BaseFrameworkPathOverrideForMono)/4.0-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
<!-- Look in the standard install locations -->
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net40'">$(BaseFrameworkPathOverrideForMono)/4.0-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
</PropertyGroup>
</Project>

View File

@@ -44,9 +44,7 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
/// <inheritdoc />
/// <summary>
/// Implements detection of Acorn's Advanced Data Filing System (ADFS)
/// </summary>
/// <summary>Implements detection of Acorn's Advanced Data Filing System (ADFS)</summary>
public sealed class AcornADFS : IFilesystem
{
/// <summary>Location for boot block, in bytes</summary>
@@ -70,13 +68,13 @@ namespace Aaru.Filesystems
/// <inheritdoc />
public FileSystemType XmlFsType { get; private set; }
/// <inheritdoc />
public string Name => "Acorn Advanced Disc Filing System";
public string Name => "Acorn Advanced Disc Filing System";
/// <inheritdoc />
public Guid Id => new Guid("BAFC1E50-9C64-4CD3-8400-80628CC27AFA");
public Guid Id => new Guid("BAFC1E50-9C64-4CD3-8400-80628CC27AFA");
/// <inheritdoc />
public Encoding Encoding { get; private set; }
public Encoding Encoding { get; private set; }
/// <inheritdoc />
public string Author => "Natalia Portillo";
public string Author => "Natalia Portillo";
// TODO: BBC Master hard disks are untested...
/// <inheritdoc />

View File

@@ -45,9 +45,7 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
/// <inheritdoc />
/// <summary>
/// Implements detection of Amiga Fast File System (AFFS)
/// </summary>
/// <summary>Implements detection of Amiga Fast File System (AFFS)</summary>
public sealed class AmigaDOSPlugin : IFilesystem
{
const uint FFS_MASK = 0x444F5300;
@@ -59,13 +57,13 @@ namespace Aaru.Filesystems
/// <inheritdoc />
public FileSystemType XmlFsType { get; private set; }
/// <inheritdoc />
public string Name => "Amiga DOS filesystem";
public string Name => "Amiga DOS filesystem";
/// <inheritdoc />
public Guid Id => new Guid("3c882400-208c-427d-a086-9119852a1bc7");
public Guid Id => new Guid("3c882400-208c-427d-a086-9119852a1bc7");
/// <inheritdoc />
public Encoding Encoding { get; private set; }
public Encoding Encoding { get; private set; }
/// <inheritdoc />
public string Author => "Natalia Portillo";
public string Author => "Natalia Portillo";
/// <inheritdoc />
public bool Identify(IMediaImage imagePlugin, Partition partition)
@@ -117,7 +115,7 @@ namespace Aaru.Filesystems
ulong[] rootPtrs =
{
bRootPtr + partition.Start, ((partition.End - partition.Start + 1) / 2) + partition.Start - 2,
((partition.End - partition.Start + 1) / 2) + partition.Start - 1,
((partition.End - partition.Start + 1) / 2) + partition.Start - 1,
((partition.End - partition.Start + 1) / 2) + partition.Start,
((partition.End - partition.Start + 1) / 2) + partition.Start + 4
};
@@ -202,7 +200,7 @@ namespace Aaru.Filesystems
ulong[] rootPtrs =
{
bRootPtr + partition.Start, ((partition.End - partition.Start + 1) / 2) + partition.Start - 2,
((partition.End - partition.Start + 1) / 2) + partition.Start - 1,
((partition.End - partition.Start + 1) / 2) + partition.Start - 1,
((partition.End - partition.Start + 1) / 2) + partition.Start,
((partition.End - partition.Start + 1) / 2) + partition.Start + 4
};

View File

@@ -39,9 +39,7 @@ using Schemas;
namespace Aaru.Filesystems
{
/// <inheritdoc />
/// <summary>
/// Implements the Apple DOS 3 filesystem
/// </summary>
/// <summary>Implements the Apple DOS 3 filesystem</summary>
public sealed partial class AppleDOS : IReadOnlyFilesystem
{
bool _debug;
@@ -58,13 +56,13 @@ namespace Aaru.Filesystems
/// <inheritdoc />
public FileSystemType XmlFsType { get; private set; }
/// <inheritdoc />
public Encoding Encoding { get; private set; }
public Encoding Encoding { get; private set; }
/// <inheritdoc />
public string Name => "Apple DOS File System";
public string Name => "Apple DOS File System";
/// <inheritdoc />
public Guid Id => new Guid("8658A1E9-B2E7-4BCC-9638-157A31B0A700\n");
public Guid Id => new Guid("8658A1E9-B2E7-4BCC-9638-157A31B0A700\n");
/// <inheritdoc />
public string Author => "Natalia Portillo";
public string Author => "Natalia Portillo";
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>

View File

@@ -41,20 +41,18 @@ namespace Aaru.Filesystems
// Information from Inside Macintosh
// https://developer.apple.com/legacy/library/documentation/mac/pdf/Files/File_Manager.pdf
/// <inheritdoc />
/// <summary>
/// Implements detection of the Apple Hierarchical File System (HFS)
/// </summary>
/// <summary>Implements detection of the Apple Hierarchical File System (HFS)</summary>
public sealed partial class AppleHFS : IFilesystem
{
/// <inheritdoc />
public FileSystemType XmlFsType { get; private set; }
/// <inheritdoc />
public Encoding Encoding { get; private set; }
public Encoding Encoding { get; private set; }
/// <inheritdoc />
public string Name => "Apple Hierarchical File System";
public string Name => "Apple Hierarchical File System";
/// <inheritdoc />
public Guid Id => new Guid("36405F8D-0D26-6ECC-0BBB-1D5225FF404F");
public Guid Id => new Guid("36405F8D-0D26-6ECC-0BBB-1D5225FF404F");
/// <inheritdoc />
public string Author => "Natalia Portillo";
public string Author => "Natalia Portillo";
}
}

View File

@@ -43,21 +43,19 @@ namespace Aaru.Filesystems
{
// Information from Apple TechNote 1150: https://developer.apple.com/legacy/library/technotes/tn/tn1150.html
/// <inheritdoc />
/// <summary>
/// Implements detection of Apple Hierarchical File System Plus (HFS+)
/// </summary>
/// <summary>Implements detection of Apple Hierarchical File System Plus (HFS+)</summary>
public sealed class AppleHFSPlus : IFilesystem
{
/// <inheritdoc />
public FileSystemType XmlFsType { get; private set; }
/// <inheritdoc />
public Encoding Encoding { get; private set; }
public Encoding Encoding { get; private set; }
/// <inheritdoc />
public string Name => "Apple HFS+ filesystem";
public string Name => "Apple HFS+ filesystem";
/// <inheritdoc />
public Guid Id => new Guid("36405F8D-0D26-6EBE-436F-62F0586B4F08");
public Guid Id => new Guid("36405F8D-0D26-6EBE-436F-62F0586B4F08");
/// <inheritdoc />
public string Author => "Natalia Portillo";
public string Author => "Natalia Portillo";
/// <inheritdoc />
public bool Identify(IMediaImage imagePlugin, Partition partition)

View File

@@ -40,9 +40,7 @@ namespace Aaru.Filesystems
{
// Information from Inside Macintosh Volume II
/// <inheritdoc />
/// <summary>
/// Implements the Apple Macintosh File System
/// </summary>
/// <summary>Implements the Apple Macintosh File System</summary>
public sealed partial class AppleMFS : IReadOnlyFilesystem
{
bool _mounted;
@@ -67,13 +65,13 @@ namespace Aaru.Filesystems
/// <inheritdoc />
public FileSystemType XmlFsType { get; private set; }
/// <inheritdoc />
public string Name => "Apple Macintosh File System";
public string Name => "Apple Macintosh File System";
/// <inheritdoc />
public Guid Id => new Guid("36405F8D-0D26-4066-6538-5DBF5D065C3A");
public Guid Id => new Guid("36405F8D-0D26-4066-6538-5DBF5D065C3A");
/// <inheritdoc />
public Encoding Encoding { get; private set; }
public Encoding Encoding { get; private set; }
/// <inheritdoc />
public string Author => "Natalia Portillo";
public string Author => "Natalia Portillo";
// TODO: Implement Finder namespace (requires decoding Desktop database)
/// <inheritdoc />

View File

@@ -43,9 +43,7 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
/// <inheritdoc />
/// <summary>
/// Implements detection for the AtheOS filesystem
/// </summary>
/// <summary>Implements detection for the AtheOS filesystem</summary>
[SuppressMessage("ReSharper", "UnusedMember.Local")]
public sealed class AtheOS : IFilesystem
{
@@ -61,13 +59,13 @@ namespace Aaru.Filesystems
/// <inheritdoc />
public FileSystemType XmlFsType { get; private set; }
/// <inheritdoc />
public Encoding Encoding { get; private set; }
public Encoding Encoding { get; private set; }
/// <inheritdoc />
public string Name => "AtheOS Filesystem";
public string Name => "AtheOS Filesystem";
/// <inheritdoc />
public Guid Id => new Guid("AAB2C4F1-DC07-49EE-A948-576CC51B58C5");
public Guid Id => new Guid("AAB2C4F1-DC07-49EE-A948-576CC51B58C5");
/// <inheritdoc />
public string Author => "Natalia Portillo";
public string Author => "Natalia Portillo";
/// <inheritdoc />
public bool Identify(IMediaImage imagePlugin, Partition partition)

View File

@@ -44,9 +44,7 @@ namespace Aaru.Filesystems
{
// Information from Practical Filesystem Design, ISBN 1-55860-497-9
/// <inheritdoc />
/// <summary>
/// Implements detection of the Be (new) filesystem
/// </summary>
/// <summary>Implements detection of the Be (new) filesystem</summary>
[SuppressMessage("ReSharper", "UnusedMember.Local")]
public sealed class BeFS : IFilesystem
{
@@ -67,13 +65,13 @@ namespace Aaru.Filesystems
/// <inheritdoc />
public FileSystemType XmlFsType { get; private set; }
/// <inheritdoc />
public Encoding Encoding { get; private set; }
public Encoding Encoding { get; private set; }
/// <inheritdoc />
public string Name => "Be Filesystem";
public string Name => "Be Filesystem";
/// <inheritdoc />
public Guid Id => new Guid("dc8572b3-b6ad-46e4-8de9-cbe123ff6672");
public Guid Id => new Guid("dc8572b3-b6ad-46e4-8de9-cbe123ff6672");
/// <inheritdoc />
public string Author => "Natalia Portillo";
public string Author => "Natalia Portillo";
/// <inheritdoc />
public bool Identify(IMediaImage imagePlugin, Partition partition)

View File

@@ -42,9 +42,7 @@ using Marshal = Aaru.Helpers.Marshal;
namespace Aaru.Filesystems
{
/// <inheritdoc />
/// <summary>
/// Implements detection of the b-tree filesystem (btrfs)
/// </summary>
/// <summary>Implements detection of the b-tree filesystem (btrfs)</summary>
public sealed class BTRFS : IFilesystem
{
/// <summary>BTRFS magic "_BHRfS_M"</summary>
@@ -53,13 +51,13 @@ namespace Aaru.Filesystems
/// <inheritdoc />
public FileSystemType XmlFsType { get; private set; }
/// <inheritdoc />
public Encoding Encoding { get; private set; }
public Encoding Encoding { get; private set; }
/// <inheritdoc />
public string Name => "B-tree file system";
public string Name => "B-tree file system";
/// <inheritdoc />
public Guid Id => new Guid("C904CF15-5222-446B-B7DB-02EAC5D781B3");
public Guid Id => new Guid("C904CF15-5222-446B-B7DB-02EAC5D781B3");
/// <inheritdoc />
public string Author => "Natalia Portillo";
public string Author => "Natalia Portillo";
/// <inheritdoc />
public bool Identify(IMediaImage imagePlugin, Partition partition)

Some files were not shown because too many files have changed in this diff Show More