2012-01-19 07:44:59 -06:00
|
|
|
#ifndef CLIENT_H
|
|
|
|
#define CLIENT_H
|
|
|
|
|
|
|
|
#include <queue>
|
2012-01-19 14:10:05 -06:00
|
|
|
#include <vector>
|
|
|
|
|
2012-01-19 11:59:00 -06:00
|
|
|
#include "Config.h"
|
2012-01-19 07:44:59 -06:00
|
|
|
#include "HTTP.h"
|
|
|
|
#include "search/Thumbnail.h"
|
2012-01-19 14:10:05 -06:00
|
|
|
#include "search/Save.h"
|
2012-01-19 07:44:59 -06:00
|
|
|
#include "Singleton.h"
|
|
|
|
|
|
|
|
class Client: public Singleton<Client>
|
|
|
|
{
|
|
|
|
private:
|
2012-01-19 14:10:05 -06:00
|
|
|
std::string lastError;
|
2012-01-19 07:44:59 -06:00
|
|
|
int thumbnailCacheNextID;
|
2012-01-19 11:59:00 -06:00
|
|
|
Thumbnail * thumbnailCache[THUMB_CACHE_SIZE];
|
|
|
|
void * activeThumbRequests[IMGCONNS];
|
|
|
|
int activeThumbRequestTimes[IMGCONNS];
|
|
|
|
int activeThumbRequestCompleteTimes[IMGCONNS];
|
|
|
|
std::string activeThumbRequestIDs[IMGCONNS];
|
2012-01-19 07:44:59 -06:00
|
|
|
public:
|
|
|
|
Client();
|
|
|
|
~Client();
|
|
|
|
void ClearThumbnailRequests();
|
2012-01-21 12:51:28 -06:00
|
|
|
std::vector<Save*> * SearchSaves(int start, int count, string query, string sort, int & resultCount);
|
2012-01-19 07:44:59 -06:00
|
|
|
Thumbnail * GetThumbnail(int saveID, int saveDate);
|
2012-01-19 14:10:05 -06:00
|
|
|
std::string GetLastError() { return lastError; }
|
2012-01-19 07:44:59 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CLIENT_H
|