From da9d177514fe438edd8262226cdc770df6c9eb82 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Fri, 30 Aug 2019 11:40:23 -0400 Subject: Initial check in Initial check in of contents of the original repository: git://github.com/AGLExport/agl-service-navigation as of commit 1f1ffc92fcc882aa5e885badbc91a3384f5d77b1. Bug-AGL: SPEC-2787 Signed-off-by: Scott Murray Change-Id: I02d008ee73cdfd88f1e7587ee57101187b9c4d6d (cherry picked from commit f14ecdd52975ae365af5ed32648bf55dddacb8d9) --- libnavi/include/BinderClient.h | 57 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 libnavi/include/BinderClient.h (limited to 'libnavi/include/BinderClient.h') diff --git a/libnavi/include/BinderClient.h b/libnavi/include/BinderClient.h new file mode 100644 index 0000000..70a6558 --- /dev/null +++ b/libnavi/include/BinderClient.h @@ -0,0 +1,57 @@ +// Copyright 2017 AISIN AW CO.,LTD + +#pragma once + +#include +#include +#include +#include + +#include "libnavicore.hpp" + +#include "RequestManageListener.h" +#include "RequestManage.h" + +#define API_NAME "naviapi" + +/** + * @brief API name + */ +#define VERB_GETPOSITION "navicore_getposition" +#define VERB_GETALLROUTES "navicore_getallroutes" +#define VERB_CREATEROUTE "navicore_createroute" +#define VERB_PAUSESIMULATION "navicore_pausesimulation" +#define VERB_SETSIMULATIONMODE "navicore_setsimulationmode" +#define VERB_CANCELROUTECALCULATION "navicore_cancelroutecalculation" +#define VERB_SETWAYPOINTS "navicore_setwaypoints" +#define VERB_CALCULATEROUTE "navicore_calculateroute" +#define VERB_GETALLSESSIONS "navicore_getallsessions" + +/** + * @brief Binder client class + */ +class BinderClient : public RequestManageListener +{ +public: + BinderClient(); + ~BinderClient(); + + bool ConnectServer(std::string url , naviapi::NavicoreListener* listener); + void NavicoreGetPosition(const std::vector< int32_t >& valuesToReturn); + void NavicoreGetAllRoutes(); + void NavicoreCreateRoute(const uint32_t& sessionHandle); + void NavicorePauseSimulation(const uint32_t& sessionHandle); + void NavicoreSetSimulationMode(const uint32_t& sessionHandle, const bool& activate); + void NavicoreCancelRouteCalculation(const uint32_t& sessionHandle, const uint32_t& routeHandle); + void NavicoreSetWaypoints(const uint32_t& sessionHandle, const uint32_t& routeHandle, const bool& startFromCurrentPosition, const std::vector& waypointsList); + void NavicoreCalculateRoute(const uint32_t& sessionHandle, const uint32_t& routeHandle); + void NavicoreGetAllSessions(); + +private: + void OnReply(struct json_object *reply); + +private: + naviapi::NavicoreListener* navicoreListener; + RequestManage* requestMng; +}; + -- cgit 1.2.3-korg