itunesdb::Track Class Reference

#include <track.h>

Inheritance diagram for itunesdb::Track:

itunesdb::ListItem ITunesDBTrack List of all members.

Public Member Functions

 Track (Q_UINT32 trackID=0)
Q_UINT32 getID () const
const QString & getAlbum () const
const QString & getArtist () const
QString getPlainArtistName () const
const QString & getCategory () const
const QString & getComment () const
const QString & getTitle () const
const QString & getGenre () const
const QString & getPathInfo () const
const QString & getComposer () const
const QString & getEqualizerSetting () const
const QString & getDescription () const
const QString & getGrouping () const
const QString & getFileFormatDesc () const
Q_UINT64 getDBID () const
unsigned char getRating () const
Q_UINT32 getLastModified () const
Q_UINT32 getFileSize () const
Q_UINT32 getTrackLength () const
Q_UINT32 getTrackNumber () const
Q_UINT32 getTrackCount () const
Q_UINT32 getYear () const
Q_UINT32 getBitrate () const
Q_UINT32 getSamplerate () const
Q_UINT32 getVolumeAdjust () const
Q_UINT32 getPlayCount () const
Q_UINT32 getLastPlayed () const
Q_UINT32 getCdNumber () const
Q_UINT32 getCdCount () const
Q_UINT32 getDateAdded () const
Q_UINT32 getStartTime () const
Q_UINT32 getStopTime () const
Q_UINT32 getSoundCheck () const
unsigned char getVbrFlag () const
Q_UINT32 getFileFormatCode () const
Q_UINT32 getReleaseDate () const
unsigned char getMediaType () const
unsigned char getCompilationFlag () const
unsigned char isChecked () const
Q_UINT16 getBPM () const
virtual void setDBID (Q_UINT64 id)
virtual void setAlbum (const QString &album)
virtual void setArtist (const QString &artist)
virtual void setCategory (const QString &category)
virtual void setPathInfo (const QString &encodedpath)
virtual void setComment (const QString &comment)
virtual void setCompilationFlag (unsigned char isCompilation)
virtual void setDescription (const QString &description_txt)
virtual void setGrouping (const QString &grouping)
virtual void setGenre (const QString &genre)
virtual void setTitle (const QString &title)
virtual void setFileFormatDesc (const QString &fdesc)
virtual void setComposer (const QString &composer)
virtual void setEqualizerSetting (const QString &eqSetting)
virtual void setTrackNumber (Q_UINT32 tracknumber)
virtual void setTrackCount (Q_UINT32 numtracks)
virtual void setVolumeAdjust (Q_UINT32 newVolumeAdjust)
virtual void setYear (Q_UINT32 newYear)
virtual void setStartTime (Q_UINT32 startTime)
virtual void setStopTime (Q_UINT32 stopTime)
virtual void setSoundCheck (Q_UINT32 soundCheck)
void setRating (unsigned char rating)
void setLastPlayed (Q_UINT32 lastplayed)
void setPlayCount (Q_UINT32 newPlaycount)
void setBPM (Q_UINT32 bpm)
QString getFileExtension () const
virtual void setFileExtension (const QString &fileextension)
template<class TrackMetaSource>
void readFrom (TrackMetaSource &provider)
void setRecentlyPlayed (bool playedRecently=true)
bool recentlyPlayed () const

Protected Member Functions

virtual QDataStream & writeToStream (QDataStream &outstream)
virtual QDataStream & readFromStream (QDataStream &instream, bool *ok=NULL)
void writeData (QByteArray &data) const
virtual void doneAddingData ()

Protected Attributes

Q_UINT32 id
Q_UINT32 lastmodified
Q_UINT32 file_size
Q_UINT32 tracklen
Q_UINT32 tracknum
Q_UINT32 numtracks
Q_UINT32 year
Q_UINT32 bitrate
Q_UINT32 samplerate
Q_UINT32 volumeadjust
Q_UINT32 playcount
Q_UINT32 last_played_at
Q_UINT32 cdnum
Q_UINT32 numcds
Q_UINT32 file_format_code
Q_UINT32 date_added
Q_UINT32 date_released
Q_UINT32 mStartTime
Q_UINT32 mStopTime
Q_UINT32 mSoundCheck
unsigned char rating
unsigned char vbr
unsigned char type
unsigned char compilation
Q_UINT64 dbid
Q_UINT8 checked
Q_UINT8 app_rating
Q_UINT16 beatsPerMinute
Q_UINT16 mArtworkCount
Q_UINT16 unk9

