-
-void MainApp::getPosition_reply(std::map< int32_t, naviapi::variant > position)
-{
- mutex.lock();
-
- std::map< int32_t, naviapi::variant >::iterator it;
- for (it = position.begin(); it != position.end(); it++)
- {
- if (it->first == naviapi::NAVICORE_LATITUDE)
- {
- currentLatitude = it->second._double;
- }
- else if (it->first == naviapi::NAVICORE_LONGITUDE)
- {
- currentLongitude = it->second._double;
- }
- }
-
- TRACE_INFO("Current position: %f, %f", currentLatitude, currentLongitude);
-
- mutex.unlock();
-
- emit positionGotSignal();
-}
-
-void MainApp::getAllRoutes_reply(std::vector< uint32_t > allRoutes)
-{
- mutex.lock();
-
- uint32_t routeHandle = 0;
-
- if (allRoutes.size() != 0)
- {
- routeHandle = allRoutes[0];
- }
-
- this->currentRouteHandle = routeHandle;
-
- mutex.unlock();
-
- emit allRoutesGotSignal();
-}
-
-void MainApp::createRoute_reply(uint32_t routeHandle)
-{
- mutex.lock();
-
- this->currentRouteHandle = routeHandle;
-
- mutex.unlock();
-
- emit routeCreatedSignal();
-}
-