VizKit
3.3.7
|
Providing networking functionality. More...
#include <VisualDownloadQueue.h>
Classes | |
struct | DownloadItem |
A DownloadItem is an item of the download queue where data is retrieved from a remote source. More... | |
Static Public Member Functions | |
static void | dispose (void) |
Disposes the VisualDownloadQueue. | |
static bool | addToDownloadQueue (const VisualString &aURL, VisualObject *theRequestingObject, const VisualItemIdentifier &identifier) |
Adds a URL to the download queue. | |
static bool | removeDownload (const VisualItemIdentifier &identifier) |
Removes an item from the download queue. | |
static bool | removeDownloadForObject (const VisualItemIdentifier &visualObjectIdentifier) |
Removes an item from the download queue. | |
static bool | startDownloadThreadIfNeeded (void) |
If download items are waiting to be fetched, the download process is started. | |
static void | setDownloadIsProcessingToFalse (void) |
Set the internal variable downloadIsProcessing to false. | |
Private Types | |
typedef std::vector< DownloadItem > | DownloadQueue |
An downloadQueue is a queue of scheduled and running downloads. | |
typedef DownloadQueue::iterator | DownloadQueueIterator |
An DownloadQueueIterator is an iterator of a DownloadQueue. | |
typedef std::vector< DownloadItem > | DownloadAddRequestQueue |
An DownloadAddRequestQueue is a queue of DownloadItems which are supposed to be added as soon as possible. | |
typedef DownloadAddRequestQueue::iterator | DownloadAddRequestQueueIterator |
An DownloadAddRequestQueueIterator is an iterator of a DownloadAddRequestQueue. | |
typedef std::vector < VisualItemIdentifier > | DownloadStopRequestQueue |
An DownloadStopRequestQueue is a queue of VisualItemIdentifiers of DownloadItems which are supposed to be stopped as soon as possible. | |
typedef DownloadStopRequestQueue::iterator | DownloadStopRequestQueueIterator |
An DownloadStopRequestQueueIterator is an iterator of a DownloadStopRequestQueue. | |
Private Member Functions | |
VisualDownloadQueue () | |
The constructor. | |
~VisualDownloadQueue () | |
The destructor. | |
VisualDownloadQueue (const VisualDownloadQueue &other) | |
Copy constructor. | |
VisualDownloadQueue & | operator= (const VisualDownloadQueue &other) |
Assignment operator. | |
bool | shouldStartDownload (void) |
Answers the question whether there are download items waiting to be fetched. | |
Static Private Member Functions | |
static VisualDownloadQueue * | getInstance (void) |
Constructs a VisualDownloadQueue. | |
Private Attributes | |
DownloadQueue | downloadQueue |
The queue with the scheduled and running downloads of remote data. | |
DownloadAddRequestQueue | downloadAddRequestQueue |
The queue with the add requests. | |
bool | downloadAddRequestQueueIsEmpty |
Synchronized flag which answers whether the downloadAddRequestQueue is empty or not. | |
DownloadStopRequestQueue | downloadStopRequestQueue |
The queue with the stop requests. | |
bool | downloadIsProcessing |
Answers the question whether currently download data is being fetched. | |
bool | stopDownloadProcess |
Signal to stop the download process by external thread. | |
Static Private Attributes | |
static VisualDownloadQueue * | theVisualDownloadQueue = NULL |
VisualDownloadQueue is a singleton class. |
Providing networking functionality.
typedef std::vector<DownloadItem> VizKit::VisualDownloadQueue::DownloadAddRequestQueue [private] |
An DownloadAddRequestQueue is a queue of DownloadItems which are supposed to be added as soon as possible.
typedef DownloadAddRequestQueue::iterator VizKit::VisualDownloadQueue::DownloadAddRequestQueueIterator [private] |
An DownloadAddRequestQueueIterator is an iterator of a DownloadAddRequestQueue.
typedef std::vector<DownloadItem> VizKit::VisualDownloadQueue::DownloadQueue [private] |
An downloadQueue is a queue of scheduled and running downloads.
typedef DownloadQueue::iterator VizKit::VisualDownloadQueue::DownloadQueueIterator [private] |
An DownloadQueueIterator is an iterator of a DownloadQueue.
typedef std::vector<VisualItemIdentifier> VizKit::VisualDownloadQueue::DownloadStopRequestQueue [private] |
An DownloadStopRequestQueue is a queue of VisualItemIdentifiers of DownloadItems which are supposed to be stopped as soon as possible.
typedef DownloadStopRequestQueue::iterator VizKit::VisualDownloadQueue::DownloadStopRequestQueueIterator [private] |
An DownloadStopRequestQueueIterator is an iterator of a DownloadStopRequestQueue.
VisualDownloadQueue::VisualDownloadQueue | ( | ) | [private] |
The constructor.
VisualDownloadQueue is a singleton class. The constructor is private. New instance of class can only be created internally.
VisualDownloadQueue::~VisualDownloadQueue | ( | ) | [private] |
The destructor.
VisualDownloadQueue is a singleton class. The destructor is private. Instance of class can only be destructed internally.
VizKit::VisualDownloadQueue::VisualDownloadQueue | ( | const VisualDownloadQueue & | other | ) | [private] |
Copy constructor.
other | Another VisualNetwork. |
bool VisualDownloadQueue::addToDownloadQueue | ( | const VisualString & | aURL, |
VisualObject * | theRequestingObject, | ||
const VisualItemIdentifier & | identifier | ||
) | [static] |
Adds a URL to the download queue.
aURL | The URL from where to fetch the data. |
theRequestingObject | The object requesting remote data. |
identifier | An identifier of the download process. |
void VisualDownloadQueue::dispose | ( | void | ) | [static] |
Disposes the VisualDownloadQueue.
VisualDownloadQueue * VisualDownloadQueue::getInstance | ( | void | ) | [static, private] |
Constructs a VisualDownloadQueue.
The VisualDownloadQueue acts as a singleton. Returns a pointer to the initialised VisualDownloadQueue.
VisualDownloadQueue& VizKit::VisualDownloadQueue::operator= | ( | const VisualDownloadQueue & | other | ) | [private] |
Assignment operator.
bool VisualDownloadQueue::removeDownload | ( | const VisualItemIdentifier & | identifier | ) | [static] |
Removes an item from the download queue.
identifier | Identifier of the download item. |
bool VisualDownloadQueue::removeDownloadForObject | ( | const VisualItemIdentifier & | visualObjectIdentifier | ) | [static] |
Removes an item from the download queue.
visualObjectIdentifier | Identifier of the object. |
void VisualDownloadQueue::setDownloadIsProcessingToFalse | ( | void | ) | [static] |
Set the internal variable downloadIsProcessing to false.
bool VisualDownloadQueue::shouldStartDownload | ( | void | ) | [private] |
Answers the question whether there are download items waiting to be fetched.
bool VisualDownloadQueue::startDownloadThreadIfNeeded | ( | void | ) | [static] |
If download items are waiting to be fetched, the download process is started.
The queue with the add requests.
bool VizKit::VisualDownloadQueue::downloadAddRequestQueueIsEmpty [private] |
Synchronized flag which answers whether the downloadAddRequestQueue is empty or not.
bool VizKit::VisualDownloadQueue::downloadIsProcessing [private] |
Answers the question whether currently download data is being fetched.
The queue with the scheduled and running downloads of remote data.
The queue with the stop requests.
bool VizKit::VisualDownloadQueue::stopDownloadProcess [private] |
Signal to stop the download process by external thread.
VisualDownloadQueue * VisualDownloadQueue::theVisualDownloadQueue = NULL [static, private] |
VisualDownloadQueue is a singleton class.
Pointer to private instance is handled internally.