// // BwgBurn - CD-R/CD-RW/DVD-R/DVD-RW burning program for Windows XP // // Copyright (C) 2006 by Jack W. Griffin (butchg@comcast.net) // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License // for more details. // // You should have received a copy of the GNU General Public License along // with this program; if not, write to the // // Free Software Foundation, Inc., // 59 Temple Place, Suite 330, // Boston, MA 02111-1307 USA // using System; using System.Collections.Generic; using System.Text; namespace Bwg.Scsi { /// /// This class represents subheader data for a given sector /// public class SubheaderData : Result { #region public types /// /// The submode type /// [Flags] public enum SubmodeType : byte { /// /// See SCSI MMC spec /// EndOfFile = 0x80, /// /// See SCSI MMC spec /// RealTimeBlock = 0x40, /// /// See SCSI MMC spec /// Form2 = 0x20, /// /// See SCSI MMC spec /// TriggerBlock = 0x10, /// /// See SCSI MMC spec /// DataBlock = 0x08, /// /// See SCSI MMC spec /// AudioBlock = 0x04, // Not traditional CD-DA /// /// See SCSI MMC spec /// VideoBlock = 0x02, /// /// See SCSI MMC spec /// EndOfRecord = 0x01 } ; #endregion #region public data members /// /// File number, see SCSI MMC spec /// public readonly byte FileNumber; /// /// Channel number, see SCSI MMC spec /// public readonly byte ChannelNumber; /// /// Submode, see SCSI MMC spec /// public readonly SubmodeType Submode; /// /// Coding information, see SCSI MMC spec /// public readonly byte CodingInformation; #endregion /// /// Create subheader data information from subheader data read /// /// the buffer containing the subheader data /// the size of the data public SubheaderData(IntPtr buf, int size) : base(buf, size) { FileNumber = Get8(0); ChannelNumber = Get8(1); Submode = (SubmodeType)Get8(2); CodingInformation = Get8(3); } } }