netmd++  1.0.4
C++ API to access NetMD devices
netmd::CNetMdTOC Class Reference

This class describes a net md TOC. More...

#include <netmd++.h>

Classes

struct  DAOFragment
 a fragment used in DAO track More...
 

Public Types

using DAOFragments = std::vector< DAOFragment >
 type to store all DAO track fragments (for fragmented, non empty discs)
 

Public Member Functions

 CNetMdTOC (int trackCount=0, uint32_t lenInMs=0, uint8_t *data=nullptr)
 Constructs a new instance. More...
 
 ~CNetMdTOC ()
 Destroys the object.
 
void import (int trackCount=0, uint32_t lenInMs=0, uint8_t *data=nullptr)
 import TOC data More...
 
int addTrack (uint8_t no, uint32_t lengthMs, const std::string &title, const std::time_t &tstamp, bool mono=false)
 Adds a track. More...
 
int setDiscTitle (const std::string &title)
 Sets the disc title. More...
 
int trackCount () const
 get track count More...
 
std::string discTitle () const
 get MD title More...
 
std::string trackTitle (int trackNo) const
 get track title More...
 
std::string trackInfo (int trackNo) const
 get track info More...
 
std::string discInfo () const
 get disc info More...
 

Detailed Description

This class describes a net md TOC.

Constructor & Destructor Documentation

◆ CNetMdTOC()

netmd::CNetMdTOC::CNetMdTOC ( int  trackCount = 0,
uint32_t  lenInMs = 0,
uint8_t *  data = nullptr 
)

Constructs a new instance.

Parameters
[in]trackCountThe track count
[in]lenInMsThe length in milliseconds
dataThe TOC data

Member Function Documentation

◆ addTrack()

int netmd::CNetMdTOC::addTrack ( uint8_t  no,
uint32_t  lengthMs,
const std::string &  title,
const std::time_t &  tstamp,
bool  mono = false 
)

Adds a track.

This function has to be used to split a DAO transferred disc audio track into the parts as on the original disc. This functions has to be called for all tracks in their correct order! Breaking the order will break the TOC!

Parameters
[in]notrack number (starting with 1)
[in]lengthMsThe length in milliseconds
[in]titleThe track title
[in]tstampThe time stamp
[in]monoThe mono marker
Returns
0 -> ok; -1 -> error

◆ discInfo()

std::string netmd::CNetMdTOC::discInfo ( ) const

get disc info

Returns
disc info

◆ discTitle()

std::string netmd::CNetMdTOC::discTitle ( ) const

get MD title

Returns
title

◆ import()

void netmd::CNetMdTOC::import ( int  trackCount = 0,
uint32_t  lenInMs = 0,
uint8_t *  data = nullptr 
)

import TOC data

Parameters
[in]trackCountThe track count
[in]lenInMsThe length in milliseconds
dataThe TOC data

◆ setDiscTitle()

int netmd::CNetMdTOC::setDiscTitle ( const std::string &  title)

Sets the disc title.

Parameters
[in]titleThe title
Returns
0 -> ok; -1 -> error

◆ trackCount()

int netmd::CNetMdTOC::trackCount ( ) const

get track count

Returns
number of tracks

◆ trackInfo()

std::string netmd::CNetMdTOC::trackInfo ( int  trackNo) const

get track info

Parameters
[in]trackNoThe track number
Returns
track info

◆ trackTitle()

std::string netmd::CNetMdTOC::trackTitle ( int  trackNo) const

get track title

Parameters
[in]trackNoThe track number
Returns
title

The documentation for this class was generated from the following file: