diff --git a/src/client/ThumbnailBroker.cpp b/src/client/ThumbnailBroker.cpp index b0eaa9265..8aae585c3 100644 --- a/src/client/ThumbnailBroker.cpp +++ b/src/client/ThumbnailBroker.cpp @@ -11,57 +11,6 @@ //Asynchronous Thumbnail render & request processing -class ThumbnailBroker::ThumbnailSpec -{ -public: - int Width, Height; - ThumbnailListener * CompletedListener; - ThumbnailSpec(int width, int height, ThumbnailListener * completedListener) : - Width(width), Height(height), CompletedListener(completedListener) {} -}; - -class ThumbnailBroker::ThumbnailID -{ -public: - int SaveID, SaveDate; - bool operator ==(const ThumbnailID & second) - { - return SaveID == second.SaveID && SaveDate == second.SaveDate; - } - ThumbnailID(int saveID, int saveDate) : SaveID(saveID), SaveDate(saveDate) {} - ThumbnailID() : SaveID(0), SaveDate(0) {} -}; - -class ThumbnailBroker::ThumbnailRequest -{ -public: - bool Complete; - void * HTTPContext; - int RequestTime; - - ThumbnailID ID; - std::vector SubRequests; - - ThumbnailRequest(int saveID, int saveDate, int width, int height, ThumbnailListener * completedListener) : - ID(saveID, saveDate), Complete(false), HTTPContext(NULL), RequestTime(0) - { - SubRequests.push_back(ThumbnailSpec(width, height, completedListener)); - } - ThumbnailRequest() : Complete(false), HTTPContext(NULL), RequestTime(0) {} -}; - -class ThumbnailBroker::ThumbRenderRequest -{ -public: - int Width, Height; - bool Decorations; - GameSave * Save; - ThumbnailListener * CompletedListener; - ThumbRenderRequest(GameSave * save, bool decorations, int width, int height, ThumbnailListener * completedListener) : - Save(save), Width(width), Height(height), CompletedListener(completedListener), Decorations(decorations) {} - ThumbRenderRequest() : Save(0), Decorations(true), Width(0), Height(0), CompletedListener(NULL) {} -}; - ThumbnailBroker::ThumbnailBroker() { thumbnailQueueRunning = false; diff --git a/src/client/ThumbnailBroker.h b/src/client/ThumbnailBroker.h index 0bb7fcead..dfdbfd5b9 100644 --- a/src/client/ThumbnailBroker.h +++ b/src/client/ThumbnailBroker.h @@ -14,10 +14,56 @@ class ThumbnailListener; class ThumbnailBroker: public Singleton { private: - class ThumbnailID; - class ThumbnailRequest; - class ThumbnailSpec; - class ThumbRenderRequest; + class ThumbnailSpec + { + public: + int Width, Height; + ThumbnailListener * CompletedListener; + ThumbnailSpec(int width, int height, ThumbnailListener * completedListener) : + Width(width), Height(height), CompletedListener(completedListener) {} + }; + + class ThumbnailID + { + public: + int SaveID, SaveDate; + bool operator ==(const ThumbnailID & second) + { + return SaveID == second.SaveID && SaveDate == second.SaveDate; + } + ThumbnailID(int saveID, int saveDate) : SaveID(saveID), SaveDate(saveDate) {} + ThumbnailID() : SaveID(0), SaveDate(0) {} + }; + + class ThumbnailRequest + { + public: + bool Complete; + void * HTTPContext; + int RequestTime; + + ThumbnailID ID; + std::vector SubRequests; + + ThumbnailRequest(int saveID, int saveDate, int width, int height, ThumbnailListener * completedListener) : + ID(saveID, saveDate), Complete(false), HTTPContext(NULL), RequestTime(0) + { + SubRequests.push_back(ThumbnailSpec(width, height, completedListener)); + } + ThumbnailRequest() : Complete(false), HTTPContext(NULL), RequestTime(0) {} + }; + + class ThumbRenderRequest + { + public: + int Width, Height; + bool Decorations; + GameSave * Save; + ThumbnailListener * CompletedListener; + ThumbRenderRequest(GameSave * save, bool decorations, int width, int height, ThumbnailListener * completedListener) : + Save(save), Width(width), Height(height), CompletedListener(completedListener), Decorations(decorations) {} + ThumbRenderRequest() : Save(0), Decorations(true), Width(0), Height(0), CompletedListener(NULL) {} + }; //Thumbnail retreival /*int thumbnailCacheNextID;