mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
refs #212, added flight plan sending to network context
This commit is contained in:
@@ -135,6 +135,9 @@ namespace BlackCore
|
||||
//! Text messages (radio and private chat messages)
|
||||
virtual void sendTextMessages(const BlackMisc::Network::CTextMessageList &textMessages) = 0;
|
||||
|
||||
//! Send flight plan
|
||||
virtual void sendFlightPlan(const BlackMisc::Aviation::CFlightPlan &flightPlan) = 0;
|
||||
|
||||
/*!
|
||||
* \brief Get METAR, if not available request it
|
||||
* \param airportIcaoCode such as EDDF, KLAX
|
||||
|
||||
@@ -267,6 +267,15 @@ namespace BlackCore
|
||||
this->m_network->sendTextMessages(textMessages);
|
||||
}
|
||||
|
||||
/*
|
||||
* Flight plan
|
||||
*/
|
||||
void CContextNetwork::sendFlightPlan(const CFlightPlan &flightPlan)
|
||||
{
|
||||
if (this->getRuntime()->isSlotLogForNetworkEnabled()) this->getRuntime()->logSlot(Q_FUNC_INFO, flightPlan.toQString());
|
||||
this->m_network->sendFlightPlan(flightPlan);
|
||||
}
|
||||
|
||||
/*
|
||||
* Connection status changed
|
||||
*/
|
||||
|
||||
@@ -87,6 +87,9 @@ namespace BlackCore
|
||||
//! \copydoc IContextNetwork::sendTextMessages()
|
||||
virtual void sendTextMessages(const BlackMisc::Network::CTextMessageList &textMessages) override;
|
||||
|
||||
//! \copydoc IContextNetwork::sendFlightPlan()
|
||||
virtual void sendFlightPlan(const BlackMisc::Aviation::CFlightPlan &flightPlan) override;
|
||||
|
||||
//! \copydoc IContextNetwork::getMetar()
|
||||
virtual BlackMisc::Aviation::CInformationMessage getMetar(const QString &airportIcaoCode) override;
|
||||
|
||||
|
||||
@@ -158,6 +158,11 @@ namespace BlackCore
|
||||
this->m_dBusInterface->callDBus(QLatin1Literal("sendTextMessages"), textMessages);
|
||||
}
|
||||
|
||||
void CContextNetworkProxy::sendFlightPlan(const BlackMisc::Aviation::CFlightPlan &flightPlan)
|
||||
{
|
||||
this->m_dBusInterface->callDBus(QLatin1Literal("sendFlightPlan"), flightPlan);
|
||||
}
|
||||
|
||||
BlackMisc::Aviation::CInformationMessage CContextNetworkProxy::getMetar(const QString &airportIcaoCode)
|
||||
{
|
||||
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CInformationMessage>(QLatin1Literal("getMetar"), airportIcaoCode);
|
||||
|
||||
@@ -101,6 +101,9 @@ namespace BlackCore
|
||||
//! \copydoc IContextNetwork::sendTextMessages()
|
||||
virtual void sendTextMessages(const BlackMisc::Network::CTextMessageList &textMessages) override;
|
||||
|
||||
//! \copydoc IContextNetwork::sendFlightPlan()
|
||||
virtual void sendFlightPlan(const BlackMisc::Aviation::CFlightPlan &flightPlan) override;
|
||||
|
||||
//! \copydoc IContextNetwork::getMetar()
|
||||
virtual BlackMisc::Aviation::CInformationMessage getMetar(const QString &airportIcaoCode) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user