mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-10 05:55:33 +08:00
refs #42:
- Added CDBusServer into Blackcore library - Added DBus server and client sample
This commit is contained in:
44
samples/dbusclient/dbusclient.h
Normal file
44
samples/dbusclient/dbusclient.h
Normal file
@@ -0,0 +1,44 @@
|
||||
#ifndef DBUSCLIENT_H
|
||||
#define DBUSCLIENT_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QDBusConnection>
|
||||
#include <QtDBus/QDBusError>
|
||||
|
||||
#include "planemanager_interface.h"
|
||||
#include "atcmanager_interface.h"
|
||||
#include "fsdclient_interface.h"
|
||||
|
||||
class DBusClient : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
QDBusConnection m_connection;
|
||||
org::vatsim::pilotClient::PlaneManager *pilotManagerIface;
|
||||
org::vatsim::pilotClient::AtcManager *atcManagerIface;
|
||||
org::vatsim::pilotClient::FsdClient *fsdClientIface;
|
||||
|
||||
public:
|
||||
explicit DBusClient(QObject *parent = 0);
|
||||
~DBusClient();
|
||||
|
||||
void connectTo(const QString &host);
|
||||
void disconnectFrom();
|
||||
|
||||
void printPilotList();
|
||||
void printAtcList();
|
||||
|
||||
void printError();
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
||||
private slots:
|
||||
void slot_connected(const QString &host);
|
||||
void slot_disconnected();
|
||||
|
||||
};
|
||||
|
||||
#endif // DBUSCLIENT_H
|
||||
Reference in New Issue
Block a user