mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 16:55:36 +08:00
[FSD] Send correct pilot rating, use threadsafe getters in some places
The thread safety is still premature for the FSD client class. However, most likely no critical as those values have to be preset and never change.
This commit is contained in:
committed by
Mat Sutcliffe
parent
000d0da92a
commit
388138203e
@@ -113,21 +113,32 @@ namespace BlackCore
|
||||
void setAtcRating(AtcRating rating) { QWriteLocker l(&m_lockUserClientBuffered); m_atcRating = rating; }
|
||||
//! @}
|
||||
|
||||
// ------ thread safe access to preset values -----
|
||||
|
||||
//! Get the server
|
||||
//! \threadsafe
|
||||
const BlackMisc::Network::CServer &getServer() const { QReadLocker l(&m_lockUserClientBuffered); return m_server; }
|
||||
|
||||
//! List of all preset values
|
||||
//! \threadsafe
|
||||
QStringList getPresetValues() const;
|
||||
|
||||
//! Callsign if any
|
||||
//! \threadsafe
|
||||
BlackMisc::Aviation::CCallsign getPresetCallsign() const { QReadLocker l(&m_lockUserClientBuffered); return m_ownCallsign; }
|
||||
|
||||
//! Partner callsign if any
|
||||
//! \threadsafe
|
||||
BlackMisc::Aviation::CCallsign getPresetPartnerCallsign() const { QReadLocker l(&m_lockUserClientBuffered); return m_partnerCallsign; }
|
||||
|
||||
//! Mode
|
||||
//! \threadsafe
|
||||
BlackMisc::Network::CLoginMode getLoginMode() const { QReadLocker l(&m_lockUserClientBuffered); return m_loginMode; }
|
||||
|
||||
//! Rating
|
||||
//! \threadsafe
|
||||
PilotRating getPilotRating() const { QReadLocker l(&m_lockUserClientBuffered); return m_pilotRating; }
|
||||
|
||||
//! Connenct/disconnect @{
|
||||
void connectToServer();
|
||||
void disconnectFromServer();
|
||||
|
||||
Reference in New Issue
Block a user