lgogdownloader/include/blacklist.h
Sude 34e3af3438 Ignore DLC count information for specific games
Ignore DLC count information for specific games by using a list of games that we know have DLC.
GOG reports wrong DLC count information for many games. By using a list of games that we know have DLC we can ignore DLC count info that GOG provides for those games.
User can use local list ($XDG_CONFIG_HOME/lgogdownloader/game_has_dlc.txt) or use remote list by using the new "--dlc-list" option.
The list uses same format as blacklist.
2016-11-05 14:51:52 +02:00

41 lines
1.2 KiB
C++

/* 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. */
#ifndef BLACKLIST_H__
#define BLACKLIST_H__
#include <boost/regex.hpp>
#include <string>
#include <vector>
class Config;
class gameFile;
class BlacklistItem {
public:
unsigned int linenr; // where the blacklist item is defined in blacklist.txt
unsigned int flags;
std::string source; // source representation of the item
boost::regex regex;
};
class Blacklist
{
public:
Blacklist() {};
void initialize(const std::vector<std::string>& lines);
bool isBlacklisted(const std::string& path);
bool isBlacklisted(const std::string& path, const std::string& gamename, std::string subdirectory = "");
std::vector<BlacklistItem>::size_type size() const { return blacklist_.size(); }
bool empty() { return blacklist_.empty(); }
private:
std::vector<BlacklistItem> blacklist_;
};
#endif // BLACKLIST_H_