### IMMAudioCDContents

  The IMMAudioCDContents class is the class for an audio CD's table of contents. It allows you to keep a list of tracks. With this list you can rearrange the playback order of the tracks. For example, you could put track 5 at the first location, track 7 next, and then track 1.

### IMMAudioCDContents - Member Functions and Data by Group

### Constructors & Destructor

You can construct, copy, and destruct objects of this class.

~IMMAudioCDContents

      public:
      virtual ~IMMAudioCDContents()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

IMMAudioCDContents

  Use this function to create an IMMAudioCDContents.

  Overload 1

      public:
      IMMAudioCDContents(const IMMAudioCDContents& newToc)

  You cannot create your own table of contents without asking for one from the IMMAudioCD class.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

  Overload 2

      protected:
      IMMAudioCDContents( void* newContents,
                          const IString& identifier,
                          unsigned long tracks )

  This function takes the following parameters:

  newContents
    A pointer to a list of table of contents structures created by the operating system.
  identifier
    The unique disc identifier generated by IMMAudioCD.
  tracks
    The number of tracks to be in the playback list for the table of contents. IMMAudioCDContents creates a default playback list for the tracks.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

  Overload 3

      protected:
      IMMAudioCDContents()

  This creates an invalid table of contents.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

operator =

      public:
      IMMAudioCDContents&
        operator =( const IMMAudioCDContents& newContents )

  Sets the contents to be the same as another table of contents.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Entry Information

Use these members to add, remove, and replace the track numbers in the table of contents. For example, you want to listen to all of the CD except track 2 and you want to listen to track 5 played twice. To do this, you create a cursor on the table of contents. Then, you move the cursor to track 2 and call the remove entry function. Next, you move the cursor to track 5 and call the add entry function with 5 for the track number.

addEntryAsFirst

      public:
      IMMAudioCDContents&
        addEntryAsFirst( unsigned long trackNumber )

  Adds the track number to the beginning of the playback list.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

addEntryAsNext

      public:
      IMMAudioCDContents&
        addEntryAsNext( unsigned long trackNumber,
                        const Cursor& cursor )

  Adds the track number after the cursor in the playback list.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

numberOfEntries

      public:
      unsigned long numberOfEntries() const

  Returns the number of tracks in the playback list.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

removeEntryAt

      public:
      IMMAudioCDContents& removeEntryAt(const Cursor& cursor)

  Removes the track number at the cursor from the playback list.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

replaceEntryAt

      public:
      IMMAudioCDContents&
        replaceEntryAt( unsigned long newTrackNumber,
                        const Cursor& cursor )

  Replaces the track number at the cursor.

Exception

  IInvalidParameter | The new track number can not be less than 1 or greater than the number of tracks.
  IInvalidParameter | The passed in cursor or this object is not valid.
  IInvalidRequest | An internal processing error occurred with the stored list of tracks.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Track Information

Use these members to query information about the entry at the given cursor for this table of contents.

controlInformation

      public:
      unsigned long
        controlInformation( const Cursor& cursor ) const

  Returns the track control information at the given cursor. This value cannot be set because it is set by the manufacturer of the CD.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

country

      public:
      unsigned long country(const Cursor& cursor) const

  Returns the country at the given cursor. This value cannot be set because it is set by the manufacturer of the CD.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

discId

      public:
      IString discId() const

  Returns the compact disc identifier.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

endOfTrack

      public:
      IMMTime endOfTrack(const Cursor& cursor) const

  Returns the ending time (position) of the track.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

isValid

      public:
      bool isValid() const

  Returns true if the table of contents is valid.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

numberOfTracks

      public:
      unsigned long numberOfTracks() const

  Returns the number of tracks.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

owner

      public:
      unsigned long owner(const Cursor& cursor) const

  Returns the owner of the track at the given cursor. This value cannot be set because it is set by the manufacturer of the CD.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

serialNumber

      public:
      unsigned long serialNumber(const Cursor& cursor) const

  Returns the serial number of the track at the given cursor. This value cannot be set because it is set by the manufacturer of the CD.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

startOfTrack

      public:
      IMMTime startOfTrack(const Cursor& cursor) const

  Returns the starting time (position) of the track.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

track

      public:
      unsigned long track(const Cursor& cursor) const

  Returns the track number at the given cursor.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### IMMAudioCDContents - Inherited Member Functions and Data

#### Inherited Public Functions

  - None

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  - None

#### Inherited Protected Data

  - None