mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
first iteration on #22 shimlib integration
This commit is contained in:
79
src/blackcore/network.h
Normal file
79
src/blackcore/network.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / authors
|
||||
* 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/. */
|
||||
|
||||
/*!
|
||||
\file
|
||||
*/
|
||||
|
||||
#ifndef BLACKCORE_NETWORK_H
|
||||
#define BLACKCORE_NETWORK_H
|
||||
|
||||
#include "../blackmisc/pqfrequency.h"
|
||||
#include "../blackmisc/coordinategeodetic.h"
|
||||
#include "../blackmisc/pqlength.h"
|
||||
#include "../blackmisc/pqtime.h"
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QMap>
|
||||
#include <QVector>
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
|
||||
class INetwork : public QObject
|
||||
{
|
||||
Q_OBJECT;
|
||||
|
||||
public slots:
|
||||
virtual void setServerDetails(const QString& hostname, quint16 port) = 0;
|
||||
virtual void setUserCredentials(const QString& username, const QString& password) = 0;
|
||||
virtual void initiateConnection() = 0;
|
||||
virtual void terminateConnection() = 0;
|
||||
virtual void sendPrivateTextMessage(const QString& callsign, const QString& msg) = 0;
|
||||
virtual void sendRadioTextMessage(const QVector<BlackMisc::PhysicalQuantities::CFrequency>& freqs, const QString& msg) = 0;
|
||||
//TODO virtual void sendInfoQuery(...) = 0;
|
||||
//TODO virtual void replyToInfoQuery(...) = 0;
|
||||
virtual void requestPlaneInfo(const QString& callsign) = 0;
|
||||
//TODO virtual void setPlanePosition(...) = 0;
|
||||
//TODO virtual void sendFlightPlan(...) = 0;
|
||||
virtual void sendPlaneInfo(const QString& callsign, const QString& acTypeICAO, const QString& airlineICAO, const QString& livery) = 0;
|
||||
virtual void ping(const QString& callsign) = 0;
|
||||
virtual void requestMetar(const QString& airportICAO) = 0;
|
||||
virtual void requestWeatherData(const QString& airportICAO) = 0;
|
||||
|
||||
signals:
|
||||
void atcPositionUpdate(const QString& callsign, const BlackMisc::PhysicalQuantities::CFrequency& freq,
|
||||
const BlackMisc::Geo::CCoordinateGeodetic& pos, const BlackMisc::PhysicalQuantities::CLength& range);
|
||||
void atcDisconnected(const QString& callsign);
|
||||
void atisReplyReceived(const QString& callsign, const QString& data);
|
||||
//TODO void cloudDataReceived(...);
|
||||
void connectionStatusIdle();
|
||||
void connectionStatusConnecting();
|
||||
void connectionStatusConnected();
|
||||
void connectionStatusDisconnected();
|
||||
void connectionStatusError();
|
||||
//TODO void atisQueryReplyReceived(...);
|
||||
//TODO void nameQueryReplyReceived(const QString& callsign, const QString& name);
|
||||
//TODO void capabilitiesQueryReplyReceived(...);
|
||||
void ipQueryReplyReceived(const QString& ip);
|
||||
void fpQueryRequestReceived(const QString& callsign);
|
||||
void freqQueryRequestReceived(const QString& callsign);
|
||||
//TODO void interimPilotPositionUpdate(...);
|
||||
void kicked(const QString& msg);
|
||||
void metarReceived(const QString& data);
|
||||
void pilotDisconnected(const QString& callsign);
|
||||
void planeInfoReceived(const QString& callsign, const QString& acTypeICAO, const QString& airlineICAO, const QString& livery);
|
||||
void planeInfoRequestReceived(const QString& callsign);
|
||||
//TODO void pilotPositionUpdate(...);
|
||||
void pong(const QString& callsign, const BlackMisc::PhysicalQuantities::CTime& elapsedTime);
|
||||
void radioTextMessageReceived(const QString& callsign, const QString& msg, const QVector<BlackMisc::PhysicalQuantities::CFrequency>& freqs);
|
||||
void privateTextMessageReceived(const QString& fromCallsign, const QString& toCallsign, const QString& msg);
|
||||
//TODO void temperatureDataReceived(...);
|
||||
//TODO void windDataReceived(...);
|
||||
};
|
||||
|
||||
} //namespace BlackCore
|
||||
|
||||
#endif //BLACKCORE_NETWORK_H
|
||||
Reference in New Issue
Block a user