mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
36 lines
994 B
C++
36 lines
994 B
C++
#include <QCoreApplication>
|
|
#include <QDebug>
|
|
#include "blackcore/dbusserver.h"
|
|
#include "planemanagerhandler.h"
|
|
#include "atcmanagerhandler.h"
|
|
#include "atcmanager.h"
|
|
#include "fsdclient.h"
|
|
#include "fsdclienthandler.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QCoreApplication a(argc, argv);
|
|
|
|
BlackCore::CDBusServer server;
|
|
|
|
// Setting up our objects
|
|
CPlaneManager planeManager;
|
|
CAtcManager atcManager;
|
|
CFsdClient fsdclient;
|
|
|
|
|
|
// Setting up the handler to expose the objects via DBus
|
|
CPlaneManagerHandler planeManagerHandler(&planeManager);
|
|
CAtcManagerHandler atcManagerHandler(&atcManager);
|
|
CFsdClientHandler fsdClientHandler (&fsdclient);
|
|
|
|
// Pass the DBus server to the handlers. This registers also
|
|
// the handler in the DBus server and makes it available
|
|
// via the interface.
|
|
planeManagerHandler.setDBusServer(&server);
|
|
atcManagerHandler.setDBusServer(&server);
|
|
fsdClientHandler.setDBusServer(&server);
|
|
|
|
return a.exec();
|
|
}
|