1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
#ifndef MOEBOORUCLIENT_H #define MOEBOORUCLIENT_H #include <curl/curl.h> #include <QString> #include <QThread> #include <QDir> #include <sstream> #include "nwutils.h" #include "curlresult.h" #include "tvshow.h" #include "filedownloadthread.h" #include "wallpaperdownloadclient.h" namespace Moebooru { using WallpaperDownload::FetchThread; using WallpaperDownload::Rating; using WallpaperDownload::SearchResult; using WallpaperDownload::Entry; class Client : public WallpaperDownload::Client { public: Client(QString baseUrl, int limit = 10, Rating ratingFilter = WallpaperDownload::ratingSafe); protected: Entry parseEntry(nw::Describer *de); SearchResult parseSearchResult(std::stringstream &, int limit); CURL* curlClient(QString tag, CurlResult& userdata, const unsigned int page = 1); }; } #endif // MOEBOORUCLIENT_H