using SabreTools.Numerics;
namespace SabreTools.Data.Models.ISO9660
{
///
/// ISO9660 Extended Attribute Record
///
///
public sealed class ExtendedAttributeRecord
{
///
/// Owner ID number for this file
/// 0x0000 if no owner, implies 0x0000 Group ID
///
public BothInt16 OwnerIdentification { get; set; } = 0;
///
/// Group ID number for the owner of this file
/// 0x0000 if no group, implies 0x0000 Owner ID
///
public BothInt16 GroupIdentification { get; set; } = 0;
///
/// 16-bit flag variable with 8 flags where every other bit is set to 1
/// i.e. minimum value of 0b1010101010101010 (0xAAAA)
///
public Permissions Permissions { get; set; }
///
/// Datetime of when the file content was created
///
public DecDateTime FileCreationDateTime { get; set; } = new();
///
/// Datetime of when the file content was last modified
///
public DecDateTime FileModificationDateTime { get; set; } = new();
///
/// Datetime of when the file content expires
///
public DecDateTime FileExpirationDateTime { get; set; } = new();
///
/// Datetime of when the file content is effective from
///
public DecDateTime FileEffectiveDateTime { get; set; } = new();
///
/// Record format type
///
public RecordFormat RecordFormat { get; set; }
///
/// Record attributes
/// Note: If RecordType is zero, this field is ignored by readers
///
public RecordAttributes RecordAttributes { get; set; }
///
/// Record Length
/// If RecordType is 0, this field is 0
/// If RecordType is 1, this field is length in bytes
/// If RecordType is 2 or 3, this field is maximum length in bytes of a record in the file
///
public BothInt16 RecordLength { get; set; } = 0;
///
/// 32-byte name of the intended system
/// Primary: a-characters or a1-characters only, padded to the right with spaces
///
public byte[] SystemIdentifier { get; set; } = new byte[32];
///
/// 64-bytes for system use
///
public byte[] SystemUse { get; set; } = new byte[64];
///
/// Extended Attribyte Record Version
/// ISO9660 sets this to 0x01
///
public byte ExtendedAttributeRecordVersion { get; set; }
///
/// Length of the escape sequences field
///
public byte EscapeSequencesLength { get; set; }
///
/// 64-bytes reserved (0x00)
///
public byte[] Reserved64Bytes { get; set; } = new byte[64];
///
/// Length of the Application use field
///
public BothInt16 ApplicationLength { get; set; } = 0;
///
/// ApplicationLength-bytes for application use
///
public byte[] ApplicationUse { get; set; } = [];
///
/// EscapeSequencesLength-bytes list of escape sequences to interpret this file
/// Optional, and if present, padded to the right with 0x00
///
public byte[] EscapeSequences { get; set; } = [];
}
}