From eb0208fffa632c654f1287ac43cd3c12e3936e5c Mon Sep 17 00:00:00 2001 From: Sude Date: Sun, 13 Oct 2013 12:12:42 +0300 Subject: [PATCH] API changes: "#updated" flag is replaced by "notificated" flag --- include/api.h | 4 ++-- src/api.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/api.h b/include/api.h index 3fcbc85..312d220 100644 --- a/include/api.h +++ b/include/api.h @@ -19,8 +19,8 @@ extern "C" { class gameFile { public: - gameFile(const bool& t_updated, const std::string& t_id, const std::string& t_name, const std::string& t_path, const std::string& t_size, const unsigned int& t_language = GlobalConstants::LANGUAGE_EN); - bool updated; + gameFile(const int& t_updated, const std::string& t_id, const std::string& t_name, const std::string& t_path, const std::string& t_size, const unsigned int& t_language = GlobalConstants::LANGUAGE_EN); + int updated; std::string id; std::string name; std::string path; diff --git a/src/api.cpp b/src/api.cpp index 97c9441..a883dea 100644 --- a/src/api.cpp +++ b/src/api.cpp @@ -18,7 +18,7 @@ size_t writeMemoryCallback(char *ptr, size_t size, size_t nmemb, void *userp) { return count; } -gameFile::gameFile(const bool& t_updated, const std::string& t_id, const std::string& t_name, const std::string& t_path, const std::string& t_size, const unsigned int& t_language) +gameFile::gameFile(const int& t_updated, const std::string& t_id, const std::string& t_name, const std::string& t_path, const std::string& t_size, const unsigned int& t_language) { this->updated = t_updated; this->id = t_id; @@ -309,7 +309,7 @@ gameDetails API::getGameDetails(const std::string& game_name, const unsigned int unsigned int language = installers[i].second; game.installers.push_back( - gameFile( installer["#updated"].isBool() ? installer["#updated"].asBool() : false, + gameFile( installer["notificated"].isInt() ? installer["notificated"].asInt() : std::stoi(installer["notificated"].asString()), installer["id"].isInt() ? std::to_string(installer["id"].asInt()) : installer["id"].asString(), installer["name"].asString(), installer["link"].asString(),