ChamplainTileCache

ChamplainTileCache — A base class of tile caches

Synopsis

struct              ChamplainTileCache;
void                champlain_tile_cache_store_tile     (ChamplainTileCache *tile_cache,
                                                         ChamplainTile *tile,
                                                         const gchar *contents,
                                                         gsize size);
void                champlain_tile_cache_refresh_tile_time
                                                        (ChamplainTileCache *tile_cache,
                                                         ChamplainTile *tile);
void                champlain_tile_cache_on_tile_filled (ChamplainTileCache *tile_cache,
                                                         ChamplainTile *tile);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ChamplainMapSource
               +----ChamplainTileCache
                     +----ChamplainFileCache
                     +----ChamplainMemoryCache

Description

This class defines properties and methods common to all caches (that is, map sources that permit storage and retrieval of tiles). Tiles are typically stored by ChamplainTileSource objects.

Details

struct ChamplainTileCache

struct ChamplainTileCache;


champlain_tile_cache_store_tile ()

void                champlain_tile_cache_store_tile     (ChamplainTileCache *tile_cache,
                                                         ChamplainTile *tile,
                                                         const gchar *contents,
                                                         gsize size);

Stores the tile including the metadata into the cache.

tile_cache :

a ChamplainTileCache

tile :

a ChamplainTile

contents :

the tile contents that should be stored

size :

size of the contents in bytes

Since 0.6


champlain_tile_cache_refresh_tile_time ()

void                champlain_tile_cache_refresh_tile_time
                                                        (ChamplainTileCache *tile_cache,
                                                         ChamplainTile *tile);

Refreshes the tile access time in the cache.

tile_cache :

a ChamplainTileCache

tile :

a ChamplainTile

Since 0.6


champlain_tile_cache_on_tile_filled ()

void                champlain_tile_cache_on_tile_filled (ChamplainTileCache *tile_cache,
                                                         ChamplainTile *tile);

When a cache fills a tile and the next source in the chain is a tile cache, it should call this function on the next source. This way all the caches preceding a tile source in the chain get informed that the tile was used and can modify their metadata accordingly in the implementation of this function. In addition, the call of this function should be chained so within the implementation of this function it should be called on the next source in the chain when next source is a tile cache.

tile_cache :

a ChamplainTileCache

tile :

a ChamplainTile

Since 0.6