From 81a7a892277444261a2f84243876dbadbea90951 Mon Sep 17 00:00:00 2001 From: Date: Fri, 5 Feb 2016 09:20:52 +0100 Subject: fix bug in poi search --- src/poi-service/poi-server/main.cpp | 22 +++++++++++----------- src/poi-service/poi-server/poi-server-class.h | 6 +++--- src/poi-service/rebuild_all.sh | 6 +++--- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/poi-service') diff --git a/src/poi-service/poi-server/main.cpp b/src/poi-service/poi-server/main.cpp index f4af8aa..daefa81 100644 --- a/src/poi-service/poi-server/main.cpp +++ b/src/poi-service/poi-server/main.cpp @@ -90,17 +90,17 @@ void Routing::RouteCalculationCancelled(const handleId_t &routeHandle) } -void Routing::RouteCalculationSuccessful(const handleId_t& routeHandle, const std::map< uint16_t, uint16_t >& unfullfilledPreferences) +void Routing::RouteCalculationSuccessful(const handleId_t& routeHandle, const std::map< int32_t, int32_t >& unfullfilledPreferences) { } -void Routing::RouteCalculationFailed(const handleId_t& routeHandle, const uint16_t& errorCode, const std::map< uint16_t, uint16_t >& unfullfilledPreferences) +void Routing::RouteCalculationFailed(const handleId_t& routeHandle, const int32_t& errorCode, const std::map< int32_t, int32_t >& unfullfilledPreferences) { } -void Routing::RouteCalculationProgressUpdate(const handleId_t& routeHandle, const uint16_t &status, const uint8_t &percentage) +void Routing::RouteCalculationProgressUpdate(const handleId_t& routeHandle, const int32_t &status, const uint8_t &percentage) { } @@ -1051,13 +1051,13 @@ void poiSearchServer::SetRouteHandle(const handleId_t& poiSearchHandle, const ha { uint32_t index; int16_t detailLevel; - std::vector< uint16_t > valuesToReturn; + std::vector< int32_t > valuesToReturn; uint32_t numberOfSegments; uint32_t offset; uint32_t totalNumberOfSegments; - std::vector< std::map< uint16_t, ::DBus::Variant > > routeSegments; - std::map< uint16_t, ::DBus::Variant > element; - std::map< uint16_t, ::DBus::Variant >::iterator iter; + std::vector< std::map< int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > > routeSegments; + std::map< int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > element; + std::map< int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > >::iterator iter; route_vector_t routeVector; if ((m_poiSearchHandle == INVALID_HANDLE) || (poiSearchHandle != m_poiSearchHandle)) @@ -1093,16 +1093,16 @@ void poiSearchServer::SetRouteHandle(const handleId_t& poiSearchHandle, const ha element = routeSegments.at(index); iter = element.find(GENIVI_NAVIGATIONCORE_START_LATITUDE); if (iter != element.end()) - routeVector.startPoint.latitude = element.at(GENIVI_NAVIGATIONCORE_START_LATITUDE); + routeVector.startPoint.latitude = element.at(GENIVI_NAVIGATIONCORE_START_LATITUDE)._2; iter = element.find(GENIVI_NAVIGATIONCORE_START_LONGITUDE); if (iter != element.end()) - routeVector.startPoint.longitude = element.at(GENIVI_NAVIGATIONCORE_START_LONGITUDE); + routeVector.startPoint.longitude = element.at(GENIVI_NAVIGATIONCORE_START_LONGITUDE)._2; iter = element.find(GENIVI_NAVIGATIONCORE_END_LATITUDE); if (iter != element.end()) - routeVector.endPoint.latitude = element.at(GENIVI_NAVIGATIONCORE_END_LATITUDE); + routeVector.endPoint.latitude = element.at(GENIVI_NAVIGATIONCORE_END_LATITUDE)._2; iter = element.find(GENIVI_NAVIGATIONCORE_END_LONGITUDE); if (iter != element.end()) - routeVector.endPoint.longitude = element.at(GENIVI_NAVIGATIONCORE_END_LONGITUDE); + routeVector.endPoint.longitude = element.at(GENIVI_NAVIGATIONCORE_END_LONGITUDE)._2; m_route.push_back(routeVector); } } diff --git a/src/poi-service/poi-server/poi-server-class.h b/src/poi-service/poi-server/poi-server-class.h index d982484..8e29e0b 100644 --- a/src/poi-service/poi-server/poi-server-class.h +++ b/src/poi-service/poi-server/poi-server-class.h @@ -76,11 +76,11 @@ class Routing void RouteCalculationCancelled(const uint32_t& routeHandle); - void RouteCalculationSuccessful(const uint32_t& routeHandle, const std::map< uint16_t, uint16_t >& unfullfilledPreferences); + void RouteCalculationSuccessful(const uint32_t& routeHandle, const std::map< int32_t, int32_t >& unfullfilledPreferences); - void RouteCalculationFailed(const uint32_t& routeHandle, const uint16_t& errorCode,const std::map< uint16_t, uint16_t >& unfullfilledPreferences); + void RouteCalculationFailed(const uint32_t& routeHandle, const int32_t& errorCode,const std::map< int32_t, int32_t >& unfullfilledPreferences); - void RouteCalculationProgressUpdate(const uint32_t& routeHandle, const uint16_t& status, const uint8_t& percentage); + void RouteCalculationProgressUpdate(const uint32_t& routeHandle, const int32_t& status, const uint8_t& percentage); void AlternativeRoutesAvailable (const std::vector& routeHandlesList); diff --git a/src/poi-service/rebuild_all.sh b/src/poi-service/rebuild_all.sh index 20f99bd..1d19abb 100755 --- a/src/poi-service/rebuild_all.sh +++ b/src/poi-service/rebuild_all.sh @@ -51,10 +51,10 @@ then commonapi_tools_option="-DDBUS_LIB_PATH="$DBUS_LIB_PATH" -DCOMMONAPI_DBUS_TOOL_DIR="$COMMONAPI_DBUS_TOOL_DIR" -DCOMMONAPI_TOOL_DIR="$COMMONAPI_TOOL_DIR fi -echo 'delete the build folder' -rm -rf build +echo 'clean up the build folder' +find ./build ! -name '*.cbp' -type f -exec rm -f {} + -mkdir build +mkdir -p build cd build echo 'build poi-server' -- cgit v1.2.1