mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
refs #42
- Added DBus handler interface - Added more complex flow to both samples - Added custom class to be transfered
This commit is contained in:
33
samples/dbusserver/atc_manager_handler.cpp
Normal file
33
samples/dbusserver/atc_manager_handler.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / contributors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "atc_manager.h"
|
||||
#include "blackcore/dbus_server.h"
|
||||
#include "atc_manager_handler.h"
|
||||
|
||||
/**
|
||||
* It is really IMPORTANT to include the following header.
|
||||
* Otherwise it won't be generated by qmake and the
|
||||
* project can't be build
|
||||
*/
|
||||
#include "atcmanager_adaptor.h"
|
||||
|
||||
CAtcManagerHandler::CAtcManagerHandler(QObject *parent) :
|
||||
IDBusHandler(parent)
|
||||
{
|
||||
setDBusObjectPath("/AtcManager");
|
||||
new AtcManagerAdaptor(this);
|
||||
}
|
||||
|
||||
CAtcManagerHandler::~CAtcManagerHandler()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QStringList CAtcManagerHandler::atcList() const
|
||||
{
|
||||
qDebug() << "Client requested the list of controllers. Sending to him...";
|
||||
return qobject_cast<CAtcManager*>(m_parent)->atcList();
|
||||
}
|
||||
Reference in New Issue
Block a user