Friends

class ItunesDBParser
class ItunesDBWriter

Detailed Description

represents a track

Author:
Michael Schulze


Member Function Documentation

Q_UINT32 itunesdb::Track::getID (  )  const

Returns the key for the track in the ITunesDB database

Returns:
the key for the track in the ITunesDB database

const QString & itunesdb::Track::getAlbum (  )  const

Returns the album the track is released for

Returns:
the albumname

const QString & itunesdb::Track::getArtist (  )  const

Returns the artist

Returns:
the artists name

const QString & itunesdb::Track::getCategory (  )  const

Returns the category

Returns:
the category

const QString & itunesdb::Track::getComment (  )  const

Returns the comment set for the track

Returns:
the comment

const QString & itunesdb::Track::getTitle (  )  const

Returns the title of the track

Returns:
the title

const QString & itunesdb::Track::getGenre (  )  const

Returns the genre of the track

Returns:
the genre

const QString & itunesdb::Track::getPathInfo (  )  const

Returns the pathname of the track as stored in the itunesdb. Be aware that the path is relative to the ipod base directory and the path separator is ":".

Returns:
pathname of the track

const QString & itunesdb::Track::getComposer (  )  const

Returns the composer

Returns:
the composer

const QString & itunesdb::Track::getEqualizerSetting (  )  const

Retunrs the EQ Setting

const QString & itunesdb::Track::getDescription (  )  const

Returns some descriptional text for this piece of audio data.

const QString & itunesdb::Track::getGrouping (  )  const

Returns the grouping info for this song.

Q_UINT64 itunesdb::Track::getDBID (  )  const

Returns the DBID which refers to additional media associated to this track (like cover art)

Returns:
the DBID

unsigned char itunesdb::Track::getRating (  )  const

Returns the rating for this track as read from the itunesdb.

Returns:
the rating for this track as read from the itunesdb.

Q_UINT32 itunesdb::Track::getLastModified (  )  const

Returns the last modified date for this track.

Returns:
the last modified date for this track.

Q_UINT32 itunesdb::Track::getFileSize (  )  const

Returns the size of the file associated with this track

Returns:
the filesize

Q_UINT32 itunesdb::Track::getTrackLength (  )  const

Returns the length of the track in milliseconds

Returns:
the length of the track in milliseconds

Q_UINT32 itunesdb::Track::getTrackNumber (  )  const

Returns the number of the track

Returns:
the number of the track

Q_UINT32 itunesdb::Track::getTrackCount (  )  const

Returns the number of tracks in the album

Returns:
the number of tracks in the album

Q_UINT32 itunesdb::Track::getYear (  )  const

Returns the year the song was created

Returns:
the year the song was created

Q_UINT32 itunesdb::Track::getBitrate (  )  const

Returns the bitrate

Returns:
the bitrate

Q_UINT32 itunesdb::Track::getSamplerate (  )  const

Returns the sample rate

Returns:
the sample rate

Q_UINT32 itunesdb::Track::getVolumeAdjust (  )  const

Returns the volume adjust for the track

Returns:
the volume adjust

Q_UINT32 itunesdb::Track::getPlayCount (  )  const

Returns the number of times the track was played so far

Returns:
the play count

Q_UINT32 itunesdb::Track::getLastPlayed (  )  const

Returns the date the track was last played.

Q_UINT32 itunesdb::Track::getCdNumber (  )  const

Returns the cd number the track is on for albums with more than one CD.

Returns:
the cd number the track is on for albums with more than one CD.

Q_UINT32 itunesdb::Track::getCdCount (  )  const

Returns the number of CDs for the album of the track.

Returns:
the number of CDs for the album of the track.

Q_UINT32 itunesdb::Track::getDateAdded (  )  const [inline]

Returns the date the track was added to the database/device.

Returns:
the date the track was added to the database/device.

void itunesdb::Track::setAlbum ( const QString &  album  )  [virtual]

Sets the album for this track.

Parameters:
album the album to set.

void itunesdb::Track::setArtist ( const QString &  artist  )  [virtual]

Sets the artist for this track.

Parameters:
artist the artist name to set.

void itunesdb::Track::setCategory ( const QString &  category  )  [virtual]

Sets the category for this track.

Parameters:
category the category to set.

