#include <listitem.h>
Inheritance diagram for itunesdb::ListItem:
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 |
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
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.
field | PropertyID of the property to be returned. |
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.