2 // C++ Interface: playback
4 // Author: Oliver Groß <z.o.gross@gmx.de>, (C) 2008
6 // Copyright: See COPYING file that comes with this distribution
8 #ifndef XMMSQT_PLAYBACK_H
9 #define XMMSQT_PLAYBACK_H
13 #include <xmmsclient/xmmsclient.h>
18 class QPlayback
: public QObject
{
21 xmmsc_connection_t
* m_Connection
;
22 QHash
<QString
, quint8
> m_Volume
;
23 xmms_playback_status_t m_Status
;
26 static void setVolumeChannel(const void * key
, xmmsc_result_value_type_t
, const void * value
, void * instance
);
28 static void volumeCallback(xmmsc_result_t
* result
, void * instance
);
29 static void statusCallback(xmmsc_result_t
* result
, void * instance
);
30 static void idCallback(xmmsc_result_t
* result
, void * instance
);
31 static void playTimeCallback(xmmsc_result_t
* result
, void * instance
);
33 QPlayback(QClient
* parent
);
36 xmms_playback_status_t
status() { return m_Status
; }
37 quint32
currentID() const { return m_CurrentID
; }
38 const QHash
<QString
, quint8
> & volume() { return m_Volume
; }
42 void setConnection(xmmsc_connection_t
* connection
);
47 void setVolume(int volume
, QString channel
= QString());
48 void setNext(quint32 position
);
49 void setPlayTime(int time
);
51 void playTimeChanged(quint32 time
);
53 void statusChanged(xmms_playback_status_t status
);
54 void idChanged(quint32 id
);