diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-10-19 13:45:11 -0700 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-10-31 01:59:13 -0700 |
commit | 3e94024998c1615bd30306aab7537db22161a9ce (patch) | |
tree | 6bea3ac4de640d98c8c27ffd0c02f9eb86ca0773 /libnavi/src/navicore.cpp | |
parent | 9539611e896e61e27154bbb5917188753a983871 (diff) |
binding: navigation: rewrite of navigation binding
To remove dependency on DBus the binding needed to be rewritten to
output pure JSON output to subscribed consumers.
Bug-AGL: SPEC-2880
Change-Id: Ie85dfccd42ca36119116a0fbfb16bf4e96efc184
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'libnavi/src/navicore.cpp')
-rw-r--r-- | libnavi/src/navicore.cpp | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/libnavi/src/navicore.cpp b/libnavi/src/navicore.cpp deleted file mode 100644 index 5402aa8..0000000 --- a/libnavi/src/navicore.cpp +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2017 AISIN AW CO.,LTD - -#include "libnavicore.hpp" -#include "BinderClient.h" - -static BinderClient mBinderClient; - -naviapi::Navicore::Navicore() -{ -} - -naviapi::Navicore::~Navicore() -{ -} - -bool naviapi::Navicore::connect(int argc, char *argv[], NavicoreListener* listener) -{ - this->mListener = listener; - - if (argc != 3) - { - printf("Error: argc != 3 : argc = %d\n", argc); - return false; - } - - char url[1024]; - sprintf(url, "ws://localhost:%d/api?token=%s", atoi(argv[1]), argv[2]); - - return mBinderClient.ConnectServer(url, this->mListener); -} - -void naviapi::Navicore::disconnect() -{ - // TODO -} - -void naviapi::Navicore::getAllSessions() -{ - mBinderClient.NavicoreGetAllSessions(); -} - -void naviapi::Navicore::getPosition(std::vector<int32_t> params) -{ - mBinderClient.NavicoreGetPosition(params); -} - -void naviapi::Navicore::getAllRoutes() -{ - mBinderClient.NavicoreGetAllRoutes(); -} - -void naviapi::Navicore::createRoute(uint32_t session) -{ - mBinderClient.NavicoreCreateRoute(session); -} - -void naviapi::Navicore::pauseSimulation(uint32_t session) -{ - mBinderClient.NavicorePauseSimulation(session); -} - -void naviapi::Navicore::setSimulationMode(uint32_t session, bool activate) -{ - mBinderClient.NavicoreSetSimulationMode(session, activate); -} - -void naviapi::Navicore::cancelRouteCalculation(uint32_t session, uint32_t routeHandle) -{ - mBinderClient.NavicoreCancelRouteCalculation(session, routeHandle); -} - -void naviapi::Navicore::setWaypoints(uint32_t session, uint32_t routeHandle, bool flag, std::vector<Waypoint> waypoints) -{ - mBinderClient.NavicoreSetWaypoints(session, routeHandle, flag, waypoints); -} - -void naviapi::Navicore::calculateRoute(uint32_t session, uint32_t routeHandle) -{ - mBinderClient.NavicoreCalculateRoute(session, routeHandle); -} - |