Refactor NvPairingManager, NvComputer, and NvHTTP to reduce passing of addresses

This commit is contained in:
Cameron Gutman
2021-07-02 17:14:48 -05:00
parent bee8378795
commit 5afab126b3
9 changed files with 48 additions and 17 deletions

View File

@@ -87,9 +87,9 @@ void NvComputer::sortAppList()
});
}
NvComputer::NvComputer(QString address, QString serverInfo, QSslCertificate serverCert)
NvComputer::NvComputer(NvHTTP& http, QString serverInfo)
{
this->serverCert = serverCert;
this->serverCert = http.serverCert();
this->hasCustomName = false;
this->name = NvHTTP::getXmlString(serverInfo, "hostname");
@@ -142,7 +142,7 @@ NvComputer::NvComputer(QString address, QString serverInfo, QSslCertificate serv
this->appVersion = NvHTTP::getXmlString(serverInfo, "appversion");
this->gfeVersion = NvHTTP::getXmlString(serverInfo, "GfeVersion");
this->gpuModel = NvHTTP::getXmlString(serverInfo, "gputype");
this->activeAddress = address;
this->activeAddress = http.address();
this->state = NvComputer::CS_ONLINE;
this->pendingQuit = false;
this->isSupportedServerVersion = CompatFetcher::isGfeVersionSupported(this->gfeVersion);