mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-10 05:55:33 +08:00
Ref T259, Ref T243 get latest parts from remote aircraft provider
This commit is contained in:
@@ -130,6 +130,13 @@ namespace BlackMisc
|
||||
return m_remoteAircraftProvider->updateAircraftEnabled(callsign, enabledForRedering);
|
||||
}
|
||||
|
||||
CAircraftParts IRemoteAircraftProvider::getLatestAircraftParts(const CCallsign &callsign) const
|
||||
{
|
||||
static const CAircraftParts empty;
|
||||
const CAircraftPartsList parts = this->remoteAircraftParts(callsign, -1);
|
||||
return parts.isEmpty() ? empty : parts.latestObject();
|
||||
}
|
||||
|
||||
void IRemoteAircraftProvider::removeOutdatedParts(CAircraftPartsList &partsList)
|
||||
{
|
||||
// remove all outdated parts, but keep at least one
|
||||
|
||||
@@ -102,6 +102,10 @@ namespace BlackMisc
|
||||
//! \threadsafe
|
||||
virtual bool isRemoteAircraftSupportingParts(const BlackMisc::Aviation::CCallsign &callsign) const = 0;
|
||||
|
||||
//! Get the latest aircraft parts (if any, otherwise default)
|
||||
//! \threadsafe
|
||||
BlackMisc::Aviation::CAircraftParts getLatestAircraftParts(const BlackMisc::Aviation::CCallsign &callsign) const;
|
||||
|
||||
//! Number of aircraft supporting parts
|
||||
//! \threadsafe
|
||||
virtual int getRemoteAircraftSupportingPartsCount() const = 0;
|
||||
|
||||
Reference in New Issue
Block a user