Skeleton for scrapers.

This commit is contained in:
Aloshi 2013-09-16 14:53:24 -05:00
parent e823592660
commit fe991e1b86
4 changed files with 44 additions and 0 deletions

View file

@ -175,6 +175,7 @@ set(ES_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiInputConfig.h
${CMAKE_CURRENT_SOURCE_DIR}/src/components/GuiMenu.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/pugixml.hpp
${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/GuiMenu.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/resources/ResourceManager.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/resources/TextureResource.cpp

View file

@ -0,0 +1,9 @@
#include "GamesDBScraper.h"
std::vector<MetaDataList> GamesDBScraper::getResults(ScraperSearchParams params)
{
std::vector<MetaDataList> results;
return results;
}

View 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
View 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;
};