2 // C++ Interface: client
4 // Author: Oliver Groß <z.o.gross@gmx.de>, (C) 2008
6 // Copyright: See COPYING file that comes with this distribution
8 #ifndef XMMSQT_CLIENT_H
9 #define XMMSQT_CLIENT_H
12 #include <QSocketNotifier>
13 #include <xmmsclient/xmmsclient.h>
18 class QClient
: public QObject
{
23 xmmsc_connection_t
* m_Connection
;
25 QSocketNotifier
* m_ReadNotifier
;
26 QSocketNotifier
* m_WriteNotifier
;
31 static void disconnectCallbackHandler(void * instance
);
33 void handleIn(int socket
);
34 void handleOut(int socket
);
36 QClient(QString name
, QObject
* parent
= 0);
39 QPlayback
& playback() { return m_Playback
; }
40 QPlaylist
& playlist() { return m_Playlist
; }
42 void connectToServer(QString ipcPath
= QString());
43 bool isConnectedToServer() const;
47 QString
lastError() const;
48 inline xmmsc_connection_t
* connection() const { return m_Connection
; }
50 // friend void disconnectCallbackHelper(void *);
52 void connectionChanged(xmmsc_connection_t
* connection
);