refs #395, changed own aircraft provider to thread safe member functions

(similar to remote aircraft provider)
* removed references
* made own aircraft context thread safe (reg. own aircrat data)
* removed the read only versions of the provider
* adjusted consuming methods
* renamed some functions ("ownAircraft...") to avoid ambiguity (with remote aircraft)
This commit is contained in:
Klaus Basan
2015-04-26 16:41:48 +02:00
committed by Mathew Sutcliffe
parent 7200f2e29c
commit 3ecf37dda4
27 changed files with 505 additions and 335 deletions

View File

@@ -185,8 +185,8 @@ namespace BlackGui
ownAircraft.setCallsign(aircraftValues.ownCallsign);
// set latest ICAO, callsign
this->getIContextOwnAircraft()->updateIcaoData(ownAircraft.getIcaoInfo());
this->getIContextOwnAircraft()->updateCallsign(ownAircraft.getCallsign());
this->getIContextOwnAircraft()->updateOwnIcaoData(ownAircraft.getIcaoInfo());
this->getIContextOwnAircraft()->updateOwnCallsign(ownAircraft.getCallsign());
// Login mode
INetwork::LoginMode mode = ui->gbp_LoginMode->getLoginMode();
@@ -216,7 +216,7 @@ namespace BlackGui
currentServer = this->getCurrentOtherServer();
}
this->ui->frp_CurrentServer->setServer(currentServer);
this->getIContextOwnAircraft()->updatePilot(currentServer.getUser());
this->getIContextOwnAircraft()->updateOwnAircraftPilot(currentServer.getUser());
// Login
msg = this->getIContextNetwork()->connectToNetwork(currentServer, static_cast<uint>(mode));
@@ -470,7 +470,7 @@ namespace BlackGui
// set value in backend
this->mergeGuiIcaoValues(icao);
this->getIContextOwnAircraft()->updateIcaoData(icao);
this->getIContextOwnAircraft()->updateOwnIcaoData(icao);
// update GUI
this->setGuiIcaoValues(icao, false);