/*
 *  ITnMapRasterTileProxy.h
 *  OpenGL Map Engine
 *
 */

#ifndef ITN_MAP_RASTER_TILE_PROXY_H
#define ITN_MAP_RASTER_TILE_PROXY_H

#include "foundation/SharedPtr.h"

#include "TnMapRasterTileData.h"
#include "ITnMapEngine.h"


/*! Client implements this. This is how they are informed about
 *  requests for map data from the engine. */


class ITnMapRasterTileProxy
{
protected:

    virtual ~ITnMapRasterTileProxy() = 0;

public:
    
    typedef Tn::Foundation::shared_ptr<ITnMapRasterTileProxy> ptr;

    /*! Engine calls this to request tile edge data. The client should
     *  store the weak pointer and return immediately. When the edge
     *  data is available, the client should cast the
     *  TnMapRasterTileData::wptr to TnMapRasterTileData::ptr, check for validity,
     *  and pass in the edge data.
     */

    virtual void RequestTile(TnMapRasterTileData::ptr const & data, int zoomBias) = 0;
    virtual void CancelRequest(TnMapRasterTileData::ptr const & data) = 0;
    
    virtual bool SetTerrainGridResolution(ITnMapEngine::eTerrainGridResolution res) = 0;
};

#endif
