Added start of new Medialib view
This commit is contained in:
parent
219327ca20
commit
d114edf75f
12 changed files with 194 additions and 27 deletions
29
XMMSSocket.cpp
Normal file
29
XMMSSocket.cpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#include <xmmsclient/xmmsclient++.h>
|
||||
|
||||
#include <QErrorMessage>
|
||||
#include "XMMSSocket.h"
|
||||
|
||||
XMMSSocket::XMMSSocket (const char *name) :
|
||||
m_client (name)
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
XMMSSocket::connect (const char *path)
|
||||
{
|
||||
try {
|
||||
m_client.connect (path ? path : "");
|
||||
}
|
||||
catch (Xmms::connection_error& e) {
|
||||
QErrorMessage *err = new QErrorMessage ();
|
||||
err->showMessage ("Couldn't connect to XMMS2, please try again.");
|
||||
err->exec ();
|
||||
delete err;
|
||||
return false;
|
||||
}
|
||||
|
||||
m_client.setMainloop (new XmmsQT4 (m_client.getConnection ()));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue