refs #650 Implement CAirportDataReader

* Add BlackCore::CAirportDataReader class
* Add cache traits for airport list
* Add corresponding WebReaderFlag
* Add CAirport::convertFromDatabaseJson()
* Add CApplication::headerFromNetwork() to handle HTTP HEAD method
This commit is contained in:
Michał Garapich
2016-05-20 19:51:25 +02:00
parent a87a4a7ef1
commit 1032b2f506
17 changed files with 365 additions and 6 deletions

View File

@@ -44,5 +44,19 @@ namespace BlackMisc
return this->findFirstByOrDefault(&CAirport::getIcao, icao, ifNotFound);
}
CAirportList CAirportList::fromDatabaseJson(const QJsonArray &json)
{
CAirportList airports;
for (const QJsonValue& value: json)
{
QJsonObject object = value.toObject();
CAirport airport;
airport.fromDatabaseJson(object);
airports.push_back(airport);
}
return airports;
}
} // namespace
} // namespace