include/GUI/DownloadJob.hpp

Go to the documentation of this file.
00001 #ifndef hpp_CPP_UZIDownloadJob_CPP_hpp
00002 #define hpp_CPP_UZIDownloadJob_CPP_hpp
00003 
00004 // We need cache declaration
00005 #include "../Cache/CacheEngine.hpp"
00006 // We need HTTP client stuff too
00007 #include "HTTPClient.hpp"
00008 // We need base stuff
00009 #include "UZIBase.hpp"
00010 
00011 namespace UZI
00012 {
00015     class DownloadJob  : public juce::ThreadPoolJob
00016     {
00017         // Construction and destruction
00018     public:
00020         DownloadJob() : ThreadPoolJob(JUCE_T("Waiting for download")), item(0), communication(0) {}
00024         ~DownloadJob() { if (item) item->Suicide(); item = 0; }
00025 
00026         // Interface
00027     public:
00029         virtual juce::ThreadPoolJob::JobStatus runJob ();
00032         inline bool queueItemToFetch(volatile Cache::Item * _item, juce::String * commTo = 0)  { if (isRunning() || item) return false; item = _item; communication = commTo; return true; }
00033 
00034         // Members
00035     private:
00037         volatile Cache::Item *  item;
00039         HTTPClient              client;
00041         juce::String *          communication;
00042 
00043     };
00044 }
00045 
00046 #endif  

(C) An X-Ryl669 project 2007

This document describes Unlimited Zooming Interface source code. UZI stands for Unlimited Zooming Interface, and source code license is