mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
33 lines
777 B
C++
33 lines
777 B
C++
|
|
#include "blackcore/dbusserver.h"
|
|
#include "fsdclienthandler.h"
|
|
#include "fsdclient.h"
|
|
|
|
// It is really IMPORTANT to include this header.
|
|
// Otherwise it won't be generated by qmake and the
|
|
// project can't be build
|
|
#include "fsdclient_adaptor.h"
|
|
|
|
CFsdClientHandler::CFsdClientHandler(QObject *parent) :
|
|
QObject(parent), m_dbusserver(0), m_parent(0)
|
|
{
|
|
m_dbusPath = "/FsdClient";
|
|
m_parent = qobject_cast<CFsdClient *>(parent);
|
|
|
|
new FsdClientAdaptor(this);
|
|
}
|
|
|
|
void CFsdClientHandler::connectTo(const QString &host)
|
|
{
|
|
m_parent->connectTo(host);
|
|
emit connectedTo(host);
|
|
}
|
|
|
|
void CFsdClientHandler::setDBusServer(BlackCore::CDBusServer *dbusServer)
|
|
{
|
|
m_dbusserver = dbusServer;
|
|
|
|
if (m_dbusserver)
|
|
m_dbusserver->addObject(m_dbusPath, this);
|
|
}
|