added missing stuff
This commit is contained in:
48
api/api.h
48
api/api.h
@@ -1,4 +1,52 @@
|
||||
#ifndef API_H
|
||||
#define API_H
|
||||
|
||||
#include <vector>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
#include <fstream>
|
||||
|
||||
#include "../geo/Point3.h"
|
||||
|
||||
class APIListener {
|
||||
|
||||
public:
|
||||
|
||||
/** dtor */
|
||||
virtual ~APIListener() {;}
|
||||
|
||||
/** the currently estimated path to the target has changed */
|
||||
virtual void onPathUpdate(const std::vector<Point3>& curPath) = 0;
|
||||
|
||||
/** the currently estimated position has changed */
|
||||
virtual void onPositionUpdate(const Point3 curPos) = 0;
|
||||
|
||||
};
|
||||
|
||||
class API {
|
||||
|
||||
public:
|
||||
|
||||
/** dtor */
|
||||
virtual ~API() {;}
|
||||
|
||||
/** set the desired target by using the given position */
|
||||
virtual void setTarget(const Point3 p) = 0;
|
||||
|
||||
/** set the desired target by using the given POI-ID */
|
||||
virtual void setTarget(const int id) = 0;
|
||||
|
||||
/** start the navigation process */
|
||||
virtual void startNavigation() = 0;
|
||||
|
||||
/** stop the navigation process */
|
||||
virtual void stopNavigation() = 0;
|
||||
|
||||
/** attach as listener to the API */
|
||||
virtual void addListener(APIListener* l) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // API_H
|
||||
|
||||
Reference in New Issue
Block a user