2 * Copyright 2003-2011, Haiku, Inc.
3 * Distributed under the terms of the MIT license.
6 * Tyler Akidau, haiku@akidau.net
18 #include <ByteOrder.h>
19 #include <KernelExport.h>
30 /*! \brief A class that encapsulates a complete, parsed, and error
31 checked table of contents for a CD-ROM.
39 Session
* GetSession(int32 index
);
43 // CDs and DVDs are required to have a block size of 2K by
44 // the SCSI-3 standard
45 static const int kBlockSize
= 2048;
48 uint32
_AdjustForYellowBook(
49 cdrom_full_table_of_contents_entry
52 status_t
_ParseTableOfContents(
53 cdrom_full_table_of_contents_entry
56 void _SortAndRemoveDuplicates();
57 status_t
_CheckForErrorsAndWarnings();
65 /*! \brief Encapsulates the pertinent information for a given session
72 off_t
Offset() { return fOffset
; }
73 off_t
Size() { return fSize
; }
74 uint32
BlockSize() { return fBlockSize
; }
75 int32
Index() { return fIndex
; }
76 uint32
Flags() { return fFlags
; }
77 const char* Type() { return fType
; }
82 Session(off_t offset
, off_t size
,
83 uint32 blockSize
, int32 index
, uint32 flags
,
86 Session(const Session
& other
);
88 Session
& operator=(const Session
& other
);