itunesdb::ListItem Class Reference

#include <listitem.h>

Inheritance diagram for itunesdb::ListItem:

itunesdb::Playlist itunesdb::PlaylistItem itunesdb::Track itunesdb::MasterPlaylist ITunesDBPlaylist ITunesDBPlaylist::Entry ITunesDBTrack List of all members.

Public Member Functions

int getType () const
void setItemProperty (const QString &data, ItemProperty field)
const QString & getItemProperty (ItemProperty field) const
uint getNumComponents () const
uint getNumStringComponents () const
virtual void doneAddingData ()
virtual bool isDirty () const

Protected Types

typedef std::map< Q_UINT32,
QString > 
PropertyMap
typedef std::vector< MHODPair > DumpedMHODs

Protected Member Functions

 ListItem (int type)
const QByteArray * getDumpedMHOD (Q_UINT32 type) const
virtual void readMHOD (QDataStream &stream, Q_UINT32 type, Q_UINT32 blocklen)
Q_UINT32 writeMHODsToStream (QDataStream &outstream) const
virtual void readNonStringMHOD (QDataStream &stream, Q_UINT32 type, Q_UINT32 blocklen)
virtual uint writeNonStringMHODs (QDataStream &outstream) const
virtual void setDirty (bool dirtyFlag=true)

Protected Attributes

PropertyMap m_properties
DumpedMHODs m_dumpedMHODs
int m_itemType

Friends

class ItunesDBParser

Detailed Description

Describes a list item in iTunesDB. Possible known subtypes at the moment are playlist, playlistitem and track

Author:
Michael Schulze


Member Function Documentation

int itunesdb::ListItem::getType (  )  const

returns the type ofthis item possible values from the known implementors are ITEMTYPE_PLAYLIST, ITEMTYPE_PLAYLISTITEM and ITEMTYPE_TRACK

void itunesdb::ListItem::setItemProperty ( const QString &  data,
ItemProperty  field 
)

sets a given itunesDB item property

Parameters:
data value for the property to be set
field propertyID of the property to be set

const QString & itunesdb::ListItem::getItemProperty ( ItemProperty  field  )  const

Returns the value for the given property.

Parameters:
field PropertyID of the property to be returned.
Returns:
the value for the given property.

uint itunesdb::ListItem::getNumComponents (  )  const

Returns the number of properties.

uint itunesdb::ListItem::getNumStringComponents (  )  const

Returns the number of String properties.

void itunesdb::ListItem::doneAddingData (  )  [virtual]

This method may be overridden for consistency checks after all properties have been read.

Reimplemented in itunesdb::Playlist, itunesdb::PlaylistItem, and itunesdb::Track.

bool itunesdb::ListItem::isDirty (  )  const [virtual]

Returns true if this database item is out of sync with the database. This is true if/when the item got changed and did not get saved back to the database yet.


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