void itunesdb::Track::setPathInfo ( const QString &  encodedpath  )  [virtual]

Sets the path information for this track. The path is relative to the ipod's base directory. The path separator is ":"

Parameters:
encodedpath the path information to set.

void itunesdb::Track::setComment ( const QString &  comment  )  [virtual]

Sets the comment for this track.

Parameters:
comment the comment to set.

void itunesdb::Track::setDescription ( const QString &  description_txt  )  [virtual]

Sets the description for this track.

Parameters:
description_txt the description to set.

void itunesdb::Track::setGrouping ( const QString &  grouping  )  [virtual]

Sets the grouping for this track.

Parameters:
grouping the grouping to set.

void itunesdb::Track::setGenre ( const QString &  genre  )  [virtual]

Sets the genre for this track.

Parameters:
genre the genre to set.

void itunesdb::Track::setTitle ( const QString &  title  )  [virtual]

Sets the title for this track.

Parameters:
title the title to set.

void itunesdb::Track::setFileFormatDesc ( const QString &  fdesc  )  [virtual]

Sets the file format description for this track.

Parameters:
fdesc the file format description to set.

void itunesdb::Track::setComposer ( const QString &  composer  )  [virtual]

Sets the composer for this track.

Parameters:
composer the composer to set.

void itunesdb::Track::setEqualizerSetting ( const QString &  eqSetting  )  [virtual]

Sets the equalizer setting for this track.

Parameters:
eqSetting the equalizer preset to set. See the itunesb wiki for details

void itunesdb::Track::setTrackNumber ( Q_UINT32  tracknumber  )  [virtual]

Sets the track number for this track.

Parameters:
tracknumber the track number to set.

void itunesdb::Track::setTrackCount ( Q_UINT32  numtracks  )  [virtual]

Sets the the number of tracks in the album for this track.

Parameters:
numtracks the number of tracks to set.

void itunesdb::Track::setVolumeAdjust ( Q_UINT32  newVolumeAdjust  )  [virtual]

Sets the volume adjust for this track.

Parameters:
newVolumeAdjust the volume adjust to set.

void itunesdb::Track::setYear ( Q_UINT32  newYear  )  [virtual]

Sets the year of release for this track.

Parameters:
newYear the year to set.

void itunesdb::Track::setStartTime ( Q_UINT32  startTime  )  [virtual]

Sets the start time for this track.

Parameters:
startTime the start time to set.

void itunesdb::Track::setStopTime ( Q_UINT32  stopTime  )  [virtual]

Sets the stop time for this track.

Parameters:
stopTime the stop time to set.

void itunesdb::Track::setSoundCheck ( Q_UINT32  soundCheck  )  [virtual]

Sets the soundcheck for this track.

Parameters:
soundCheck the soundcheck to set.

void itunesdb::Track::setRating ( unsigned char  rating  ) 

Sets the rating for this track.

Parameters:
rating the rating to set.

void itunesdb::Track::setLastPlayed ( Q_UINT32  lastplayed  ) 

Sets the date the track was last played.

Parameters:
lastplayed the last played date to set.

void itunesdb::Track::setPlayCount ( Q_UINT32  newPlaycount  ) 

Sets the playcount for this track.

Parameters:
newPlaycount the playcount to set.

void itunesdb::Track::setBPM ( Q_UINT32  bpm  )  [inline]

Sets the beats per minute info for this track.

Parameters:
bpm the beats per minute information to set.

QString itunesdb::Track::getFileExtension (  )  const

Returns the file extension for this track.

Returns:
the file extension for this track.

void itunesdb::Track::setFileExtension ( const QString &  fileextension  )  [virtual]

Sets the file extension for this track.

Parameters:
fileextension the file extension to set.

template<class TrackMetaSource>
void itunesdb::Track::readFrom ( TrackMetaSource &  provider  )  [inline]

Copies the metadata from the given source to this Track. The Track class itself is a possible TrackMetaSource, so you can copy metadata from a track to another.

void itunesdb::Track::writeData ( QByteArray &  data  )  const [protected]

void itunesdb::Track::doneAddingData (  )  [protected, virtual]

override from ListItem::doneAddingData()

Reimplemented from itunesdb::ListItem.


The documentation for this class was generated from the following files:
Generated on Tue Dec 12 16:39:27 2006 for libqtpod.kdevelop by  doxygen 1.5.1