mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
- Added DBus handler interface - Added more complex flow to both samples - Added custom class to be transfered
30 lines
933 B
C++
30 lines
933 B
C++
/* 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 <QDebug>
|
|
|
|
#include "aircraft_manager_handler.h"
|
|
#include "aircraft_manager.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 "aircraftmanager_adaptor.h"
|
|
|
|
CAircraftManagerHandler::CAircraftManagerHandler(QObject *parent) :
|
|
IDBusHandler(parent)
|
|
{
|
|
setDBusObjectPath("/AircraftManager");
|
|
new AircraftManagerAdaptor(this);
|
|
}
|
|
|
|
QList<CRemoteAircraft> CAircraftManagerHandler::aircraftList() const
|
|
{
|
|
qDebug() << "Client requested the list of aircrafts. Sending to him...";
|
|
return qobject_cast<CAircraftManager*>(m_parent)->aircraftList();
|
|
}
|