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>
18 class QPlaylist
: public QObject
{
21 xmmsc_connection_t
* m_Connection
;
22 QList
<quint32
> m_IDList
;
24 static void loadedCallback(xmmsc_result_t
* result
, void * instance
);
25 static void changedCallback(xmmsc_result_t
* result
, void * instance
);
26 static void fillIDListCallback(xmmsc_result_t
* result
, void * instance
);
27 static void currentPosCallback(xmmsc_result_t
* result
, void * instance
);
29 static void recievedTitleInfoCallback(xmmsc_result_t
* result
, void * instance
);
31 void setConnection(xmmsc_connection_t
* connection
);
33 QPlaylist(QClient
* parent
= 0);
36 xmmsc_connection_t
* connection() const { return m_Connection
; }
37 //xmmsc_result_t * mediaInfo(quint32 id);
38 QList
<quint32
> & idList() { return m_IDList
; }
40 void requestTitleInfo(quint32 id
);
44 void append(quint32 id
);
45 void append(QString url
);
46 void append(QList
<quint32
> ids
);
47 void append(QStringList urls
);
48 void appendRecursive(QString directory
);
49 void insert(quint32 id
, quint32 position
);
50 void insert(QString url
, quint32 position
);
51 void insert(QList
<quint32
> ids
, quint32 position
);
52 void insert(QStringList urls
, quint32 position
);
53 void remove(quint32 position
);
54 void move(quint32 from
, quint32 to
);
56 /* void sort(QStringList properties);*/
58 void setNext(quint32 position
);
60 void entryAppended(quint32 id
);
61 void entryInserted(quint32 id
, quint32 position
);
62 void entryRemoved(quint32 id
, quint32 position
);
63 void entryMoved(quint32 from
, quint32 to
);
64 void entryUpdated(quint32 position
, quint32 oldid
);
66 //void sortingChanged();
68 void currentChanged(quint32 position
);
69 void recievedTitleInfo(QString title
);