00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef ITUNESDBPLAYLISTITEM_H
00025 #define ITUNESDBPLAYLISTITEM_H
00026
00027 #include "listitem.h"
00028
00029 #define PLAYLISTITEM_INVALID 0xEEEEEEEE
00030
00031 namespace itunesdb {
00032
00036 class PlaylistItem : public ListItem
00037 {
00038 friend class ItunesDBParser;
00039 friend class Playlist;
00040
00041 public:
00042
00043 virtual ~PlaylistItem();
00044
00049 Q_UINT32 getID() const;
00050
00054 Q_UINT32 getPosition() const;
00055
00059 void setPosition( Q_UINT32 pos );
00060
00064 bool isPositionSet() const { return m_pos != PLAYLISTITEM_INVALID; }
00065
00066 protected:
00067
00068 PlaylistItem();
00069 PlaylistItem( Q_UINT32 ipod_id);
00070
00074 virtual void doneAddingData();
00075
00079 virtual void readMHOD( QDataStream& stream, Q_UINT32 type, Q_UINT32 blocklen );
00080
00081 Q_UINT32 m_id;
00082 Q_UINT32 m_pos;
00083 };
00084
00089 class PlaylistItemComparator {
00090 public:
00091 virtual ~PlaylistItemComparator() {}
00092 virtual int compare( const PlaylistItem& item1, const PlaylistItem& item2 ) = 0;
00093 };
00094
00095 }
00096
00097 #endif