lgogdownloader/include/gamedetails.h
Sude 9235ee8b4a Add support for caching game details
Helps with large libraries when running the downloader multiple times.
Getting game details for many games takes a long time. Caching the game details makes the process much faster for subsequent runs.

Game details are cached to "$XDG_CACHE_HOME/lgogdownloader/gamedetails.json"
--update-cache creates and updates the cache.
--use-cache enables loading game details from cache.
--cache-valid specifies how long cached game details are considered valid
2014-10-16 11:05:57 +03:00

32 lines
707 B
C++

#ifndef GAMEDETAILS_H
#define GAMEDETAILS_H
#include "globalconstants.h"
#include "gamefile.h"
#include "config.h"
#include <iostream>
#include <vector>
#include <jsoncpp/json/json.h>
class gameDetails
{
public:
gameDetails();
std::vector<gameFile> extras;
std::vector<gameFile> installers;
std::vector<gameFile> patches;
std::vector<gameFile> languagepacks;
std::vector<gameDetails> dlcs;
std::string gamename;
std::string title;
std::string icon;;
void makeFilepaths(const Config& config);
Json::Value getDetailsAsJson();
virtual ~gameDetails();
protected:
private:
};
#endif // GAMEDETAILS_H