UZI::DocumentFetcher Class Reference

#include <DocumentFetcher.hpp>

Inheritance diagram for UZI::DocumentFetcher:

Cache::RequiredFetcherImplementation List of all members.

Detailed Description

The document fetcher used by the browser.


Public Member Functions

 DocumentFetcher ()
virtual uint32 isItemFetched (volatile Item &item) const =0
 Check if all data for a previously queued item has been received.
virtual uint32 isItemFetched (volatile Cache::Item &item) const
 Check if all data for a previously queued item has been received.
virtual bool queueDocumentToFetch (volatile Item &item, void *opaque=0)=0
 Add a document to fetch, as soon as possible, to the query list.
virtual bool queueDocumentToFetch (volatile Cache::Item &item, void *opaque=0)
 Add a document to fetch, as soon as possible, to the query list.
 ~DocumentFetcher ()


Constructor & Destructor Documentation

UZI::DocumentFetcher::DocumentFetcher (  )  [inline]

UZI::DocumentFetcher::~DocumentFetcher (  )  [inline]


Member Function Documentation

virtual uint32 Cache::RequiredFetcherImplementation::isItemFetched ( volatile Item item  )  const [pure virtual, inherited]

Check if all data for a previously queued item has been received.

The holder will call this method to check if an item is fully available, or is being fetched. It's the fetcher role to return the state of the fetching.

Warning:
This call must not block. This means that if the fetcher is multithreaded, it must not lock the item lock entirely while fetching it, as this call will most probably requires locking it too, to check if it's there.
If the fetcher is single threaded, then this method could return a boolean state (0 or item's size), and the item data should be set in an atomic way (and in a specific order => type first, then data, then size, then deleter if required)

Parameters:
item A reference on an item to check reception
Returns:
the fetched size (or -1 if not fetched yet, or single threaded). The holder use this size to estimate the remaining time to wait.

virtual uint32 UZI::DocumentFetcher::isItemFetched ( volatile Cache::Item item  )  const [inline, virtual]

Check if all data for a previously queued item has been received.

The holder will call this method to check if an item is fully available, or is being fetched. It's the fetcher role to return the state of the fetching.

Warning:
This call must not block. This means that if the fetcher is multithreaded, it must not lock the item lock entirely while fetching it, as this call will most probably requires locking it too, to check if it's there.
If the fetcher is single threaded, then this method could return a boolean state (0 or item's size), and the item data should be set in an atomic way (and in a specific order => type first, then data, then size, then deleter if required)

Parameters:
item A reference on an item to check reception
Returns:
the fetched size (or -1 if not fetched yet, or single threaded). The holder use this size to estimate the remaining time to wait.

virtual bool Cache::RequiredFetcherImplementation::queueDocumentToFetch ( volatile Item item,
void *  opaque = 0 
) [pure virtual, inherited]

Add a document to fetch, as soon as possible, to the query list.

The holder will call this method when the cache item is missed (either item's lifetime expired, or on not found event). It's possible to queue the fetching on a thread pool. The cache will then wait until a signal is sent to it, and returns the fetched item's data on success.

Parameters:
item A reference on an item to fetch as soon as possible
opaque An opaque object that could be used to pass any structure from the cache to the fetcher
Returns:
true if it's possible to fetch it, even if done later on, false on error (like network error)

virtual bool UZI::DocumentFetcher::queueDocumentToFetch ( volatile Cache::Item item,
void *  opaque = 0 
) [inline, virtual]

Add a document to fetch, as soon as possible, to the query list.

The holder will call this method when the cache item is missed (either item's lifetime expired, or on not found event). It's possible to queue the fetching on a thread pool. The cache will then wait until a signal is sent to it, and returns the fetched item's data on success.

Parameters:
item A reference on an item to fetch as soon as possible
opaque An opaque object that could be used to pass any structure from the cache to the fetcher
Returns:
true if it's possible to fetch it, even if done later on, false on error (like network error)


The documentation for this class was generated from the following file:

(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