2016-04-18 19:39:31 +02: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 19:23:21 +02:00
|
|
|
#ifndef GAMEFILE_H
|
|
|
|
#define GAMEFILE_H
|
|
|
|
|
|
|
|
#include "globalconstants.h"
|
2017-02-17 10:14:28 +01:00
|
|
|
#include "globals.h"
|
2014-09-19 19:23:21 +02:00
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <vector>
|
2015-01-22 08:22:48 +01:00
|
|
|
#include <json/json.h>
|
2014-09-19 19:23:21 +02:00
|
|
|
|
2016-04-25 17:14:04 +02:00
|
|
|
// Game file types
|
|
|
|
const unsigned int GFTYPE_INSTALLER = 1 << 0;
|
|
|
|
const unsigned int GFTYPE_EXTRA = 1 << 1;
|
|
|
|
const unsigned int GFTYPE_PATCH = 1 << 2;
|
|
|
|
const unsigned int GFTYPE_LANGPACK = 1 << 3;
|
2016-12-20 21:29:56 +01:00
|
|
|
const unsigned int GFTYPE_DLC = 1 << 4;
|
2016-04-25 17:14:04 +02:00
|
|
|
|
2014-09-19 19:23:21 +02:00
|
|
|
class gameFile
|
|
|
|
{
|
|
|
|
public:
|
2014-10-16 10:05:57 +02:00
|
|
|
gameFile();
|
2014-09-19 19:23:21 +02:00
|
|
|
int updated;
|
2016-04-25 17:14:04 +02:00
|
|
|
std::string gamename;
|
2014-09-19 19:23:21 +02:00
|
|
|
std::string id;
|
|
|
|
std::string name;
|
|
|
|
std::string path;
|
|
|
|
std::string size;
|
2017-09-13 15:46:46 +02:00
|
|
|
std::string galaxy_downlink_json_url;
|
2020-11-27 20:46:12 +01:00
|
|
|
std::string version;
|
2014-09-19 19:23:21 +02:00
|
|
|
unsigned int platform;
|
|
|
|
unsigned int language;
|
2016-04-25 17:14:04 +02:00
|
|
|
unsigned int type;
|
2014-10-26 10:47:13 +01:00
|
|
|
int score;
|
2014-09-19 19:23:21 +02:00
|
|
|
int silent;
|
2014-09-19 20:08:46 +02:00
|
|
|
void setFilepath(const std::string& path);
|
|
|
|
std::string getFilepath();
|
2014-10-16 10:05:57 +02:00
|
|
|
Json::Value getAsJson();
|
2014-09-19 19:23:21 +02:00
|
|
|
virtual ~gameFile();
|
|
|
|
protected:
|
|
|
|
private:
|
2014-09-19 20:08:46 +02:00
|
|
|
std::string filepath;
|
2014-09-19 19:23:21 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GAMEFILE_H
|