2 // C++ Interface: playlist
4 // Author: Oliver Groß <z.o.gross@gmx.de>, (C) 2008
6 // Copyright: See COPYING file that comes with this distribution
8 #ifndef XMMSQT_PLAYLIST_H
9 #define XMMSQT_PLAYLIST_H
12 #include <QStringList>
13 #include <xmmsclient/xmmsclient.h>
19 class QPlaylist
: public QObject
{
21 friend class QMedialib
;
24 xmmsc_connection_t
* m_Connection
;
25 QList
<quint32
> m_IDList
;
28 static void fillIDListCallback(xmmsc_result_t
* result
, void * instance
);
29 static void changedCallback(xmmsc_result_t
* result
, void * instance
);
30 static void currentPosCallback(xmmsc_result_t
* result
, void * instance
);
32 inline const char * identifierToCString();
34 void setConnection(xmmsc_connection_t
* connection
);
36 QPlaylist(QClient
* parent
, QString identifier
= QString());
39 xmmsc_connection_t
* connection() const { return m_Connection
; }
40 QList
<quint32
> & idList() { return m_IDList
; }
41 quint32
position() const { return m_Position
; }
42 QString
identifier() const { return m_Identifier
; }
46 void append(quint32 id
);
47 void append(QString url
);
48 void append(QList
<quint32
> ids
);
49 void append(QStringList urls
);
50 void appendRecursive(QString directory
);
51 void insert(quint32 id
, quint32 position
);
52 void insert(QString url
, quint32 position
);
53 void insert(QList
<quint32
> ids
, quint32 position
);
54 void insert(QStringList urls
, quint32 position
);
55 void remove(quint32 position
);
56 void move(quint32 from
, quint32 to
);
58 void sort(QStringList properties
);
61 void entryAboutToBeInserted(quint32 position
, quint32 id
);
62 void entryAboutToBeRemoved(quint32 position
, quint32 id
);
63 void entryInserted(quint32 position
);
64 void entryRemoved(quint32 position
);
65 void entryMoved(quint32 from
, quint32 to
);
66 void entryUpdated(quint32 position
, quint32 oldid
);
68 void positionChanged(quint32 position
);