2016-04-18 20:39:31 +03:00
|
|
|
/* This program is free software. It comes without any warranty, to
|
|
|
|
* the extent permitted by applicable law. You can redistribute it
|
|
|
|
* and/or modify it under the terms of the Do What The Fuck You Want
|
|
|
|
* To Public License, Version 2, as published by Sam Hocevar. See
|
|
|
|
* http://www.wtfpl.net/ for more details. */
|
|
|
|
|
2014-09-19 20:23:21 +03:00
|
|
|
#include "gamefile.h"
|
|
|
|
|
2014-10-16 11:05:57 +03:00
|
|
|
gameFile::gameFile()
|
|
|
|
{
|
2016-04-25 18:14:04 +03:00
|
|
|
this->platform = GlobalConstants::PLATFORM_WINDOWS;
|
|
|
|
this->language = GlobalConstants::LANGUAGE_EN;
|
|
|
|
this->silent = 0;
|
|
|
|
this->type = 0;
|
2014-10-16 11:05:57 +03:00
|
|
|
}
|
|
|
|
|
2014-09-19 20:23:21 +03:00
|
|
|
gameFile::~gameFile()
|
|
|
|
{
|
|
|
|
//dtor
|
|
|
|
}
|
2014-09-19 21:08:46 +03:00
|
|
|
|
|
|
|
void gameFile::setFilepath(const std::string& path)
|
|
|
|
{
|
|
|
|
this->filepath = path;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string gameFile::getFilepath()
|
|
|
|
{
|
|
|
|
return this->filepath;
|
|
|
|
}
|
2014-10-16 11:05:57 +03:00
|
|
|
|
|
|
|
Json::Value gameFile::getAsJson()
|
|
|
|
{
|
|
|
|
Json::Value json;
|
|
|
|
|
|
|
|
json["updated"] = this->updated;
|
|
|
|
json["id"] = this->id;
|
|
|
|
json["name"] = this->name;
|
|
|
|
json["path"] = this->path;
|
|
|
|
json["size"] = this->size;
|
|
|
|
json["platform"] = this->platform;
|
|
|
|
json["language"] = this->language;
|
|
|
|
json["silent"] = this->silent;
|
2016-04-25 18:14:04 +03:00
|
|
|
json["gamename"] = this->gamename;
|
|
|
|
json["type"] = this->type;
|
2017-09-13 16:46:46 +03:00
|
|
|
json["galaxy_downlink_json_url"] = this->galaxy_downlink_json_url;
|
2014-10-16 11:05:57 +03:00
|
|
|
|
|
|
|
return json;
|
|
|
|
}
|