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 GAMEDETAILS_H
|
|
|
|
#define GAMEDETAILS_H
|
|
|
|
|
|
|
|
#include "globalconstants.h"
|
2017-02-17 10:14:28 +01:00
|
|
|
#include "globals.h"
|
2014-09-19 19:23:21 +02:00
|
|
|
#include "gamefile.h"
|
2014-09-19 20:08:46 +02:00
|
|
|
#include "config.h"
|
2016-02-15 13:27:29 +01:00
|
|
|
#include "util.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
|
|
|
|
|
|
|
class gameDetails
|
|
|
|
{
|
|
|
|
public:
|
2014-09-19 20:08:46 +02:00
|
|
|
gameDetails();
|
2014-09-19 19:23:21 +02:00
|
|
|
std::vector<gameFile> extras;
|
|
|
|
std::vector<gameFile> installers;
|
|
|
|
std::vector<gameFile> patches;
|
|
|
|
std::vector<gameFile> languagepacks;
|
|
|
|
std::vector<gameDetails> dlcs;
|
|
|
|
std::string gamename;
|
2017-02-17 10:14:28 +01:00
|
|
|
std::string product_id;
|
2014-09-19 19:23:21 +02:00
|
|
|
std::string title;
|
2015-03-19 08:50:50 +01:00
|
|
|
std::string icon;
|
|
|
|
std::string serials;
|
2016-03-06 14:45:22 +01:00
|
|
|
std::string changelog;
|
2016-02-20 14:34:51 +01:00
|
|
|
void filterWithPriorities(const gameSpecificConfig& config);
|
2017-02-17 10:14:28 +01:00
|
|
|
void makeFilepaths(const DirectoryConfig& config);
|
2015-03-19 08:50:50 +01:00
|
|
|
std::string getSerialsFilepath();
|
2016-03-06 14:45:22 +01:00
|
|
|
std::string getChangelogFilepath();
|
2014-10-16 10:05:57 +02:00
|
|
|
Json::Value getDetailsAsJson();
|
2016-12-20 21:29:56 +01:00
|
|
|
std::vector<gameFile> getGameFileVector();
|
2019-03-01 13:09:52 +01:00
|
|
|
std::vector<gameFile> getGameFileVectorFiltered(const unsigned int& iType);
|
2014-09-19 20:08:46 +02:00
|
|
|
virtual ~gameDetails();
|
2014-09-19 19:23:21 +02:00
|
|
|
protected:
|
2016-02-20 14:34:51 +01:00
|
|
|
void filterListWithPriorities(std::vector<gameFile>& list, const gameSpecificConfig& config);
|
2014-09-19 19:23:21 +02:00
|
|
|
private:
|
2015-03-19 08:50:50 +01:00
|
|
|
std::string serialsFilepath;
|
2016-03-06 14:45:22 +01:00
|
|
|
std::string changelogFilepath;
|
2014-09-19 19:23:21 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GAMEDETAILS_H
|