mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Code restyling.
This commit is contained in:
321
Enums/Images.cs
321
Enums/Images.cs
@@ -44,11 +44,16 @@ namespace Aaru.CommonTypes.Enums
|
|||||||
public enum TrackType : byte
|
public enum TrackType : byte
|
||||||
{
|
{
|
||||||
/// <summary>Audio track</summary>
|
/// <summary>Audio track</summary>
|
||||||
Audio = 0, /// <summary>Data track (not any of the below defined ones)</summary>
|
Audio = 0,
|
||||||
Data = 1, /// <summary>Data track, compact disc mode 1</summary>
|
/// <summary>Data track (not any of the below defined ones)</summary>
|
||||||
CdMode1 = 2, /// <summary>Data track, compact disc mode 2, formless</summary>
|
Data = 1,
|
||||||
CdMode2Formless = 3, /// <summary>Data track, compact disc mode 2, form 1</summary>
|
/// <summary>Data track, compact disc mode 1</summary>
|
||||||
CdMode2Form1 = 4, /// <summary>Data track, compact disc mode 2, form 2</summary>
|
CdMode1 = 2,
|
||||||
|
/// <summary>Data track, compact disc mode 2, formless</summary>
|
||||||
|
CdMode2Formless = 3,
|
||||||
|
/// <summary>Data track, compact disc mode 2, form 1</summary>
|
||||||
|
CdMode2Form1 = 4,
|
||||||
|
/// <summary>Data track, compact disc mode 2, form 2</summary>
|
||||||
CdMode2Form2 = 5
|
CdMode2Form2 = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,12 +61,16 @@ namespace Aaru.CommonTypes.Enums
|
|||||||
public enum TrackSubchannelType : byte
|
public enum TrackSubchannelType : byte
|
||||||
{
|
{
|
||||||
/// <summary>Track does not has subchannel dumped, or it's not a CD</summary>
|
/// <summary>Track does not has subchannel dumped, or it's not a CD</summary>
|
||||||
None = 0, /// <summary>Subchannel is packed and error corrected</summary>
|
None = 0,
|
||||||
Packed = 1, /// <summary>Subchannel is interleaved</summary>
|
/// <summary>Subchannel is packed and error corrected</summary>
|
||||||
Raw = 2, /// <summary>Subchannel is packed and comes interleaved with main channel in same file</summary>
|
Packed = 1,
|
||||||
|
/// <summary>Subchannel is interleaved</summary>
|
||||||
|
Raw = 2,
|
||||||
|
/// <summary>Subchannel is packed and comes interleaved with main channel in same file</summary>
|
||||||
PackedInterleaved = 3,
|
PackedInterleaved = 3,
|
||||||
/// <summary>Subchannel is interleaved and comes interleaved with main channel in same file</summary>
|
/// <summary>Subchannel is interleaved and comes interleaved with main channel in same file</summary>
|
||||||
RawInterleaved = 4, /// <summary>Only Q subchannel is stored as 16 bytes</summary>
|
RawInterleaved = 4,
|
||||||
|
/// <summary>Only Q subchannel is stored as 16 bytes</summary>
|
||||||
Q16 = 5,
|
Q16 = 5,
|
||||||
/// <summary>Only Q subchannel is stored as 16 bytes and comes interleaved with main channel in same file</summary>
|
/// <summary>Only Q subchannel is stored as 16 bytes and comes interleaved with main channel in same file</summary>
|
||||||
Q16Interleaved = 6
|
Q16Interleaved = 6
|
||||||
@@ -71,19 +80,32 @@ namespace Aaru.CommonTypes.Enums
|
|||||||
public enum SectorTagType
|
public enum SectorTagType
|
||||||
{
|
{
|
||||||
/// <summary>Apple's GCR sector tags, 12 bytes</summary>
|
/// <summary>Apple's GCR sector tags, 12 bytes</summary>
|
||||||
AppleSectorTag = 0, /// <summary>Sync frame from CD sector, 12 bytes</summary>
|
AppleSectorTag = 0,
|
||||||
CdSectorSync = 1, /// <summary>CD sector header, 4 bytes</summary>
|
/// <summary>Sync frame from CD sector, 12 bytes</summary>
|
||||||
CdSectorHeader = 2, /// <summary>CD mode 2 sector subheader</summary>
|
CdSectorSync = 1,
|
||||||
CdSectorSubHeader = 3, /// <summary>CD sector EDC, 4 bytes</summary>
|
/// <summary>CD sector header, 4 bytes</summary>
|
||||||
CdSectorEdc = 4, /// <summary>CD sector ECC P, 172 bytes</summary>
|
CdSectorHeader = 2,
|
||||||
CdSectorEccP = 5, /// <summary>CD sector ECC Q, 104 bytes</summary>
|
/// <summary>CD mode 2 sector subheader</summary>
|
||||||
CdSectorEccQ = 6, /// <summary>CD sector ECC (P and Q), 276 bytes</summary>
|
CdSectorSubHeader = 3,
|
||||||
CdSectorEcc = 7, /// <summary>CD sector subchannel, 96 bytes</summary>
|
/// <summary>CD sector EDC, 4 bytes</summary>
|
||||||
CdSectorSubchannel = 8, /// <summary>CD track ISRC, string, 12 bytes</summary>
|
CdSectorEdc = 4,
|
||||||
CdTrackIsrc = 9, /// <summary>CD track text, string, 13 bytes</summary>
|
/// <summary>CD sector ECC P, 172 bytes</summary>
|
||||||
CdTrackText = 10, /// <summary>CD track flags, 1 byte</summary>
|
CdSectorEccP = 5,
|
||||||
CdTrackFlags = 11, /// <summary>DVD sector copyright information</summary>
|
/// <summary>CD sector ECC Q, 104 bytes</summary>
|
||||||
DvdCmi = 12, /// <summary>Floppy address mark (contents depend on underlying floppy format)</summary>
|
CdSectorEccQ = 6,
|
||||||
|
/// <summary>CD sector ECC (P and Q), 276 bytes</summary>
|
||||||
|
CdSectorEcc = 7,
|
||||||
|
/// <summary>CD sector subchannel, 96 bytes</summary>
|
||||||
|
CdSectorSubchannel = 8,
|
||||||
|
/// <summary>CD track ISRC, string, 12 bytes</summary>
|
||||||
|
CdTrackIsrc = 9,
|
||||||
|
/// <summary>CD track text, string, 13 bytes</summary>
|
||||||
|
CdTrackText = 10,
|
||||||
|
/// <summary>CD track flags, 1 byte</summary>
|
||||||
|
CdTrackFlags = 11,
|
||||||
|
/// <summary>DVD sector copyright information</summary>
|
||||||
|
DvdCmi = 12,
|
||||||
|
/// <summary>Floppy address mark (contents depend on underlying floppy format)</summary>
|
||||||
FloppyAddressMark = 13
|
FloppyAddressMark = 13
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,77 +113,145 @@ namespace Aaru.CommonTypes.Enums
|
|||||||
public enum MediaTagType
|
public enum MediaTagType
|
||||||
{
|
{
|
||||||
/// <summary>CD table of contents</summary>
|
/// <summary>CD table of contents</summary>
|
||||||
CD_TOC = 0, /// <summary>CD session information</summary>
|
CD_TOC = 0,
|
||||||
CD_SessionInfo = 1, /// <summary>CD full table of contents</summary>
|
/// <summary>CD session information</summary>
|
||||||
CD_FullTOC = 2, /// <summary>CD PMA</summary>
|
CD_SessionInfo = 1,
|
||||||
CD_PMA = 3, /// <summary>CD Adress-Time-In-Pregroove</summary>
|
/// <summary>CD full table of contents</summary>
|
||||||
CD_ATIP = 4, /// <summary>CD-Text</summary>
|
CD_FullTOC = 2,
|
||||||
CD_TEXT = 5, /// <summary>CD Media Catalogue Number</summary>
|
/// <summary>CD PMA</summary>
|
||||||
CD_MCN = 6, /// <summary>DVD/HD DVD Physical Format Information</summary>
|
CD_PMA = 3,
|
||||||
DVD_PFI = 7, /// <summary>DVD Lead-in Copyright Management Information</summary>
|
/// <summary>CD Adress-Time-In-Pregroove</summary>
|
||||||
DVD_CMI = 8, /// <summary>DVD disc key</summary>
|
CD_ATIP = 4,
|
||||||
DVD_DiscKey = 9, /// <summary>DVD/HD DVD Burst Cutting Area</summary>
|
/// <summary>CD-Text</summary>
|
||||||
DVD_BCA = 10, /// <summary>DVD/HD DVD Lead-in Disc Manufacturer Information</summary>
|
CD_TEXT = 5,
|
||||||
DVD_DMI = 11, /// <summary>Media identifier</summary>
|
/// <summary>CD Media Catalogue Number</summary>
|
||||||
DVD_MediaIdentifier = 12, /// <summary>Media key block</summary>
|
CD_MCN = 6,
|
||||||
DVD_MKB = 13, /// <summary>DVD-RAM/HD DVD-RAM DDS information</summary>
|
/// <summary>DVD/HD DVD Physical Format Information</summary>
|
||||||
DVDRAM_DDS = 14, /// <summary>DVD-RAM/HD DVD-RAM Medium status</summary>
|
DVD_PFI = 7,
|
||||||
DVDRAM_MediumStatus = 15, /// <summary>DVD-RAM/HD DVD-RAM Spare area information</summary>
|
/// <summary>DVD Lead-in Copyright Management Information</summary>
|
||||||
DVDRAM_SpareArea = 16, /// <summary>DVD-R/-RW/HD DVD-R RMD in last border-out</summary>
|
DVD_CMI = 8,
|
||||||
DVDR_RMD = 17, /// <summary>Pre-recorded information from DVD-R/-RW lead-in</summary>
|
/// <summary>DVD disc key</summary>
|
||||||
DVDR_PreRecordedInfo = 18, /// <summary>DVD-R/-RW/HD DVD-R media identifier</summary>
|
DVD_DiscKey = 9,
|
||||||
DVDR_MediaIdentifier = 19, /// <summary>DVD-R/-RW/HD DVD-R physical format information</summary>
|
/// <summary>DVD/HD DVD Burst Cutting Area</summary>
|
||||||
DVDR_PFI = 20, /// <summary>ADIP information</summary>
|
DVD_BCA = 10,
|
||||||
DVD_ADIP = 21, /// <summary>HD DVD Lead-in copyright protection information</summary>
|
/// <summary>DVD/HD DVD Lead-in Disc Manufacturer Information</summary>
|
||||||
HDDVD_CPI = 22, /// <summary>HD DVD-R Medium Status</summary>
|
DVD_DMI = 11,
|
||||||
HDDVD_MediumStatus = 23, /// <summary>DVD+/-R DL Layer capacity</summary>
|
/// <summary>Media identifier</summary>
|
||||||
DVDDL_LayerCapacity = 24, /// <summary>DVD-R DL Middle Zone start address</summary>
|
DVD_MediaIdentifier = 12,
|
||||||
DVDDL_MiddleZoneAddress = 25, /// <summary>DVD-R DL Jump Interval Size</summary>
|
/// <summary>Media key block</summary>
|
||||||
DVDDL_JumpIntervalSize = 26, /// <summary>DVD-R DL Start LBA of the manual layer jump</summary>
|
DVD_MKB = 13,
|
||||||
DVDDL_ManualLayerJumpLBA = 27, /// <summary>Blu-ray Disc Information</summary>
|
/// <summary>DVD-RAM/HD DVD-RAM DDS information</summary>
|
||||||
BD_DI = 28, /// <summary>Blu-ray Burst Cutting Area</summary>
|
DVDRAM_DDS = 14,
|
||||||
BD_BCA = 29, /// <summary>Blu-ray Disc Definition Structure</summary>
|
/// <summary>DVD-RAM/HD DVD-RAM Medium status</summary>
|
||||||
BD_DDS = 30, /// <summary>Blu-ray Cartridge Status</summary>
|
DVDRAM_MediumStatus = 15,
|
||||||
BD_CartridgeStatus = 31, /// <summary>Blu-ray Status of Spare Area</summary>
|
/// <summary>DVD-RAM/HD DVD-RAM Spare area information</summary>
|
||||||
BD_SpareArea = 32, /// <summary>AACS volume identifier</summary>
|
DVDRAM_SpareArea = 16,
|
||||||
AACS_VolumeIdentifier = 33, /// <summary>AACS pre-recorded media serial number</summary>
|
/// <summary>DVD-R/-RW/HD DVD-R RMD in last border-out</summary>
|
||||||
AACS_SerialNumber = 34, /// <summary>AACS media identifier</summary>
|
DVDR_RMD = 17,
|
||||||
AACS_MediaIdentifier = 35, /// <summary>Lead-in AACS media key block</summary>
|
/// <summary>Pre-recorded information from DVD-R/-RW lead-in</summary>
|
||||||
AACS_MKB = 36, /// <summary>AACS data keys</summary>
|
DVDR_PreRecordedInfo = 18,
|
||||||
AACS_DataKeys = 37, /// <summary>LBA extents flagged for bus encryption by AACS</summary>
|
/// <summary>DVD-R/-RW/HD DVD-R media identifier</summary>
|
||||||
AACS_LBAExtents = 38, /// <summary>CPRM media key block in Lead-in</summary>
|
DVDR_MediaIdentifier = 19,
|
||||||
AACS_CPRM_MKB = 39, /// <summary>Recognized layer formats in hybrid discs</summary>
|
/// <summary>DVD-R/-RW/HD DVD-R physical format information</summary>
|
||||||
Hybrid_RecognizedLayers = 40, /// <summary>Disc write protection status</summary>
|
DVDR_PFI = 20,
|
||||||
MMC_WriteProtection = 41, /// <summary>Disc standard information</summary>
|
/// <summary>ADIP information</summary>
|
||||||
MMC_DiscInformation = 42, /// <summary>Disc track resources information</summary>
|
DVD_ADIP = 21,
|
||||||
MMC_TrackResourcesInformation = 43, /// <summary>BD-R Pseudo-overwrite information</summary>
|
/// <summary>HD DVD Lead-in copyright protection information</summary>
|
||||||
MMC_POWResourcesInformation = 44, /// <summary>SCSI INQUIRY response</summary>
|
HDDVD_CPI = 22,
|
||||||
SCSI_INQUIRY = 45, /// <summary>SCSI MODE PAGE 2Ah</summary>
|
/// <summary>HD DVD-R Medium Status</summary>
|
||||||
SCSI_MODEPAGE_2A = 46, /// <summary>ATA IDENTIFY DEVICE response</summary>
|
HDDVD_MediumStatus = 23,
|
||||||
ATA_IDENTIFY = 47, /// <summary>ATA IDENTIFY PACKET DEVICE response</summary>
|
/// <summary>DVD+/-R DL Layer capacity</summary>
|
||||||
ATAPI_IDENTIFY = 48, /// <summary>PCMCIA/CardBus Card Information Structure</summary>
|
DVDDL_LayerCapacity = 24,
|
||||||
PCMCIA_CIS = 49, /// <summary>SecureDigital CID</summary>
|
/// <summary>DVD-R DL Middle Zone start address</summary>
|
||||||
SD_CID = 50, /// <summary>SecureDigital CSD</summary>
|
DVDDL_MiddleZoneAddress = 25,
|
||||||
SD_CSD = 51, /// <summary>SecureDigital SCR</summary>
|
/// <summary>DVD-R DL Jump Interval Size</summary>
|
||||||
SD_SCR = 52, /// <summary>SecureDigital OCR</summary>
|
DVDDL_JumpIntervalSize = 26,
|
||||||
SD_OCR = 53, /// <summary>MultiMediaCard CID</summary>
|
/// <summary>DVD-R DL Start LBA of the manual layer jump</summary>
|
||||||
MMC_CID = 54, /// <summary>MultiMediaCard CSD</summary>
|
DVDDL_ManualLayerJumpLBA = 27,
|
||||||
MMC_CSD = 55, /// <summary>MultiMediaCard OCR</summary>
|
/// <summary>Blu-ray Disc Information</summary>
|
||||||
MMC_OCR = 56, /// <summary>MultiMediaCard Extended CSD</summary>
|
BD_DI = 28,
|
||||||
MMC_ExtendedCSD = 57, /// <summary>Xbox Security Sector</summary>
|
/// <summary>Blu-ray Burst Cutting Area</summary>
|
||||||
Xbox_SecuritySector = 58, /// <summary>
|
BD_BCA = 29,
|
||||||
|
/// <summary>Blu-ray Disc Definition Structure</summary>
|
||||||
|
BD_DDS = 30,
|
||||||
|
/// <summary>Blu-ray Cartridge Status</summary>
|
||||||
|
BD_CartridgeStatus = 31,
|
||||||
|
/// <summary>Blu-ray Status of Spare Area</summary>
|
||||||
|
BD_SpareArea = 32,
|
||||||
|
/// <summary>AACS volume identifier</summary>
|
||||||
|
AACS_VolumeIdentifier = 33,
|
||||||
|
/// <summary>AACS pre-recorded media serial number</summary>
|
||||||
|
AACS_SerialNumber = 34,
|
||||||
|
/// <summary>AACS media identifier</summary>
|
||||||
|
AACS_MediaIdentifier = 35,
|
||||||
|
/// <summary>Lead-in AACS media key block</summary>
|
||||||
|
AACS_MKB = 36,
|
||||||
|
/// <summary>AACS data keys</summary>
|
||||||
|
AACS_DataKeys = 37,
|
||||||
|
/// <summary>LBA extents flagged for bus encryption by AACS</summary>
|
||||||
|
AACS_LBAExtents = 38,
|
||||||
|
/// <summary>CPRM media key block in Lead-in</summary>
|
||||||
|
AACS_CPRM_MKB = 39,
|
||||||
|
/// <summary>Recognized layer formats in hybrid discs</summary>
|
||||||
|
Hybrid_RecognizedLayers = 40,
|
||||||
|
/// <summary>Disc write protection status</summary>
|
||||||
|
MMC_WriteProtection = 41,
|
||||||
|
/// <summary>Disc standard information</summary>
|
||||||
|
MMC_DiscInformation = 42,
|
||||||
|
/// <summary>Disc track resources information</summary>
|
||||||
|
MMC_TrackResourcesInformation = 43,
|
||||||
|
/// <summary>BD-R Pseudo-overwrite information</summary>
|
||||||
|
MMC_POWResourcesInformation = 44,
|
||||||
|
/// <summary>SCSI INQUIRY response</summary>
|
||||||
|
SCSI_INQUIRY = 45,
|
||||||
|
/// <summary>SCSI MODE PAGE 2Ah</summary>
|
||||||
|
SCSI_MODEPAGE_2A = 46,
|
||||||
|
/// <summary>ATA IDENTIFY DEVICE response</summary>
|
||||||
|
ATA_IDENTIFY = 47,
|
||||||
|
/// <summary>ATA IDENTIFY PACKET DEVICE response</summary>
|
||||||
|
ATAPI_IDENTIFY = 48,
|
||||||
|
/// <summary>PCMCIA/CardBus Card Information Structure</summary>
|
||||||
|
PCMCIA_CIS = 49,
|
||||||
|
/// <summary>SecureDigital CID</summary>
|
||||||
|
SD_CID = 50,
|
||||||
|
/// <summary>SecureDigital CSD</summary>
|
||||||
|
SD_CSD = 51,
|
||||||
|
/// <summary>SecureDigital SCR</summary>
|
||||||
|
SD_SCR = 52,
|
||||||
|
/// <summary>SecureDigital OCR</summary>
|
||||||
|
SD_OCR = 53,
|
||||||
|
/// <summary>MultiMediaCard CID</summary>
|
||||||
|
MMC_CID = 54,
|
||||||
|
/// <summary>MultiMediaCard CSD</summary>
|
||||||
|
MMC_CSD = 55,
|
||||||
|
/// <summary>MultiMediaCard OCR</summary>
|
||||||
|
MMC_OCR = 56,
|
||||||
|
/// <summary>MultiMediaCard Extended CSD</summary>
|
||||||
|
MMC_ExtendedCSD = 57,
|
||||||
|
/// <summary>Xbox Security Sector</summary>
|
||||||
|
Xbox_SecuritySector = 58,
|
||||||
|
/// <summary>
|
||||||
/// On floppy disks, data in last cylinder usually in a different format that contains duplication or
|
/// On floppy disks, data in last cylinder usually in a different format that contains duplication or
|
||||||
/// manufacturing information
|
/// manufacturing information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Floppy_LeadOut = 59, /// <summary>DVD Disc Control Blocks</summary>
|
Floppy_LeadOut = 59,
|
||||||
DCB = 60, /// <summary>Compact Disc First Track Pregap</summary>
|
/// <summary>DVD Disc Control Blocks</summary>
|
||||||
CD_FirstTrackPregap = 61, /// <summary>Compact Disc Lead-out</summary>
|
DCB = 60,
|
||||||
CD_LeadOut = 62, /// <summary>SCSI MODE SENSE (6)</summary>
|
/// <summary>Compact Disc First Track Pregap</summary>
|
||||||
SCSI_MODESENSE_6 = 63, /// <summary>SCSI MODE SENSE (10)</summary>
|
CD_FirstTrackPregap = 61,
|
||||||
SCSI_MODESENSE_10 = 64, /// <summary>USB descriptors</summary>
|
/// <summary>Compact Disc Lead-out</summary>
|
||||||
USB_Descriptors = 65, /// <summary>XGD unlocked DMI</summary>
|
CD_LeadOut = 62,
|
||||||
Xbox_DMI = 66, /// <summary>XDG unlocked PFI</summary>
|
/// <summary>SCSI MODE SENSE (6)</summary>
|
||||||
Xbox_PFI = 67, /// <summary>Compact Disc Lead-in</summary>
|
SCSI_MODESENSE_6 = 63,
|
||||||
|
/// <summary>SCSI MODE SENSE (10)</summary>
|
||||||
|
SCSI_MODESENSE_10 = 64,
|
||||||
|
/// <summary>USB descriptors</summary>
|
||||||
|
USB_Descriptors = 65,
|
||||||
|
/// <summary>XGD unlocked DMI</summary>
|
||||||
|
Xbox_DMI = 66,
|
||||||
|
/// <summary>XDG unlocked PFI</summary>
|
||||||
|
Xbox_PFI = 67,
|
||||||
|
/// <summary>Compact Disc Lead-in</summary>
|
||||||
CD_LeadIn = 68
|
CD_LeadIn = 68
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,9 +259,12 @@ namespace Aaru.CommonTypes.Enums
|
|||||||
public enum XmlMediaType : byte
|
public enum XmlMediaType : byte
|
||||||
{
|
{
|
||||||
/// <summary>Purely optical discs</summary>
|
/// <summary>Purely optical discs</summary>
|
||||||
OpticalDisc = 0, /// <summary>Media that is physically block-based or abstracted like that</summary>
|
OpticalDisc = 0,
|
||||||
BlockMedia = 1, /// <summary>Media that can be accessed by-byte or by-bit, like chips</summary>
|
/// <summary>Media that is physically block-based or abstracted like that</summary>
|
||||||
LinearMedia = 2, /// <summary>Media that can only store data when it is modulated to audio</summary>
|
BlockMedia = 1,
|
||||||
|
/// <summary>Media that can be accessed by-byte or by-bit, like chips</summary>
|
||||||
|
LinearMedia = 2,
|
||||||
|
/// <summary>Media that can only store data when it is modulated to audio</summary>
|
||||||
AudioMedia = 3
|
AudioMedia = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,9 +273,12 @@ namespace Aaru.CommonTypes.Enums
|
|||||||
public enum CdFlags : byte
|
public enum CdFlags : byte
|
||||||
{
|
{
|
||||||
/// <summary>Track is quadraphonic.</summary>
|
/// <summary>Track is quadraphonic.</summary>
|
||||||
FourChannel = 0x08, /// <summary>Track is non-audio (data).</summary>
|
FourChannel = 0x08,
|
||||||
DataTrack = 0x04, /// <summary>Track is copy protected.</summary>
|
/// <summary>Track is non-audio (data).</summary>
|
||||||
CopyPermitted = 0x02, /// <summary>Track has pre-emphasis.</summary>
|
DataTrack = 0x04,
|
||||||
|
/// <summary>Track is copy protected.</summary>
|
||||||
|
CopyPermitted = 0x02,
|
||||||
|
/// <summary>Track has pre-emphasis.</summary>
|
||||||
PreEmphasis = 0x01
|
PreEmphasis = 0x01
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -191,12 +287,16 @@ namespace Aaru.CommonTypes.Enums
|
|||||||
public enum FloppySectorStatus : byte
|
public enum FloppySectorStatus : byte
|
||||||
{
|
{
|
||||||
/// <summary>Both address mark and data checksums are correct.</summary>
|
/// <summary>Both address mark and data checksums are correct.</summary>
|
||||||
Correct = 0x01, /// <summary>Data checksum is incorrect.</summary>
|
Correct = 0x01,
|
||||||
DataError = 0x02, /// <summary>Addres mark checksum is incorrect.</summary>
|
/// <summary>Data checksum is incorrect.</summary>
|
||||||
|
DataError = 0x02,
|
||||||
|
/// <summary>Addres mark checksum is incorrect.</summary>
|
||||||
AddressMarkError = 0x04,
|
AddressMarkError = 0x04,
|
||||||
/// <summary>There is another sector in the same track/head with same sector id.</summary>
|
/// <summary>There is another sector in the same track/head with same sector id.</summary>
|
||||||
Duplicated = 0x08, /// <summary>Sector data section is not magnetized.</summary>
|
Duplicated = 0x08,
|
||||||
Demagnetized = 0x10, /// <summary>Sector data section has a physically visible hole.</summary>
|
/// <summary>Sector data section is not magnetized.</summary>
|
||||||
|
Demagnetized = 0x10,
|
||||||
|
/// <summary>Sector data section has a physically visible hole.</summary>
|
||||||
Hole = 0x20,
|
Hole = 0x20,
|
||||||
/// <summary>There is no address mark containing the requested sector id in the track/head.</summary>
|
/// <summary>There is no address mark containing the requested sector id in the track/head.</summary>
|
||||||
NotFound = 0x40
|
NotFound = 0x40
|
||||||
@@ -205,11 +305,16 @@ namespace Aaru.CommonTypes.Enums
|
|||||||
public enum FloppyTypes : byte
|
public enum FloppyTypes : byte
|
||||||
{
|
{
|
||||||
/// <summary>8" floppy</summary>
|
/// <summary>8" floppy</summary>
|
||||||
Floppy, /// <summary>5.25" floppy</summary>
|
Floppy,
|
||||||
MiniFloppy, /// <summary>3.5" floppy</summary>
|
/// <summary>5.25" floppy</summary>
|
||||||
MicroFloppy, /// <summary>3" floppy</summary>
|
MiniFloppy,
|
||||||
CompactFloppy, /// <summary>5.25" twiggy</summary>
|
/// <summary>3.5" floppy</summary>
|
||||||
FileWare, /// <summary>2.5" quickdisk</summary>
|
MicroFloppy,
|
||||||
|
/// <summary>3" floppy</summary>
|
||||||
|
CompactFloppy,
|
||||||
|
/// <summary>5.25" twiggy</summary>
|
||||||
|
FileWare,
|
||||||
|
/// <summary>2.5" quickdisk</summary>
|
||||||
QuickDisk
|
QuickDisk
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,8 +323,10 @@ namespace Aaru.CommonTypes.Enums
|
|||||||
/// <summary>Standard coercitivity (about 300Oe as found in 8" and 5.25"-double-density disks).</summary>
|
/// <summary>Standard coercitivity (about 300Oe as found in 8" and 5.25"-double-density disks).</summary>
|
||||||
Standard,
|
Standard,
|
||||||
/// <summary>Double density coercitivity (about 600Oe as found in 5.25" HD and 3.5" DD disks).</summary>
|
/// <summary>Double density coercitivity (about 600Oe as found in 5.25" HD and 3.5" DD disks).</summary>
|
||||||
Double, /// <summary>High density coercitivity (about 700Oe as found in 3.5" HD disks).</summary>
|
Double,
|
||||||
High, /// <summary>Extended density coercitivity (about 750Oe as found in 3.5" ED disks).</summary>
|
/// <summary>High density coercitivity (about 700Oe as found in 3.5" HD disks).</summary>
|
||||||
|
High,
|
||||||
|
/// <summary>Extended density coercitivity (about 750Oe as found in 3.5" ED disks).</summary>
|
||||||
Extended
|
Extended
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -49,11 +49,11 @@ namespace Aaru.CommonTypes.Exceptions
|
|||||||
/// <param name="message">Message.</param>
|
/// <param name="message">Message.</param>
|
||||||
/// <param name="inner">Inner.</param>
|
/// <param name="inner">Inner.</param>
|
||||||
public FeatureSupportedButNotImplementedImageException(string message, Exception inner) :
|
public FeatureSupportedButNotImplementedImageException(string message, Exception inner) :
|
||||||
base(message, inner) { }
|
base(message, inner) {}
|
||||||
|
|
||||||
/// <summary>Feature is supported by image but not implemented yet.</summary>
|
/// <summary>Feature is supported by image but not implemented yet.</summary>
|
||||||
/// <param name="message">Message.</param>
|
/// <param name="message">Message.</param>
|
||||||
public FeatureSupportedButNotImplementedImageException(string message) : base(message) { }
|
public FeatureSupportedButNotImplementedImageException(string message) : base(message) {}
|
||||||
|
|
||||||
/// <summary>Feature is supported by image but not implemented yet.</summary>
|
/// <summary>Feature is supported by image but not implemented yet.</summary>
|
||||||
/// <param name="info">Info.</param>
|
/// <param name="info">Info.</param>
|
||||||
@@ -72,11 +72,11 @@ namespace Aaru.CommonTypes.Exceptions
|
|||||||
/// <summary>Feature is not supported by image.</summary>
|
/// <summary>Feature is not supported by image.</summary>
|
||||||
/// <param name="message">Message.</param>
|
/// <param name="message">Message.</param>
|
||||||
/// <param name="inner">Inner.</param>
|
/// <param name="inner">Inner.</param>
|
||||||
public FeatureUnsupportedImageException(string message, Exception inner) : base(message, inner) { }
|
public FeatureUnsupportedImageException(string message, Exception inner) : base(message, inner) {}
|
||||||
|
|
||||||
/// <summary>Feature is not supported by image.</summary>
|
/// <summary>Feature is not supported by image.</summary>
|
||||||
/// <param name="message">Message.</param>
|
/// <param name="message">Message.</param>
|
||||||
public FeatureUnsupportedImageException(string message) : base(message) { }
|
public FeatureUnsupportedImageException(string message) : base(message) {}
|
||||||
|
|
||||||
/// <summary>Feature is not supported by image.</summary>
|
/// <summary>Feature is not supported by image.</summary>
|
||||||
/// <param name="info">Info.</param>
|
/// <param name="info">Info.</param>
|
||||||
@@ -95,11 +95,11 @@ namespace Aaru.CommonTypes.Exceptions
|
|||||||
/// <summary>Feature is supported by image but not present on it.</summary>
|
/// <summary>Feature is supported by image but not present on it.</summary>
|
||||||
/// <param name="message">Message.</param>
|
/// <param name="message">Message.</param>
|
||||||
/// <param name="inner">Inner.</param>
|
/// <param name="inner">Inner.</param>
|
||||||
public FeatureNotPresentImageException(string message, Exception inner) : base(message, inner) { }
|
public FeatureNotPresentImageException(string message, Exception inner) : base(message, inner) {}
|
||||||
|
|
||||||
/// <summary>Feature is supported by image but not present on it.</summary>
|
/// <summary>Feature is supported by image but not present on it.</summary>
|
||||||
/// <param name="message">Message.</param>
|
/// <param name="message">Message.</param>
|
||||||
public FeatureNotPresentImageException(string message) : base(message) { }
|
public FeatureNotPresentImageException(string message) : base(message) {}
|
||||||
|
|
||||||
/// <summary>Feature is supported by image but not present on it.</summary>
|
/// <summary>Feature is supported by image but not present on it.</summary>
|
||||||
/// <param name="info">Info.</param>
|
/// <param name="info">Info.</param>
|
||||||
@@ -118,11 +118,11 @@ namespace Aaru.CommonTypes.Exceptions
|
|||||||
/// <summary>Feature is supported by image but not by the disc it represents.</summary>
|
/// <summary>Feature is supported by image but not by the disc it represents.</summary>
|
||||||
/// <param name="message">Message.</param>
|
/// <param name="message">Message.</param>
|
||||||
/// <param name="inner">Inner.</param>
|
/// <param name="inner">Inner.</param>
|
||||||
public FeaturedNotSupportedByDiscImageException(string message, Exception inner) : base(message, inner) { }
|
public FeaturedNotSupportedByDiscImageException(string message, Exception inner) : base(message, inner) {}
|
||||||
|
|
||||||
/// <summary>Feature is supported by image but not by the disc it represents.</summary>
|
/// <summary>Feature is supported by image but not by the disc it represents.</summary>
|
||||||
/// <param name="message">Message.</param>
|
/// <param name="message">Message.</param>
|
||||||
public FeaturedNotSupportedByDiscImageException(string message) : base(message) { }
|
public FeaturedNotSupportedByDiscImageException(string message) : base(message) {}
|
||||||
|
|
||||||
/// <summary>Feature is supported by image but not by the disc it represents.</summary>
|
/// <summary>Feature is supported by image but not by the disc it represents.</summary>
|
||||||
/// <param name="info">Info.</param>
|
/// <param name="info">Info.</param>
|
||||||
@@ -141,11 +141,11 @@ namespace Aaru.CommonTypes.Exceptions
|
|||||||
/// <summary>Corrupt, incorrect or unhandled feature found on image</summary>
|
/// <summary>Corrupt, incorrect or unhandled feature found on image</summary>
|
||||||
/// <param name="message">Message.</param>
|
/// <param name="message">Message.</param>
|
||||||
/// <param name="inner">Inner.</param>
|
/// <param name="inner">Inner.</param>
|
||||||
public ImageNotSupportedException(string message, Exception inner) : base(message, inner) { }
|
public ImageNotSupportedException(string message, Exception inner) : base(message, inner) {}
|
||||||
|
|
||||||
/// <summary>Corrupt, incorrect or unhandled feature found on image</summary>
|
/// <summary>Corrupt, incorrect or unhandled feature found on image</summary>
|
||||||
/// <param name="message">Message.</param>
|
/// <param name="message">Message.</param>
|
||||||
public ImageNotSupportedException(string message) : base(message) { }
|
public ImageNotSupportedException(string message) : base(message) {}
|
||||||
|
|
||||||
/// <summary>Corrupt, incorrect or unhandled feature found on image</summary>
|
/// <summary>Corrupt, incorrect or unhandled feature found on image</summary>
|
||||||
/// <param name="info">Info.</param>
|
/// <param name="info">Info.</param>
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ namespace Aaru.CommonTypes.Extents
|
|||||||
byte realEnd;
|
byte realEnd;
|
||||||
|
|
||||||
if(run)
|
if(run)
|
||||||
realEnd = (byte)(start + end - 1);
|
realEnd = (byte)((start + end) - 1);
|
||||||
else
|
else
|
||||||
realEnd = end;
|
realEnd = end;
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ namespace Aaru.CommonTypes.Extents
|
|||||||
int realEnd;
|
int realEnd;
|
||||||
|
|
||||||
if(run)
|
if(run)
|
||||||
realEnd = start + end - 1;
|
realEnd = (start + end) - 1;
|
||||||
else
|
else
|
||||||
realEnd = end;
|
realEnd = end;
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ namespace Aaru.CommonTypes.Extents
|
|||||||
long realEnd;
|
long realEnd;
|
||||||
|
|
||||||
if(run)
|
if(run)
|
||||||
realEnd = start + end - 1;
|
realEnd = (start + end) - 1;
|
||||||
else
|
else
|
||||||
realEnd = end;
|
realEnd = end;
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ namespace Aaru.CommonTypes.Extents
|
|||||||
sbyte realEnd;
|
sbyte realEnd;
|
||||||
|
|
||||||
if(run)
|
if(run)
|
||||||
realEnd = (sbyte)(start + end - 1);
|
realEnd = (sbyte)((start + end) - 1);
|
||||||
else
|
else
|
||||||
realEnd = end;
|
realEnd = end;
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ namespace Aaru.CommonTypes.Extents
|
|||||||
short realEnd;
|
short realEnd;
|
||||||
|
|
||||||
if(run)
|
if(run)
|
||||||
realEnd = (short)(start + end - 1);
|
realEnd = (short)((start + end) - 1);
|
||||||
else
|
else
|
||||||
realEnd = end;
|
realEnd = end;
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ namespace Aaru.CommonTypes.Extents
|
|||||||
uint realEnd;
|
uint realEnd;
|
||||||
|
|
||||||
if(run)
|
if(run)
|
||||||
realEnd = start + end - 1;
|
realEnd = (start + end) - 1;
|
||||||
else
|
else
|
||||||
realEnd = end;
|
realEnd = end;
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ namespace Aaru.CommonTypes.Extents
|
|||||||
ulong realEnd;
|
ulong realEnd;
|
||||||
|
|
||||||
if(run)
|
if(run)
|
||||||
realEnd = start + end - 1;
|
realEnd = (start + end) - 1;
|
||||||
else
|
else
|
||||||
realEnd = end;
|
realEnd = end;
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ namespace Aaru.CommonTypes.Extents
|
|||||||
ushort realEnd;
|
ushort realEnd;
|
||||||
|
|
||||||
if(run)
|
if(run)
|
||||||
realEnd = (ushort)(start + end - 1);
|
realEnd = (ushort)((start + end) - 1);
|
||||||
else
|
else
|
||||||
realEnd = end;
|
realEnd = end;
|
||||||
|
|
||||||
|
|||||||
@@ -53,14 +53,14 @@ namespace Aaru.CommonTypes
|
|||||||
/// <summary>Fills the list of all known filters</summary>
|
/// <summary>Fills the list of all known filters</summary>
|
||||||
public FiltersList()
|
public FiltersList()
|
||||||
{
|
{
|
||||||
Assembly assembly = Assembly.Load("Aaru.Filters");
|
var assembly = Assembly.Load("Aaru.Filters");
|
||||||
Filters = new SortedDictionary<string, IFilter>();
|
Filters = new SortedDictionary<string, IFilter>();
|
||||||
|
|
||||||
foreach(Type type in assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IFilter))))
|
foreach(Type type in assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IFilter))))
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var filter = (IFilter)type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
var filter = (IFilter)type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
||||||
{ });
|
{});
|
||||||
|
|
||||||
if(filter != null &&
|
if(filter != null &&
|
||||||
!Filters.ContainsKey(filter.Name.ToLower()))
|
!Filters.ContainsKey(filter.Name.ToLower()))
|
||||||
@@ -88,7 +88,7 @@ namespace Aaru.CommonTypes
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
var foundFilter = (IFilter)filter.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
var foundFilter = (IFilter)filter.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
||||||
{ });
|
{});
|
||||||
|
|
||||||
foundFilter?.Open(path);
|
foundFilter?.Open(path);
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ namespace Aaru.CommonTypes
|
|||||||
{
|
{
|
||||||
public static class Geometry
|
public static class Geometry
|
||||||
{
|
{
|
||||||
static readonly(ushort cylinders, byte heads, ushort sectorsPerTrack, uint bytesPerSector, MediaEncoding
|
static readonly (ushort cylinders, byte heads, ushort sectorsPerTrack, uint bytesPerSector, MediaEncoding
|
||||||
encoding, bool variableSectorsPerTrack, MediaType type)[] KnownGeometries =
|
encoding, bool variableSectorsPerTrack, MediaType type)[] KnownGeometries =
|
||||||
{
|
{
|
||||||
(32, 1, 8, 319, MediaEncoding.FM, false, MediaType.IBM23FD),
|
(32, 1, 8, 319, MediaEncoding.FM, false, MediaType.IBM23FD),
|
||||||
@@ -128,8 +128,8 @@ namespace Aaru.CommonTypes
|
|||||||
geometry.variableSectorsPerTrack select geom.type).
|
geometry.variableSectorsPerTrack select geom.type).
|
||||||
FirstOrDefault();
|
FirstOrDefault();
|
||||||
|
|
||||||
public static(ushort cylinders, byte heads, ushort sectorsPerTrack, uint bytesPerSector, MediaEncoding encoding,
|
public static (ushort cylinders, byte heads, ushort sectorsPerTrack, uint bytesPerSector, MediaEncoding encoding
|
||||||
bool variableSectorsPerTrack, MediaType type) GetGeometry(MediaType mediaType) =>
|
, bool variableSectorsPerTrack, MediaType type) GetGeometry(MediaType mediaType) =>
|
||||||
(from geom in KnownGeometries where geom.type == mediaType select geom).FirstOrDefault();
|
(from geom in KnownGeometries where geom.type == mediaType select geom).FirstOrDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -41,15 +41,18 @@ namespace Aaru.CommonTypes.Interfaces
|
|||||||
public enum ArchiveSupportedFeature : uint
|
public enum ArchiveSupportedFeature : uint
|
||||||
{
|
{
|
||||||
/// <summary>The archive supports filenames for its entries. If this flag is not set, files can only be accessed by number.</summary>
|
/// <summary>The archive supports filenames for its entries. If this flag is not set, files can only be accessed by number.</summary>
|
||||||
SupportsFilenames = 1 << 0, /// <summary>
|
SupportsFilenames = 1 << 0,
|
||||||
|
/// <summary>
|
||||||
/// The archive supports compression. If this flag is not set, compressed and uncompressed lengths are always the
|
/// The archive supports compression. If this flag is not set, compressed and uncompressed lengths are always the
|
||||||
/// same.
|
/// same.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
SupportsCompression = 1 << 1, /// <summary>
|
SupportsCompression = 1 << 1,
|
||||||
|
/// <summary>
|
||||||
/// The archive supports subdirectories. If this flag is not set, all filenames are guaranteed to not contain any
|
/// The archive supports subdirectories. If this flag is not set, all filenames are guaranteed to not contain any
|
||||||
/// "/" character.
|
/// "/" character.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
SupportsSubdirectories = 1 << 2, /// <summary>
|
SupportsSubdirectories = 1 << 2,
|
||||||
|
/// <summary>
|
||||||
/// The archive supports explicit entries for directories (like Zip, for example). If this flag is not set,
|
/// The archive supports explicit entries for directories (like Zip, for example). If this flag is not set,
|
||||||
/// directories are implicit by the relative name of the files.
|
/// directories are implicit by the relative name of the files.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ namespace Aaru.CommonTypes.Interop
|
|||||||
{
|
{
|
||||||
if((int)Environment.OSVersion.Platform < 4 ||
|
if((int)Environment.OSVersion.Platform < 4 ||
|
||||||
(int)Environment.OSVersion.Platform == 5)
|
(int)Environment.OSVersion.Platform == 5)
|
||||||
return(PlatformID)(int)Environment.OSVersion.Platform;
|
return (PlatformID)(int)Environment.OSVersion.Platform;
|
||||||
|
|
||||||
int error = uname(out utsname unixname);
|
int error = uname(out utsname unixname);
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ namespace Aaru.CommonTypes.Interop
|
|||||||
switch(unixname.sysname)
|
switch(unixname.sysname)
|
||||||
{
|
{
|
||||||
// TODO: Differentiate Linux, Android, Tizen
|
// TODO: Differentiate Linux, Android, Tizen
|
||||||
case"Linux":
|
case "Linux":
|
||||||
{
|
{
|
||||||
#if __ANDROID__
|
#if __ANDROID__
|
||||||
return PlatformID.Android;
|
return PlatformID.Android;
|
||||||
@@ -133,7 +133,7 @@ namespace Aaru.CommonTypes.Interop
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
case"Darwin":
|
case "Darwin":
|
||||||
{
|
{
|
||||||
IntPtr pLen = Marshal.AllocHGlobal(sizeof(int));
|
IntPtr pLen = Marshal.AllocHGlobal(sizeof(int));
|
||||||
int osxError = OSX_sysctlbyname("hw.machine", IntPtr.Zero, pLen, IntPtr.Zero, 0);
|
int osxError = OSX_sysctlbyname("hw.machine", IntPtr.Zero, pLen, IntPtr.Zero, 0);
|
||||||
@@ -171,29 +171,29 @@ namespace Aaru.CommonTypes.Interop
|
|||||||
return PlatformID.MacOSX;
|
return PlatformID.MacOSX;
|
||||||
}
|
}
|
||||||
|
|
||||||
case"GNU": return PlatformID.Hurd;
|
case "GNU": return PlatformID.Hurd;
|
||||||
case"FreeBSD":
|
case "FreeBSD":
|
||||||
case"GNU/kFreeBSD": return PlatformID.FreeBSD;
|
case "GNU/kFreeBSD": return PlatformID.FreeBSD;
|
||||||
case"DragonFly": return PlatformID.DragonFly;
|
case "DragonFly": return PlatformID.DragonFly;
|
||||||
case"Haiku": return PlatformID.Haiku;
|
case "Haiku": return PlatformID.Haiku;
|
||||||
case"HP-UX": return PlatformID.HPUX;
|
case "HP-UX": return PlatformID.HPUX;
|
||||||
case"AIX": return PlatformID.AIX;
|
case "AIX": return PlatformID.AIX;
|
||||||
case"OS400": return PlatformID.OS400;
|
case "OS400": return PlatformID.OS400;
|
||||||
case"IRIX":
|
case "IRIX":
|
||||||
case"IRIX64": return PlatformID.IRIX;
|
case "IRIX64": return PlatformID.IRIX;
|
||||||
case"Minix": return PlatformID.Minix;
|
case "Minix": return PlatformID.Minix;
|
||||||
case"NetBSD": return PlatformID.NetBSD;
|
case "NetBSD": return PlatformID.NetBSD;
|
||||||
case"NONSTOP_KERNEL": return PlatformID.NonStop;
|
case "NONSTOP_KERNEL": return PlatformID.NonStop;
|
||||||
case"OpenBSD": return PlatformID.OpenBSD;
|
case "OpenBSD": return PlatformID.OpenBSD;
|
||||||
case"QNX": return PlatformID.QNX;
|
case "QNX": return PlatformID.QNX;
|
||||||
case"SINIX-Y": return PlatformID.SINIX;
|
case "SINIX-Y": return PlatformID.SINIX;
|
||||||
case"SunOS": return PlatformID.Solaris;
|
case "SunOS": return PlatformID.Solaris;
|
||||||
case"OSF1": return PlatformID.Tru64;
|
case "OSF1": return PlatformID.Tru64;
|
||||||
case"ULTRIX": return PlatformID.Ultrix;
|
case "ULTRIX": return PlatformID.Ultrix;
|
||||||
case"SCO_SV": return PlatformID.OpenServer;
|
case "SCO_SV": return PlatformID.OpenServer;
|
||||||
case"UnixWare": return PlatformID.UnixWare;
|
case "UnixWare": return PlatformID.UnixWare;
|
||||||
case"Interix":
|
case "Interix":
|
||||||
case"UWIN-W7": return PlatformID.Win32NT;
|
case "UWIN-W7": return PlatformID.Win32NT;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if(unixname.sysname.StartsWith("CYGWIN_NT", StringComparison.Ordinal) ||
|
if(unixname.sysname.StartsWith("CYGWIN_NT", StringComparison.Ordinal) ||
|
||||||
@@ -217,18 +217,18 @@ namespace Aaru.CommonTypes.Interop
|
|||||||
{
|
{
|
||||||
case PlatformID.MacOSX:
|
case PlatformID.MacOSX:
|
||||||
if(Environment.OSVersion.Version.Major != 1)
|
if(Environment.OSVersion.Version.Major != 1)
|
||||||
return$"10.{Environment.OSVersion.Version.Major - 4}.{Environment.OSVersion.Version.Minor}";
|
return $"10.{Environment.OSVersion.Version.Major - 4}.{Environment.OSVersion.Version.Minor}";
|
||||||
|
|
||||||
switch(Environment.OSVersion.Version.Minor)
|
switch(Environment.OSVersion.Version.Minor)
|
||||||
{
|
{
|
||||||
case 3: return"10.0";
|
case 3: return "10.0";
|
||||||
case 4: return"10.1";
|
case 4: return "10.1";
|
||||||
}
|
}
|
||||||
|
|
||||||
goto default;
|
goto default;
|
||||||
case PlatformID.Win32NT:
|
case PlatformID.Win32NT:
|
||||||
// From Windows 8.1 the reported version is simply falsified...
|
// From Windows 8.1 the reported version is simply falsified...
|
||||||
if(Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Major >= 2 ||
|
if((Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Major >= 2) ||
|
||||||
Environment.OSVersion.Version.Major > 6)
|
Environment.OSVersion.Version.Major > 6)
|
||||||
return FileVersionInfo.
|
return FileVersionInfo.
|
||||||
GetVersionInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System),
|
GetVersionInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System),
|
||||||
@@ -247,18 +247,18 @@ namespace Aaru.CommonTypes.Interop
|
|||||||
{
|
{
|
||||||
switch(id)
|
switch(id)
|
||||||
{
|
{
|
||||||
case PlatformID.AIX: return"AIX";
|
case PlatformID.AIX: return "AIX";
|
||||||
case PlatformID.Android: return"Android";
|
case PlatformID.Android: return "Android";
|
||||||
case PlatformID.DragonFly: return"DragonFly BSD";
|
case PlatformID.DragonFly: return "DragonFly BSD";
|
||||||
case PlatformID.FreeBSD: return"FreeBSD";
|
case PlatformID.FreeBSD: return "FreeBSD";
|
||||||
case PlatformID.Haiku: return"Haiku";
|
case PlatformID.Haiku: return "Haiku";
|
||||||
case PlatformID.HPUX: return"HP/UX";
|
case PlatformID.HPUX: return "HP/UX";
|
||||||
case PlatformID.Hurd: return"Hurd";
|
case PlatformID.Hurd: return "Hurd";
|
||||||
case PlatformID.iOS: return"iOS";
|
case PlatformID.iOS: return "iOS";
|
||||||
case PlatformID.IRIX: return"IRIX";
|
case PlatformID.IRIX: return "IRIX";
|
||||||
case PlatformID.Linux:
|
case PlatformID.Linux:
|
||||||
if(!File.Exists("/proc/version"))
|
if(!File.Exists("/proc/version"))
|
||||||
return"Linux";
|
return "Linux";
|
||||||
|
|
||||||
string s = File.ReadAllText("/proc/version");
|
string s = File.ReadAllText("/proc/version");
|
||||||
|
|
||||||
@@ -266,95 +266,95 @@ namespace Aaru.CommonTypes.Interop
|
|||||||
|
|
||||||
case PlatformID.MacOSX:
|
case PlatformID.MacOSX:
|
||||||
if(string.IsNullOrEmpty(version))
|
if(string.IsNullOrEmpty(version))
|
||||||
return"macOS";
|
return "macOS";
|
||||||
|
|
||||||
string[] pieces = version.Split('.');
|
string[] pieces = version.Split('.');
|
||||||
|
|
||||||
if(pieces.Length < 2 ||
|
if(pieces.Length < 2 ||
|
||||||
!int.TryParse(pieces[1], out int minor))
|
!int.TryParse(pieces[1], out int minor))
|
||||||
return"macOS";
|
return "macOS";
|
||||||
|
|
||||||
if(minor >= 12)
|
if(minor >= 12)
|
||||||
return"macOS";
|
return "macOS";
|
||||||
|
|
||||||
if(minor >= 8)
|
if(minor >= 8)
|
||||||
return"OS X";
|
return "OS X";
|
||||||
|
|
||||||
return"Mac OS X";
|
return "Mac OS X";
|
||||||
|
|
||||||
case PlatformID.Minix: return"MINIX";
|
case PlatformID.Minix: return "MINIX";
|
||||||
case PlatformID.NetBSD: return"NetBSD";
|
case PlatformID.NetBSD: return "NetBSD";
|
||||||
case PlatformID.NonStop: return"NonStop OS";
|
case PlatformID.NonStop: return "NonStop OS";
|
||||||
case PlatformID.OpenBSD: return"OpenBSD";
|
case PlatformID.OpenBSD: return "OpenBSD";
|
||||||
case PlatformID.OpenServer: return"SCO OpenServer";
|
case PlatformID.OpenServer: return "SCO OpenServer";
|
||||||
case PlatformID.OS400: return"OS/400";
|
case PlatformID.OS400: return "OS/400";
|
||||||
case PlatformID.PlayStation3: return"Sony CellOS";
|
case PlatformID.PlayStation3: return "Sony CellOS";
|
||||||
case PlatformID.PlayStation4: return"Sony Orbis OS";
|
case PlatformID.PlayStation4: return "Sony Orbis OS";
|
||||||
case PlatformID.QNX: return"QNX";
|
case PlatformID.QNX: return "QNX";
|
||||||
case PlatformID.SINIX: return"SINIX";
|
case PlatformID.SINIX: return "SINIX";
|
||||||
case PlatformID.Solaris: return"Sun Solaris";
|
case PlatformID.Solaris: return "Sun Solaris";
|
||||||
case PlatformID.Tizen: return"Samsung Tizen";
|
case PlatformID.Tizen: return "Samsung Tizen";
|
||||||
case PlatformID.Tru64: return"Tru64 UNIX";
|
case PlatformID.Tru64: return "Tru64 UNIX";
|
||||||
case PlatformID.Ultrix: return"Ultrix";
|
case PlatformID.Ultrix: return "Ultrix";
|
||||||
case PlatformID.Unix: return"UNIX";
|
case PlatformID.Unix: return "UNIX";
|
||||||
case PlatformID.UnixWare: return"SCO UnixWare";
|
case PlatformID.UnixWare: return "SCO UnixWare";
|
||||||
case PlatformID.Wii: return"Nintendo Wii";
|
case PlatformID.Wii: return "Nintendo Wii";
|
||||||
case PlatformID.WiiU: return"Nintendo Wii U";
|
case PlatformID.WiiU: return "Nintendo Wii U";
|
||||||
case PlatformID.Win32NT:
|
case PlatformID.Win32NT:
|
||||||
if(string.IsNullOrEmpty(version))
|
if(string.IsNullOrEmpty(version))
|
||||||
return"Windows NT/2000/XP/Vista/7/10";
|
return "Windows NT/2000/XP/Vista/7/10";
|
||||||
|
|
||||||
if(version.StartsWith("3.", StringComparison.Ordinal) ||
|
if(version.StartsWith("3.", StringComparison.Ordinal) ||
|
||||||
version.StartsWith("4.", StringComparison.Ordinal))
|
version.StartsWith("4.", StringComparison.Ordinal))
|
||||||
return"Windows NT";
|
return "Windows NT";
|
||||||
|
|
||||||
if(version.StartsWith("5.0", StringComparison.Ordinal))
|
if(version.StartsWith("5.0", StringComparison.Ordinal))
|
||||||
return"Windows 2000";
|
return "Windows 2000";
|
||||||
|
|
||||||
if(version.StartsWith("5.1", StringComparison.Ordinal))
|
if(version.StartsWith("5.1", StringComparison.Ordinal))
|
||||||
return"Windows XP";
|
return "Windows XP";
|
||||||
|
|
||||||
if(version.StartsWith("5.2", StringComparison.Ordinal))
|
if(version.StartsWith("5.2", StringComparison.Ordinal))
|
||||||
return"Windows 2003";
|
return "Windows 2003";
|
||||||
|
|
||||||
if(version.StartsWith("6.0", StringComparison.Ordinal))
|
if(version.StartsWith("6.0", StringComparison.Ordinal))
|
||||||
return"Windows Vista";
|
return "Windows Vista";
|
||||||
|
|
||||||
if(version.StartsWith("6.1", StringComparison.Ordinal))
|
if(version.StartsWith("6.1", StringComparison.Ordinal))
|
||||||
return"Windows 7";
|
return "Windows 7";
|
||||||
|
|
||||||
if(version.StartsWith("6.2", StringComparison.Ordinal))
|
if(version.StartsWith("6.2", StringComparison.Ordinal))
|
||||||
return"Windows 8";
|
return "Windows 8";
|
||||||
|
|
||||||
if(version.StartsWith("6.3", StringComparison.Ordinal))
|
if(version.StartsWith("6.3", StringComparison.Ordinal))
|
||||||
return"Windows 8.1";
|
return "Windows 8.1";
|
||||||
|
|
||||||
if(version.StartsWith("10.0", StringComparison.Ordinal))
|
if(version.StartsWith("10.0", StringComparison.Ordinal))
|
||||||
return"Windows 10";
|
return "Windows 10";
|
||||||
|
|
||||||
return"Windows NT/2000/XP/Vista/7/10";
|
return "Windows NT/2000/XP/Vista/7/10";
|
||||||
case PlatformID.Win32S: return"Windows 3.x with win32s";
|
case PlatformID.Win32S: return "Windows 3.x with win32s";
|
||||||
case PlatformID.Win32Windows:
|
case PlatformID.Win32Windows:
|
||||||
if(string.IsNullOrEmpty(version))
|
if(string.IsNullOrEmpty(version))
|
||||||
return"Windows 9x/Me";
|
return "Windows 9x/Me";
|
||||||
|
|
||||||
if(version.StartsWith("4.0", StringComparison.Ordinal))
|
if(version.StartsWith("4.0", StringComparison.Ordinal))
|
||||||
return"Windows 95";
|
return "Windows 95";
|
||||||
|
|
||||||
if(version.StartsWith("4.10.2222", StringComparison.Ordinal))
|
if(version.StartsWith("4.10.2222", StringComparison.Ordinal))
|
||||||
return"Windows 98 SE";
|
return "Windows 98 SE";
|
||||||
|
|
||||||
if(version.StartsWith("4.1", StringComparison.Ordinal))
|
if(version.StartsWith("4.1", StringComparison.Ordinal))
|
||||||
return"Windows 98";
|
return "Windows 98";
|
||||||
|
|
||||||
if(version.StartsWith("4.9", StringComparison.Ordinal))
|
if(version.StartsWith("4.9", StringComparison.Ordinal))
|
||||||
return"Windows Me";
|
return "Windows Me";
|
||||||
|
|
||||||
return"Windows 9x/Me";
|
return "Windows 9x/Me";
|
||||||
case PlatformID.WinCE: return"Windows CE/Mobile";
|
case PlatformID.WinCE: return "Windows CE/Mobile";
|
||||||
case PlatformID.WindowsPhone: return"Windows Phone";
|
case PlatformID.WindowsPhone: return "Windows Phone";
|
||||||
case PlatformID.Xbox: return"Xbox OS";
|
case PlatformID.Xbox: return "Xbox OS";
|
||||||
case PlatformID.zOS: return"z/OS";
|
case PlatformID.zOS: return "z/OS";
|
||||||
default: return id.ToString();
|
default: return id.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,41 +42,76 @@ namespace Aaru.CommonTypes.Interop
|
|||||||
public enum PlatformID
|
public enum PlatformID
|
||||||
{
|
{
|
||||||
/// <summary>Win32s</summary>
|
/// <summary>Win32s</summary>
|
||||||
Win32S = 0, /// <summary>Win32 (Windows 9x)</summary>
|
Win32S = 0,
|
||||||
Win32Windows = 1, /// <summary>Windows NT</summary>
|
/// <summary>Win32 (Windows 9x)</summary>
|
||||||
Win32NT = 2, /// <summary>Windows Mobile</summary>
|
Win32Windows = 1,
|
||||||
WinCE = 3, /// <summary>UNIX (do not use, too generic)</summary>
|
/// <summary>Windows NT</summary>
|
||||||
Unix = 4, /// <summary>Xbox 360</summary>
|
Win32NT = 2,
|
||||||
Xbox = 5, /// <summary>OS X</summary>
|
/// <summary>Windows Mobile</summary>
|
||||||
MacOSX = 6, /// <summary>iOS is not OS X</summary>
|
WinCE = 3,
|
||||||
iOS = 7, /// <summary>Linux</summary>
|
/// <summary>UNIX (do not use, too generic)</summary>
|
||||||
Linux = 8, /// <summary>Sun Solaris</summary>
|
Unix = 4,
|
||||||
Solaris = 9, /// <summary>NetBSD</summary>
|
/// <summary>Xbox 360</summary>
|
||||||
NetBSD = 10, /// <summary>OpenBSD</summary>
|
Xbox = 5,
|
||||||
OpenBSD = 11, /// <summary>FreeBSD</summary>
|
/// <summary>OS X</summary>
|
||||||
FreeBSD = 12, /// <summary>DragonFly BSD</summary>
|
MacOSX = 6,
|
||||||
DragonFly = 13, /// <summary>Nintendo Wii</summary>
|
/// <summary>iOS is not OS X</summary>
|
||||||
Wii = 14, /// <summary>Nintendo Wii U</summary>
|
iOS = 7,
|
||||||
WiiU = 15, /// <summary>Sony PlayStation 3</summary>
|
/// <summary>Linux</summary>
|
||||||
PlayStation3 = 16, /// <summary>Sony Playstation 4</summary>
|
Linux = 8,
|
||||||
PlayStation4 = 17, /// <summary>Google Android</summary>
|
/// <summary>Sun Solaris</summary>
|
||||||
Android = 18, /// <summary>Samsung Tizen</summary>
|
Solaris = 9,
|
||||||
Tizen = 19, /// <summary>Windows Phone</summary>
|
/// <summary>NetBSD</summary>
|
||||||
WindowsPhone = 20, /// <summary>GNU/Hurd</summary>
|
NetBSD = 10,
|
||||||
Hurd = 21, /// <summary>Haiku</summary>
|
/// <summary>OpenBSD</summary>
|
||||||
Haiku = 22, /// <summary>HP-UX</summary>
|
OpenBSD = 11,
|
||||||
HPUX = 23, /// <summary>AIX</summary>
|
/// <summary>FreeBSD</summary>
|
||||||
AIX = 24, /// <summary>OS/400</summary>
|
FreeBSD = 12,
|
||||||
OS400 = 25, /// <summary>IRIX</summary>
|
/// <summary>DragonFly BSD</summary>
|
||||||
IRIX = 26, /// <summary>Minix</summary>
|
DragonFly = 13,
|
||||||
Minix = 27, /// <summary>NonStop</summary>
|
/// <summary>Nintendo Wii</summary>
|
||||||
NonStop = 28, /// <summary>QNX</summary>
|
Wii = 14,
|
||||||
QNX = 29, /// <summary>SINIX</summary>
|
/// <summary>Nintendo Wii U</summary>
|
||||||
SINIX = 30, /// <summary>Tru64 UNIX</summary>
|
WiiU = 15,
|
||||||
Tru64 = 31, /// <summary>Ultrix</summary>
|
/// <summary>Sony PlayStation 3</summary>
|
||||||
Ultrix = 32, /// <summary>SCO OpenServer / SCO UNIX</summary>
|
PlayStation3 = 16,
|
||||||
OpenServer = 33, /// <summary>SCO UnixWare</summary>
|
/// <summary>Sony Playstation 4</summary>
|
||||||
UnixWare = 34, /// <summary>IBM z/OS</summary>
|
PlayStation4 = 17,
|
||||||
|
/// <summary>Google Android</summary>
|
||||||
|
Android = 18,
|
||||||
|
/// <summary>Samsung Tizen</summary>
|
||||||
|
Tizen = 19,
|
||||||
|
/// <summary>Windows Phone</summary>
|
||||||
|
WindowsPhone = 20,
|
||||||
|
/// <summary>GNU/Hurd</summary>
|
||||||
|
Hurd = 21,
|
||||||
|
/// <summary>Haiku</summary>
|
||||||
|
Haiku = 22,
|
||||||
|
/// <summary>HP-UX</summary>
|
||||||
|
HPUX = 23,
|
||||||
|
/// <summary>AIX</summary>
|
||||||
|
AIX = 24,
|
||||||
|
/// <summary>OS/400</summary>
|
||||||
|
OS400 = 25,
|
||||||
|
/// <summary>IRIX</summary>
|
||||||
|
IRIX = 26,
|
||||||
|
/// <summary>Minix</summary>
|
||||||
|
Minix = 27,
|
||||||
|
/// <summary>NonStop</summary>
|
||||||
|
NonStop = 28,
|
||||||
|
/// <summary>QNX</summary>
|
||||||
|
QNX = 29,
|
||||||
|
/// <summary>SINIX</summary>
|
||||||
|
SINIX = 30,
|
||||||
|
/// <summary>Tru64 UNIX</summary>
|
||||||
|
Tru64 = 31,
|
||||||
|
/// <summary>Ultrix</summary>
|
||||||
|
Ultrix = 32,
|
||||||
|
/// <summary>SCO OpenServer / SCO UNIX</summary>
|
||||||
|
OpenServer = 33,
|
||||||
|
/// <summary>SCO UnixWare</summary>
|
||||||
|
UnixWare = 34,
|
||||||
|
/// <summary>IBM z/OS</summary>
|
||||||
zOS = 35, Unknown = -1
|
zOS = 35, Unknown = -1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -75,7 +75,7 @@ namespace Aaru.CommonTypes.Interop
|
|||||||
GetMethod("GetDisplayName", BindingFlags.NonPublic | BindingFlags.Static);
|
GetMethod("GetDisplayName", BindingFlags.NonPublic | BindingFlags.Static);
|
||||||
|
|
||||||
if(monoDisplayName != null)
|
if(monoDisplayName != null)
|
||||||
return(string)monoDisplayName.Invoke(null, null);
|
return (string)monoDisplayName.Invoke(null, null);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
{
|
{
|
||||||
public class DeviceReportV2
|
public class DeviceReportV2
|
||||||
{
|
{
|
||||||
public DeviceReportV2() { }
|
public DeviceReportV2() {}
|
||||||
|
|
||||||
public DeviceReportV2(DeviceReport reportV1)
|
public DeviceReportV2(DeviceReport reportV1)
|
||||||
{
|
{
|
||||||
@@ -161,7 +161,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
|
|
||||||
public class Usb
|
public class Usb
|
||||||
{
|
{
|
||||||
public Usb() { }
|
public Usb() {}
|
||||||
|
|
||||||
public Usb(usbType usb)
|
public Usb(usbType usb)
|
||||||
{
|
{
|
||||||
@@ -188,7 +188,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
|
|
||||||
public class FireWire
|
public class FireWire
|
||||||
{
|
{
|
||||||
public FireWire() { }
|
public FireWire() {}
|
||||||
|
|
||||||
public FireWire(firewireType firewire)
|
public FireWire(firewireType firewire)
|
||||||
{
|
{
|
||||||
@@ -215,7 +215,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
|
|
||||||
public class Ata
|
public class Ata
|
||||||
{
|
{
|
||||||
public Ata() { }
|
public Ata() {}
|
||||||
|
|
||||||
public Ata(ataType ata)
|
public Ata(ataType ata)
|
||||||
{
|
{
|
||||||
@@ -488,7 +488,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
|
|
||||||
public class Chs
|
public class Chs
|
||||||
{
|
{
|
||||||
public Chs() { }
|
public Chs() {}
|
||||||
|
|
||||||
public Chs(chsType chs)
|
public Chs(chsType chs)
|
||||||
{
|
{
|
||||||
@@ -506,7 +506,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
|
|
||||||
public class Scsi
|
public class Scsi
|
||||||
{
|
{
|
||||||
public Scsi() { }
|
public Scsi() {}
|
||||||
|
|
||||||
public Scsi(scsiType scsi)
|
public Scsi(scsiType scsi)
|
||||||
{
|
{
|
||||||
@@ -660,7 +660,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
|
|
||||||
public class ScsiMode
|
public class ScsiMode
|
||||||
{
|
{
|
||||||
public ScsiMode() { }
|
public ScsiMode() {}
|
||||||
|
|
||||||
public ScsiMode(modeType mode)
|
public ScsiMode(modeType mode)
|
||||||
{
|
{
|
||||||
@@ -714,7 +714,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
|
|
||||||
public class BlockDescriptor
|
public class BlockDescriptor
|
||||||
{
|
{
|
||||||
public BlockDescriptor() { }
|
public BlockDescriptor() {}
|
||||||
|
|
||||||
public BlockDescriptor(blockDescriptorType descriptor)
|
public BlockDescriptor(blockDescriptorType descriptor)
|
||||||
{
|
{
|
||||||
@@ -737,7 +737,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
|
|
||||||
public class ScsiPage
|
public class ScsiPage
|
||||||
{
|
{
|
||||||
public ScsiPage() { }
|
public ScsiPage() {}
|
||||||
|
|
||||||
public ScsiPage(pageType evpdPage)
|
public ScsiPage(pageType evpdPage)
|
||||||
{
|
{
|
||||||
@@ -761,7 +761,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
|
|
||||||
public class Mmc
|
public class Mmc
|
||||||
{
|
{
|
||||||
public Mmc() { }
|
public Mmc() {}
|
||||||
|
|
||||||
public Mmc(mmcType mmc)
|
public Mmc(mmcType mmc)
|
||||||
{
|
{
|
||||||
@@ -843,7 +843,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
|
|
||||||
public class MmcFeatures
|
public class MmcFeatures
|
||||||
{
|
{
|
||||||
public MmcFeatures() { }
|
public MmcFeatures() {}
|
||||||
|
|
||||||
public MmcFeatures(mmcFeaturesType features)
|
public MmcFeatures(mmcFeaturesType features)
|
||||||
{
|
{
|
||||||
@@ -1256,7 +1256,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
{
|
{
|
||||||
public Identify.IdentifyDevice? IdentifyDevice;
|
public Identify.IdentifyDevice? IdentifyDevice;
|
||||||
|
|
||||||
public TestedMedia() { }
|
public TestedMedia() {}
|
||||||
|
|
||||||
public TestedMedia(testedMediaType mediaType, bool ata)
|
public TestedMedia(testedMediaType mediaType, bool ata)
|
||||||
{
|
{
|
||||||
@@ -1852,7 +1852,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
|
|
||||||
public class Ssc
|
public class Ssc
|
||||||
{
|
{
|
||||||
public Ssc() { }
|
public Ssc() {}
|
||||||
|
|
||||||
public Ssc(sscType ssc)
|
public Ssc(sscType ssc)
|
||||||
{
|
{
|
||||||
@@ -1901,7 +1901,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
|
|
||||||
public class TestedSequentialMedia
|
public class TestedSequentialMedia
|
||||||
{
|
{
|
||||||
public TestedSequentialMedia() { }
|
public TestedSequentialMedia() {}
|
||||||
|
|
||||||
public TestedSequentialMedia(SequentialMedia media)
|
public TestedSequentialMedia(SequentialMedia media)
|
||||||
{
|
{
|
||||||
@@ -1963,7 +1963,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
{
|
{
|
||||||
public string[] AdditionalInformation;
|
public string[] AdditionalInformation;
|
||||||
|
|
||||||
public Pcmcia() { }
|
public Pcmcia() {}
|
||||||
|
|
||||||
public Pcmcia(pcmciaType pcmcia)
|
public Pcmcia(pcmciaType pcmcia)
|
||||||
{
|
{
|
||||||
@@ -1996,7 +1996,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
|
|
||||||
public class MmcSd
|
public class MmcSd
|
||||||
{
|
{
|
||||||
public MmcSd() { }
|
public MmcSd() {}
|
||||||
|
|
||||||
public MmcSd(mmcsdType mmcSd)
|
public MmcSd(mmcsdType mmcSd)
|
||||||
{
|
{
|
||||||
@@ -2018,7 +2018,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
|
|
||||||
public class SscSupportedMedia
|
public class SscSupportedMedia
|
||||||
{
|
{
|
||||||
public SscSupportedMedia() { }
|
public SscSupportedMedia() {}
|
||||||
|
|
||||||
public SscSupportedMedia(SupportedMedia media)
|
public SscSupportedMedia(SupportedMedia media)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
{
|
{
|
||||||
public static class MediaType
|
public static class MediaType
|
||||||
{
|
{
|
||||||
public static(string type, string subType) MediaTypeToString(CommonTypes.MediaType dskType)
|
public static (string type, string subType) MediaTypeToString(CommonTypes.MediaType dskType)
|
||||||
{
|
{
|
||||||
string discType;
|
string discType;
|
||||||
string discSubType;
|
string discSubType;
|
||||||
@@ -2492,7 +2492,7 @@ namespace Aaru.CommonTypes.Metadata
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return(discType, discSubType);
|
return (discType, discSubType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,7 @@ namespace Aaru.CommonTypes
|
|||||||
/// <summary>Information that does not find space in this struct</summary>
|
/// <summary>Information that does not find space in this struct</summary>
|
||||||
public string Description;
|
public string Description;
|
||||||
/// <summary>LBA of last partition sector</summary>
|
/// <summary>LBA of last partition sector</summary>
|
||||||
public ulong End => Start + Length - 1;
|
public ulong End => (Start + Length) - 1;
|
||||||
/// <summary>Name of partition scheme that contains this partition</summary>
|
/// <summary>Name of partition scheme that contains this partition</summary>
|
||||||
public string Scheme;
|
public string Scheme;
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ namespace Aaru.CommonTypes
|
|||||||
End > other.End)
|
End > other.End)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
return-1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define the equality operator.
|
// Define the equality operator.
|
||||||
|
|||||||
@@ -84,54 +84,54 @@ namespace Aaru.CommonTypes
|
|||||||
{
|
{
|
||||||
foreach(Type type in pluginRegister.GetAllChecksumPlugins() ?? Enumerable.Empty<Type>())
|
foreach(Type type in pluginRegister.GetAllChecksumPlugins() ?? Enumerable.Empty<Type>())
|
||||||
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
||||||
{ }) is IChecksum plugin)
|
{}) is IChecksum plugin)
|
||||||
Checksums.Add(plugin);
|
Checksums.Add(plugin);
|
||||||
|
|
||||||
foreach(Type type in pluginRegister.GetAllFilesystemPlugins() ?? Enumerable.Empty<Type>())
|
foreach(Type type in pluginRegister.GetAllFilesystemPlugins() ?? Enumerable.Empty<Type>())
|
||||||
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
||||||
{ }) is IFilesystem plugin &&
|
{}) is IFilesystem plugin &&
|
||||||
!PluginsList.ContainsKey(plugin.Name.ToLower()))
|
!PluginsList.ContainsKey(plugin.Name.ToLower()))
|
||||||
PluginsList.Add(plugin.Name.ToLower(), plugin);
|
PluginsList.Add(plugin.Name.ToLower(), plugin);
|
||||||
|
|
||||||
foreach(Type type in pluginRegister.GetAllFilterPlugins() ?? Enumerable.Empty<Type>())
|
foreach(Type type in pluginRegister.GetAllFilterPlugins() ?? Enumerable.Empty<Type>())
|
||||||
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
||||||
{ }) is IFilter plugin &&
|
{}) is IFilter plugin &&
|
||||||
!Filters.ContainsKey(plugin.Name.ToLower()))
|
!Filters.ContainsKey(plugin.Name.ToLower()))
|
||||||
Filters.Add(plugin.Name.ToLower(), plugin);
|
Filters.Add(plugin.Name.ToLower(), plugin);
|
||||||
|
|
||||||
foreach(Type type in pluginRegister.GetAllFloppyImagePlugins() ?? Enumerable.Empty<Type>())
|
foreach(Type type in pluginRegister.GetAllFloppyImagePlugins() ?? Enumerable.Empty<Type>())
|
||||||
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
||||||
{ }) is IFloppyImage plugin &&
|
{}) is IFloppyImage plugin &&
|
||||||
!FloppyImages.ContainsKey(plugin.Name.ToLower()))
|
!FloppyImages.ContainsKey(plugin.Name.ToLower()))
|
||||||
FloppyImages.Add(plugin.Name.ToLower(), plugin);
|
FloppyImages.Add(plugin.Name.ToLower(), plugin);
|
||||||
|
|
||||||
foreach(Type type in pluginRegister.GetAllMediaImagePlugins() ?? Enumerable.Empty<Type>())
|
foreach(Type type in pluginRegister.GetAllMediaImagePlugins() ?? Enumerable.Empty<Type>())
|
||||||
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
||||||
{ }) is IMediaImage plugin &&
|
{}) is IMediaImage plugin &&
|
||||||
!ImagePluginsList.ContainsKey(plugin.Name.ToLower()))
|
!ImagePluginsList.ContainsKey(plugin.Name.ToLower()))
|
||||||
ImagePluginsList.Add(plugin.Name.ToLower(), plugin);
|
ImagePluginsList.Add(plugin.Name.ToLower(), plugin);
|
||||||
|
|
||||||
foreach(Type type in pluginRegister.GetAllPartitionPlugins() ?? Enumerable.Empty<Type>())
|
foreach(Type type in pluginRegister.GetAllPartitionPlugins() ?? Enumerable.Empty<Type>())
|
||||||
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
||||||
{ }) is IPartition plugin &&
|
{}) is IPartition plugin &&
|
||||||
!PartPluginsList.ContainsKey(plugin.Name.ToLower()))
|
!PartPluginsList.ContainsKey(plugin.Name.ToLower()))
|
||||||
PartPluginsList.Add(plugin.Name.ToLower(), plugin);
|
PartPluginsList.Add(plugin.Name.ToLower(), plugin);
|
||||||
|
|
||||||
foreach(Type type in pluginRegister.GetAllReadOnlyFilesystemPlugins() ?? Enumerable.Empty<Type>())
|
foreach(Type type in pluginRegister.GetAllReadOnlyFilesystemPlugins() ?? Enumerable.Empty<Type>())
|
||||||
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
||||||
{ }) is IReadOnlyFilesystem plugin &&
|
{}) is IReadOnlyFilesystem plugin &&
|
||||||
!ReadOnlyFilesystems.ContainsKey(plugin.Name.ToLower()))
|
!ReadOnlyFilesystems.ContainsKey(plugin.Name.ToLower()))
|
||||||
ReadOnlyFilesystems.Add(plugin.Name.ToLower(), plugin);
|
ReadOnlyFilesystems.Add(plugin.Name.ToLower(), plugin);
|
||||||
|
|
||||||
foreach(Type type in pluginRegister.GetAllWritableFloppyImagePlugins() ?? Enumerable.Empty<Type>())
|
foreach(Type type in pluginRegister.GetAllWritableFloppyImagePlugins() ?? Enumerable.Empty<Type>())
|
||||||
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
||||||
{ }) is IWritableFloppyImage plugin &&
|
{}) is IWritableFloppyImage plugin &&
|
||||||
!WritableFloppyImages.ContainsKey(plugin.Name.ToLower()))
|
!WritableFloppyImages.ContainsKey(plugin.Name.ToLower()))
|
||||||
WritableFloppyImages.Add(plugin.Name.ToLower(), plugin);
|
WritableFloppyImages.Add(plugin.Name.ToLower(), plugin);
|
||||||
|
|
||||||
foreach(Type type in pluginRegister.GetAllWritableImagePlugins() ?? Enumerable.Empty<Type>())
|
foreach(Type type in pluginRegister.GetAllWritableImagePlugins() ?? Enumerable.Empty<Type>())
|
||||||
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[]
|
||||||
{ }) is IWritableImage plugin &&
|
{}) is IWritableImage plugin &&
|
||||||
!WritableImages.ContainsKey(plugin.Name.ToLower()))
|
!WritableImages.ContainsKey(plugin.Name.ToLower()))
|
||||||
WritableImages.Add(plugin.Name.ToLower(), plugin);
|
WritableImages.Add(plugin.Name.ToLower(), plugin);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -917,7 +917,7 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA
|
|||||||
if(IdentifyDeviceResponse.Length != 512)
|
if(IdentifyDeviceResponse.Length != 512)
|
||||||
{
|
{
|
||||||
AaruConsole.DebugWriteLine("ATA/ATAPI IDENTIFY decoder",
|
AaruConsole.DebugWriteLine("ATA/ATAPI IDENTIFY decoder",
|
||||||
"IDENTIFY response is different than 512 bytes, not decoding.");
|
"IDENTIFY response is different than 512 bytes, not decoding.");
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,8 +223,8 @@ namespace Aaru.CommonTypes.Structs.Devices.SCSI
|
|||||||
SCSIInquiryResponse.Length != 5)
|
SCSIInquiryResponse.Length != 5)
|
||||||
{
|
{
|
||||||
AaruConsole.DebugWriteLine("SCSI INQUIRY decoder",
|
AaruConsole.DebugWriteLine("SCSI INQUIRY decoder",
|
||||||
"INQUIRY response is {0} bytes, less than minimum of 36 bytes, decoded data can be incorrect, not decoding.",
|
"INQUIRY response is {0} bytes, less than minimum of 36 bytes, decoded data can be incorrect, not decoding.",
|
||||||
SCSIInquiryResponse.Length);
|
SCSIInquiryResponse.Length);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -233,8 +233,8 @@ namespace Aaru.CommonTypes.Structs.Devices.SCSI
|
|||||||
SCSIInquiryResponse.Length != SCSIInquiryResponse[4])
|
SCSIInquiryResponse.Length != SCSIInquiryResponse[4])
|
||||||
{
|
{
|
||||||
AaruConsole.DebugWriteLine("SCSI INQUIRY decoder",
|
AaruConsole.DebugWriteLine("SCSI INQUIRY decoder",
|
||||||
"INQUIRY response length ({0} bytes) is different than specified in length field ({1} bytes), decoded data can be incorrect, not decoding.",
|
"INQUIRY response length ({0} bytes) is different than specified in length field ({1} bytes), decoded data can be incorrect, not decoding.",
|
||||||
SCSIInquiryResponse.Length, SCSIInquiryResponse[4] + 4);
|
SCSIInquiryResponse.Length, SCSIInquiryResponse[4] + 4);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,63 +47,106 @@ namespace Aaru.CommonTypes.Structs
|
|||||||
public enum FileAttributes : ulong
|
public enum FileAttributes : ulong
|
||||||
{
|
{
|
||||||
/// <summary>File has no attributes</summary>
|
/// <summary>File has no attributes</summary>
|
||||||
None = 0, /// <summary>File is an alias (Mac OS)</summary>
|
None = 0,
|
||||||
Alias = 0x01, /// <summary>Indicates that the file can only be writable appended</summary>
|
/// <summary>File is an alias (Mac OS)</summary>
|
||||||
AppendOnly = 0x02, /// <summary>File is candidate for archival/backup</summary>
|
Alias = 0x01,
|
||||||
Archive = 0x04, /// <summary>File is a block device</summary>
|
/// <summary>Indicates that the file can only be writable appended</summary>
|
||||||
BlockDevice = 0x08, /// <summary>File is stored on filesystem block units instead of device sectors</summary>
|
AppendOnly = 0x02,
|
||||||
BlockUnits = 0x10, /// <summary>Directory is a bundle or file contains a BNDL resource</summary>
|
/// <summary>File is candidate for archival/backup</summary>
|
||||||
Bundle = 0x20, /// <summary>File is a char device</summary>
|
Archive = 0x04,
|
||||||
CharDevice = 0x40, /// <summary>File is compressed</summary>
|
/// <summary>File is a block device</summary>
|
||||||
Compressed = 0x80, /// <summary>File is compressed and should not be uncompressed on read</summary>
|
BlockDevice = 0x08,
|
||||||
CompressedRaw = 0x100, /// <summary>File has compression errors</summary>
|
/// <summary>File is stored on filesystem block units instead of device sectors</summary>
|
||||||
CompressionError = 0x200, /// <summary>Compressed file is dirty</summary>
|
BlockUnits = 0x10,
|
||||||
CompressionDirty = 0x400, /// <summary>File is a device</summary>
|
/// <summary>Directory is a bundle or file contains a BNDL resource</summary>
|
||||||
Device = 0x800, /// <summary>File is a directory</summary>
|
Bundle = 0x20,
|
||||||
Directory = 0x1000, /// <summary>File is encrypted</summary>
|
/// <summary>File is a char device</summary>
|
||||||
Encrypted = 0x2000, /// <summary>File is stored on disk using extents</summary>
|
CharDevice = 0x40,
|
||||||
Extents = 0x4000, /// <summary>File is a FIFO</summary>
|
/// <summary>File is compressed</summary>
|
||||||
FIFO = 0x8000, /// <summary>File is a normal file</summary>
|
Compressed = 0x80,
|
||||||
|
/// <summary>File is compressed and should not be uncompressed on read</summary>
|
||||||
|
CompressedRaw = 0x100,
|
||||||
|
/// <summary>File has compression errors</summary>
|
||||||
|
CompressionError = 0x200,
|
||||||
|
/// <summary>Compressed file is dirty</summary>
|
||||||
|
CompressionDirty = 0x400,
|
||||||
|
/// <summary>File is a device</summary>
|
||||||
|
Device = 0x800,
|
||||||
|
/// <summary>File is a directory</summary>
|
||||||
|
Directory = 0x1000,
|
||||||
|
/// <summary>File is encrypted</summary>
|
||||||
|
Encrypted = 0x2000,
|
||||||
|
/// <summary>File is stored on disk using extents</summary>
|
||||||
|
Extents = 0x4000,
|
||||||
|
/// <summary>File is a FIFO</summary>
|
||||||
|
FIFO = 0x8000,
|
||||||
|
/// <summary>File is a normal file</summary>
|
||||||
File = 0x10000,
|
File = 0x10000,
|
||||||
/// <summary>File is a Mac OS file containing desktop databases that has already been added to the desktop database</summary>
|
/// <summary>File is a Mac OS file containing desktop databases that has already been added to the desktop database</summary>
|
||||||
HasBeenInited = 0x20000, /// <summary>File contains an icon resource / EA</summary>
|
HasBeenInited = 0x20000,
|
||||||
|
/// <summary>File contains an icon resource / EA</summary>
|
||||||
HasCustomIcon = 0x40000,
|
HasCustomIcon = 0x40000,
|
||||||
/// <summary>File is a Mac OS extension or control panel lacking INIT resources</summary>
|
/// <summary>File is a Mac OS extension or control panel lacking INIT resources</summary>
|
||||||
HasNoINITs = 0x80000, /// <summary>File is hidden/invisible</summary>
|
HasNoINITs = 0x80000,
|
||||||
Hidden = 0x100000, /// <summary>File cannot be written, deleted, modified or linked to</summary>
|
/// <summary>File is hidden/invisible</summary>
|
||||||
Immutable = 0x200000, /// <summary>Directory is indexed using hashed trees</summary>
|
Hidden = 0x100000,
|
||||||
IndexedDirectory = 0x400000, /// <summary>File contents are stored alongside its inode (or equivalent)</summary>
|
/// <summary>File cannot be written, deleted, modified or linked to</summary>
|
||||||
Inline = 0x800000, /// <summary>File contains integrity checks</summary>
|
Immutable = 0x200000,
|
||||||
IntegrityStream = 0x1000000, /// <summary>File is on desktop</summary>
|
/// <summary>Directory is indexed using hashed trees</summary>
|
||||||
|
IndexedDirectory = 0x400000,
|
||||||
|
/// <summary>File contents are stored alongside its inode (or equivalent)</summary>
|
||||||
|
Inline = 0x800000,
|
||||||
|
/// <summary>File contains integrity checks</summary>
|
||||||
|
IntegrityStream = 0x1000000,
|
||||||
|
/// <summary>File is on desktop</summary>
|
||||||
IsOnDesk = 0x2000000,
|
IsOnDesk = 0x2000000,
|
||||||
/// <summary>File changes are written to filesystem journal before being written to file itself</summary>
|
/// <summary>File changes are written to filesystem journal before being written to file itself</summary>
|
||||||
Journaled = 0x4000000, /// <summary>Access time will not be modified</summary>
|
Journaled = 0x4000000,
|
||||||
NoAccessTime = 0x8000000, /// <summary>File will not be subject to copy-on-write</summary>
|
/// <summary>Access time will not be modified</summary>
|
||||||
NoCopyOnWrite = 0x10000000, /// <summary>File will not be backed up</summary>
|
NoAccessTime = 0x8000000,
|
||||||
NoDump = 0x20000000, /// <summary>File contents should not be scrubbed</summary>
|
/// <summary>File will not be subject to copy-on-write</summary>
|
||||||
NoScrub = 0x40000000, /// <summary>File contents should not be indexed</summary>
|
NoCopyOnWrite = 0x10000000,
|
||||||
NotIndexed = 0x80000000, /// <summary>File is offline</summary>
|
/// <summary>File will not be backed up</summary>
|
||||||
Offline = 0x100000000, /// <summary>File is password protected, but contents are not encrypted on disk</summary>
|
NoDump = 0x20000000,
|
||||||
Password = 0x200000000, /// <summary>File is read-only</summary>
|
/// <summary>File contents should not be scrubbed</summary>
|
||||||
ReadOnly = 0x400000000, /// <summary>File is a reparse point</summary>
|
NoScrub = 0x40000000,
|
||||||
|
/// <summary>File contents should not be indexed</summary>
|
||||||
|
NotIndexed = 0x80000000,
|
||||||
|
/// <summary>File is offline</summary>
|
||||||
|
Offline = 0x100000000,
|
||||||
|
/// <summary>File is password protected, but contents are not encrypted on disk</summary>
|
||||||
|
Password = 0x200000000,
|
||||||
|
/// <summary>File is read-only</summary>
|
||||||
|
ReadOnly = 0x400000000,
|
||||||
|
/// <summary>File is a reparse point</summary>
|
||||||
ReparsePoint = 0x800000000,
|
ReparsePoint = 0x800000000,
|
||||||
/// <summary>When file is removed its content will be overwritten with zeroes</summary>
|
/// <summary>When file is removed its content will be overwritten with zeroes</summary>
|
||||||
Secured = 0x1000000000, /// <summary>File contents are sparse</summary>
|
Secured = 0x1000000000,
|
||||||
Sparse = 0x2000000000, /// <summary>File is a shadow (OS/2)</summary>
|
/// <summary>File contents are sparse</summary>
|
||||||
Shadow = 0x4000000000, /// <summary>File is shared</summary>
|
Sparse = 0x2000000000,
|
||||||
Shared = 0x8000000000, /// <summary>File is a stationery</summary>
|
/// <summary>File is a shadow (OS/2)</summary>
|
||||||
Stationery = 0x10000000000, /// <summary>File is a symbolic link</summary>
|
Shadow = 0x4000000000,
|
||||||
Symlink = 0x20000000000, /// <summary>File writes are synchronously written to disk</summary>
|
/// <summary>File is shared</summary>
|
||||||
Sync = 0x40000000000, /// <summary>File belongs to the operating system</summary>
|
Shared = 0x8000000000,
|
||||||
|
/// <summary>File is a stationery</summary>
|
||||||
|
Stationery = 0x10000000000,
|
||||||
|
/// <summary>File is a symbolic link</summary>
|
||||||
|
Symlink = 0x20000000000,
|
||||||
|
/// <summary>File writes are synchronously written to disk</summary>
|
||||||
|
Sync = 0x40000000000,
|
||||||
|
/// <summary>File belongs to the operating system</summary>
|
||||||
System = 0x80000000000,
|
System = 0x80000000000,
|
||||||
/// <summary>If file end is a partial block its content will be merged with other files</summary>
|
/// <summary>If file end is a partial block its content will be merged with other files</summary>
|
||||||
TailMerged = 0x100000000000, /// <summary>File is temporary</summary>
|
TailMerged = 0x100000000000,
|
||||||
|
/// <summary>File is temporary</summary>
|
||||||
Temporary = 0x200000000000,
|
Temporary = 0x200000000000,
|
||||||
/// <summary>Subdirectories inside of this directory are not related and should be allocated elsewhere</summary>
|
/// <summary>Subdirectories inside of this directory are not related and should be allocated elsewhere</summary>
|
||||||
TopDirectory = 0x400000000000,
|
TopDirectory = 0x400000000000,
|
||||||
/// <summary>If file is deleted, contents should be stored, for a possible future undeletion</summary>
|
/// <summary>If file is deleted, contents should be stored, for a possible future undeletion</summary>
|
||||||
Undeletable = 0x800000000000, /// <summary>File is a pipe</summary>
|
Undeletable = 0x800000000000,
|
||||||
Pipe = 0x1000000000000, /// <summary>File is a socket</summary>
|
/// <summary>File is a pipe</summary>
|
||||||
|
Pipe = 0x1000000000000,
|
||||||
|
/// <summary>File is a socket</summary>
|
||||||
Socket = 0x2000000000000
|
Socket = 0x2000000000000
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -223,36 +266,66 @@ namespace Aaru.CommonTypes.Structs
|
|||||||
public enum Errno
|
public enum Errno
|
||||||
{
|
{
|
||||||
/// <summary>No error happened</summary>
|
/// <summary>No error happened</summary>
|
||||||
NoError = 0, /// <summary>Access denied</summary>
|
NoError = 0,
|
||||||
AccessDenied = -13, /// <summary>Busy, cannot complete</summary>
|
/// <summary>Access denied</summary>
|
||||||
Busy = -16, /// <summary>File is too large</summary>
|
AccessDenied = -13,
|
||||||
FileTooLarge = -27, /// <summary>Invalid argument</summary>
|
/// <summary>Busy, cannot complete</summary>
|
||||||
InvalidArgument = -22, /// <summary>I/O error</summary>
|
Busy = -16,
|
||||||
InOutError = -5, /// <summary>Is a directory (e.g.: trying to Read() a dir)</summary>
|
/// <summary>File is too large</summary>
|
||||||
IsDirectory = -21, /// <summary>Name is too long</summary>
|
FileTooLarge = -27,
|
||||||
NameTooLong = -36, /// <summary>There is no data available</summary>
|
/// <summary>Invalid argument</summary>
|
||||||
NoData = 61, /// <summary>There is no such attribute</summary>
|
InvalidArgument = -22,
|
||||||
NoSuchExtendedAttribute = NoData, /// <summary>No such device</summary>
|
/// <summary>I/O error</summary>
|
||||||
NoSuchDevice = -19, /// <summary>No such file or directory</summary>
|
InOutError = -5,
|
||||||
NoSuchFile = -2, /// <summary>Is not a directory (e.g.: trying to ReadDir() a file)</summary>
|
/// <summary>Is a directory (e.g.: trying to Read() a dir)</summary>
|
||||||
NotDirectory = -20, /// <summary>Not implemented</summary>
|
IsDirectory = -21,
|
||||||
NotImplemented = -38, /// <summary>Not supported</summary>
|
/// <summary>Name is too long</summary>
|
||||||
NotSupported = -252, /// <summary>Link is severed</summary>
|
NameTooLong = -36,
|
||||||
SeveredLink = -67, /// <summary>Access denied</summary>
|
/// <summary>There is no data available</summary>
|
||||||
EACCES = AccessDenied, /// <summary>Busy, cannot complete</summary>
|
NoData = 61,
|
||||||
EBUSY = Busy, /// <summary>File is too large</summary>
|
/// <summary>There is no such attribute</summary>
|
||||||
EFBIG = FileTooLarge, /// <summary>Invalid argument</summary>
|
NoSuchExtendedAttribute = NoData,
|
||||||
EINVAL = InvalidArgument, /// <summary>I/O error</summary>
|
/// <summary>No such device</summary>
|
||||||
EIO = InOutError, /// <summary>Is a directory (e.g.: trying to Read() a dir)</summary>
|
NoSuchDevice = -19,
|
||||||
EISDIR = IsDirectory, /// <summary>Name is too long</summary>
|
/// <summary>No such file or directory</summary>
|
||||||
ENAMETOOLONG = NameTooLong, /// <summary>There is no such attribute</summary>
|
NoSuchFile = -2,
|
||||||
ENOATTR = NoSuchExtendedAttribute, /// <summary>There is no data available</summary>
|
/// <summary>Is not a directory (e.g.: trying to ReadDir() a file)</summary>
|
||||||
ENODATA = NoData, /// <summary>No such device</summary>
|
NotDirectory = -20,
|
||||||
ENODEV = NoSuchDevice, /// <summary>No such file or directory</summary>
|
/// <summary>Not implemented</summary>
|
||||||
ENOENT = NoSuchFile, /// <summary>Link is severed</summary>
|
NotImplemented = -38,
|
||||||
ENOLINK = SeveredLink, /// <summary>Not implemented</summary>
|
/// <summary>Not supported</summary>
|
||||||
ENOSYS = NotImplemented, /// <summary>Is not a directory (e.g.: trying to ReadDir() a file)</summary>
|
NotSupported = -252,
|
||||||
ENOTDIR = NotDirectory, /// <summary>Not supported</summary>
|
/// <summary>Link is severed</summary>
|
||||||
|
SeveredLink = -67,
|
||||||
|
/// <summary>Access denied</summary>
|
||||||
|
EACCES = AccessDenied,
|
||||||
|
/// <summary>Busy, cannot complete</summary>
|
||||||
|
EBUSY = Busy,
|
||||||
|
/// <summary>File is too large</summary>
|
||||||
|
EFBIG = FileTooLarge,
|
||||||
|
/// <summary>Invalid argument</summary>
|
||||||
|
EINVAL = InvalidArgument,
|
||||||
|
/// <summary>I/O error</summary>
|
||||||
|
EIO = InOutError,
|
||||||
|
/// <summary>Is a directory (e.g.: trying to Read() a dir)</summary>
|
||||||
|
EISDIR = IsDirectory,
|
||||||
|
/// <summary>Name is too long</summary>
|
||||||
|
ENAMETOOLONG = NameTooLong,
|
||||||
|
/// <summary>There is no such attribute</summary>
|
||||||
|
ENOATTR = NoSuchExtendedAttribute,
|
||||||
|
/// <summary>There is no data available</summary>
|
||||||
|
ENODATA = NoData,
|
||||||
|
/// <summary>No such device</summary>
|
||||||
|
ENODEV = NoSuchDevice,
|
||||||
|
/// <summary>No such file or directory</summary>
|
||||||
|
ENOENT = NoSuchFile,
|
||||||
|
/// <summary>Link is severed</summary>
|
||||||
|
ENOLINK = SeveredLink,
|
||||||
|
/// <summary>Not implemented</summary>
|
||||||
|
ENOSYS = NotImplemented,
|
||||||
|
/// <summary>Is not a directory (e.g.: trying to ReadDir() a file)</summary>
|
||||||
|
ENOTDIR = NotDirectory,
|
||||||
|
/// <summary>Not supported</summary>
|
||||||
ENOTSUP = NotSupported
|
ENOTSUP = NotSupported
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user