/*
 *  TnMapLandmarkData.h
 *  GLMap
 *
 *  Created by jianhuang on 7/28/10.
 *  Copyright 2010 TeleNav. All rights reserved.
 *
 */

#ifndef TN_MAP_LANDMARK_DATA_H
#define TN_MAP_LANDMARK_DATA_H

#include <foundation/SharedPtr.h>
#include <foundation/SharedArray.h>
#include <foundation/WeakPtr.h>

#include <foundation/TnTypes.h>

#include <RenderEngine/TnMapTileDataRequest.h>

/*! Engine implements this and passes an instance to the client as an
 *  argument to the asynchronous request. The client populates the
 *  data and calls the appropriate method to complete the response. */


class TnMapLandmarkData : public TnMapTileDataRequest
{
public:
    
    virtual ~TnMapLandmarkData() {}
    
    typedef Tn::Foundation::shared_ptr<TnMapLandmarkData> ptr;
    typedef Tn::Foundation::weak_ptr<TnMapLandmarkData> wptr;
    
    virtual bool IsLandmarksExist(int64_t id) = 0;

	virtual void NewLandmarks(int64_t id) = 0;

    virtual void NewModel(std::string const & name, double degreeLat, double degreeLon, double metersHeight, std::string const & style = "") = 0;
    
    virtual void AddVertex(float x, float y, float z, float s, float t) = 0;

    virtual void AddVertex(float x, float y, float z, uint8_t r, uint8_t g, uint8_t b, uint8_t a) = 0;
    
    virtual void AddTexture(Tn::Foundation::shared_array<uint8_t>& data, uint32_t size) = 0;
    
    virtual void AddTexture(Tn::Foundation::shared_array<uint8_t>& data, int width, int height) = 0;

	virtual void AddTexture(std::string const & url) = 0;

    virtual bool GetLandmarkRef(int32_t position, int32_t& depth, int32_t& col, int32_t& row) = 0;
    
    //shouldn't expose synchronization primitives
    virtual void MutexLock() = 0;

    virtual void MutexUnlock() = 0;
protected:
    TnMapLandmarkData();
};

#endif
