[playlist] added title info request functionality
[libxmms2client-qt.git] / playlist.h
blob0aa43dda5d01ae580e3a773cdf950dcecef0cb03
1 //
2 // C++ Interface: playlist
3 //
4 // Author: Oliver Groß <z.o.gross@gmx.de>, (C) 2008
5 //
6 // Copyright: See COPYING file that comes with this distribution
7 //
8 #ifndef XMMSQT_PLAYLIST_H
9 #define XMMSQT_PLAYLIST_H
11 #include <QObject>
12 #include <QStringList>
13 #include <xmmsclient/xmmsclient.h>
15 namespace XmmsQt {
16 class QClient;
18 class QPlaylist : public QObject {
19 Q_OBJECT
20 private:
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);
30 private slots:
31 void setConnection(xmmsc_connection_t * connection);
32 public:
33 QPlaylist(QClient * parent = 0);
34 ~QPlaylist();
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);
42 void reset();
43 public slots:
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);
55 void clear();
56 /* void sort(QStringList properties);*/
57 void randomize();
58 void setNext(quint32 position);
59 signals:
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);
65 //void cleared();
66 //void sortingChanged();
67 void reseted();
68 void currentChanged(quint32 position);
69 void recievedTitleInfo(QString title);
73 #endif