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
;
28 /* QPlayback m_Playback;
29 QPlaylist m_Playlist;*/
31 static void disconnectCallbackHandler(void * instance
);
32 static void outputCheck(int i
, void * instance
);
34 void handleIn(int socket
);
35 void handleOut(int socket
);
37 QClient(QString name
, QObject
* parent
= 0);
40 /* QPlayback * playback() { return &m_Playback; }
41 QPlaylist * playlist() { return &m_Playlist; }*/
43 void connectToServer(QString ipcPath
= QString());
44 bool isConnectedToServer() const;
48 QString
lastError() const;
49 inline xmmsc_connection_t
* connection() const { return m_Connection
; }
51 // friend void disconnectCallbackHelper(void *);
53 void connectionChanged(xmmsc_connection_t
* connection
);