mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
Skeleton for scrapers.
This commit is contained in:
parent
e823592660
commit
fe991e1b86
|
@ -175,6 +175,7 @@ set(ES_HEADERS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiInputConfig.h
|
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiInputConfig.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiMenu.h
|
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiMenu.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiSettingsMenu.h
|
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiSettingsMenu.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBScraper.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/pugiXML/pugiconfig.hpp
|
${CMAKE_CURRENT_SOURCE_DIR}/src/pugiXML/pugiconfig.hpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/pugiXML/pugixml.hpp
|
${CMAKE_CURRENT_SOURCE_DIR}/src/pugiXML/pugixml.hpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/ResourceManager.h
|
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/ResourceManager.h
|
||||||
|
@ -223,6 +224,7 @@ set(ES_SOURCES
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiInputConfig.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiInputConfig.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiMenu.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiMenu.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiSettingsMenu.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiSettingsMenu.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/scrapers/GamesDBScraper.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/pugiXML/pugixml.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/src/pugiXML/pugixml.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/ResourceManager.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/ResourceManager.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureResource.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureResource.cpp
|
||||||
|
|
9
src/scrapers/GamesDBScraper.cpp
Normal file
9
src/scrapers/GamesDBScraper.cpp
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#include "GamesDBScraper.h"
|
||||||
|
|
||||||
|
std::vector<MetaDataList> GamesDBScraper::getResults(ScraperSearchParams params)
|
||||||
|
{
|
||||||
|
std::vector<MetaDataList> results;
|
||||||
|
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
10
src/scrapers/GamesDBScraper.h
Normal file
10
src/scrapers/GamesDBScraper.h
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Scraper.h"
|
||||||
|
|
||||||
|
class GamesDBScraper : public IScraper
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
std::vector<MetaDataList> getResults(ScraperSearchParams params) override;
|
||||||
|
};
|
||||||
|
|
23
src/scrapers/Scraper.h
Normal file
23
src/scrapers/Scraper.h
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../MetaData.h"
|
||||||
|
#include "../SystemData.h"
|
||||||
|
#include "../GameData.h"
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
struct ScraperSearchParams
|
||||||
|
{
|
||||||
|
SystemData* sys;
|
||||||
|
GameData* game;
|
||||||
|
|
||||||
|
std::string nameOverride;
|
||||||
|
bool async;
|
||||||
|
};
|
||||||
|
|
||||||
|
class IScraper
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
//Get a list of potential results.
|
||||||
|
virtual std::vector<MetaDataList> getResults(ScraperSearchParams params) = 0;
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in a new issue