/*
 *  ITnMapRouteData.h
 *  OpenGL Map Engine
 *
 *  Created by Thant on 4/23/2013
 *  Copyright 2013 TeleNav Inc. All rights reserved.
 *
 */

#ifndef ITN_MAP_ROUTE_DATA_INCLUDED
#define ITN_MAP_ROUTE_DATA_INCLUDED

#include <string>

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

#include <foundation/TnTypes.h>

#include <RenderEngine/TnMapDataRequest.h>

class TnMapArrowParams;

/*! 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 ITnMapRouteData: public TnMapDataRequest
{
public:
    typedef Tn::Foundation::weak_ptr<ITnMapRouteData> wptr;
    typedef Tn::Foundation::shared_ptr<ITnMapRouteData> ptr;

    virtual void NewRoute(std::string const & name, 
                          std::string const & routeStyle, 
                          TnMapArrowParams const & arrowParams) = 0;
    
    virtual void NewSegment() = 0;
    virtual void NewSegment(TnMapArrowParams const & arrowParams) = 0;
    virtual void NewEdge() = 0;
    virtual void NewEdge(std::string const & style) = 0;
    virtual void AddPoint(double degreesLatitude, 
                          double degreesLongitude,
                          double metersHeight) = 0;

    virtual void SetStyle(std::string const & style) = 0;

    /* The start and finish points can be set independent of the route
     * data. If no start and finish points are specified, they default
     * to the first and last point along the route. Note that the
     * default values are incorrect in the case that the entire route
     * isn't provided (which is why these functions are provided). */

    virtual void SetStart(double degreesLatitude, 
                          double degreesLongitude,
                          double metersHeight) = 0;

    virtual void SetFinish(double degreesLatitude, 
                           double degreesLongitude,
                           double metersHeight) = 0;
    
protected:
    ITnMapRouteData();
};

#endif

