2011-02-03 22:46:54 +01:00
|
|
|
#ifndef IMAGE_DOWNLOADER_H_
|
|
|
|
#define IMAGE_DOWNLOADER_H_
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
#include "network/http.h"
|
|
|
|
|
|
|
|
class ImageDownloader
|
|
|
|
{
|
2011-07-26 00:28:22 +02:00
|
|
|
public:
|
|
|
|
static void DownloadImages();
|
|
|
|
private:
|
|
|
|
void Start();
|
|
|
|
void SetChoices(int c) { choices = c; }
|
|
|
|
void FindMissingImages();
|
|
|
|
void FindMissing(const char *writepath, const char *downloadURL, const char *backupURL, const char *progressTitle);
|
|
|
|
int DownloadProcess(int TotalDownloadCount);
|
|
|
|
struct block DownloadImage(const char * url, const char * gameID);
|
|
|
|
void CreateCSVLog();
|
2011-02-03 22:46:54 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
struct ImageLink
|
|
|
|
{
|
|
|
|
std::string gameID;
|
|
|
|
const char *downloadURL;
|
|
|
|
const char *backupURL;
|
|
|
|
const char *writepath;
|
|
|
|
const char *progressTitle;
|
|
|
|
};
|
|
|
|
int choices;
|
|
|
|
u32 MissingImagesCount;
|
|
|
|
std::vector<ImageLink> MissingImages;
|
2011-02-03 22:46:54 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|