summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorasanoaozora <fifitaneki@hotmail.com>2016-10-26 17:38:08 +0200
committerasanoaozora <fifitaneki@hotmail.com>2016-10-26 17:38:08 +0200
commit1399a1bf18d317e7622e0ce52d1415a3f9efb826 (patch)
tree8517231dc7272678e52e68b78bf6f20906dfcae9
parentb8c411e899196be159a49d8a6ce054d5588b69f5 (diff)
downloadpoi-service-1399a1bf18d317e7622e0ce52d1415a3f9efb826.tar.gz
updated to CommonAPI 3.1.9
-rw-r--r--api/franca/navigation/navigationcore/Routing.fidl2
-rwxr-xr-xsrc/navigation/build.sh1
-rw-r--r--src/navigation/map-viewer/CMakeLists.txt20
-rw-r--r--src/navigation/map-viewer/configuration-server-plugin/CMakeLists.txt20
-rw-r--r--src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx165
-rw-r--r--src/navigation/map-viewer/mapviewercontrol-server-plugin/CMakeLists.txt23
-rw-r--r--src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx154
-rw-r--r--src/navigation/map-viewer/session-server-plugin/CMakeLists.txt23
-rw-r--r--src/navigation/navigation-core/CMakeLists.txt20
-rw-r--r--src/navigation/navigation-core/configuration-server-plugin/CMakeLists.txt22
-rw-r--r--src/navigation/navigation-core/enhancedposition-client-plugin/CMakeLists.txt23
-rw-r--r--src/navigation/navigation-core/guidance-server-plugin/CMakeLists.txt23
-rw-r--r--src/navigation/navigation-core/locationinput-server-plugin/CMakeLists.txt23
-rw-r--r--src/navigation/navigation-core/mapmatchedposition-server-plugin/CMakeLists.txt23
-rw-r--r--src/navigation/navigation-core/poicam-server-plugin/CMakeLists.txt23
-rw-r--r--src/navigation/navigation-core/routing-server-plugin/CMakeLists.txt23
-rw-r--r--src/navigation/navigation-core/routing-server-plugin/genivi_navigationcore_routing.cxx2
-rw-r--r--src/navigation/navigation-core/session-server-plugin/CMakeLists.txt23
-rwxr-xr-xtest/navigation/test-address-input-capi.py14
-rwxr-xr-xtest/navigation/test-all11
-rwxr-xr-xtest/navigation/test-all-capi12
-rwxr-xr-xtest/navigation/test-guidance-capi.py42
-rwxr-xr-xtest/navigation/test-guidance.py4
-rwxr-xr-xtest/navigation/test-location-input-capi.py20
-rwxr-xr-xtest/navigation/test-map-viewer-control-capi.py19
-rwxr-xr-xtest/navigation/test-map-viewer-control.py4
-rwxr-xr-xtest/navigation/test-poi-capi.py18
-rwxr-xr-xtest/navigation/test-route-calculation-capi.py23
-rwxr-xr-xtest/navigation/test-route-calculation.py4
29 files changed, 308 insertions, 476 deletions
diff --git a/api/franca/navigation/navigationcore/Routing.fidl b/api/franca/navigation/navigationcore/Routing.fidl
index d2951bd..0001dc6 100644
--- a/api/franca/navigation/navigationcore/Routing.fidl
+++ b/api/franca/navigation/navigationcore/Routing.fidl
@@ -632,7 +632,7 @@ interface Routing {
**>
Int16 detailLevel
- RouteSegmentType [] valuesToReturn
+ RouteSegmentType[] valuesToReturn
<**
@description : numberOfSegments = number of segments to be retrieved
diff --git a/src/navigation/build.sh b/src/navigation/build.sh
index 906bc2c..6eebc53 100755
--- a/src/navigation/build.sh
+++ b/src/navigation/build.sh
@@ -71,6 +71,7 @@ then
rm ./build/CMakeCache.txt
rm ./build/cmake_install.cmake
rm ./build/Makefile
+ rm -rf ./build/positioning
fi
fi
fi
diff --git a/src/navigation/map-viewer/CMakeLists.txt b/src/navigation/map-viewer/CMakeLists.txt
index ad8194d..fdf39ef 100644
--- a/src/navigation/map-viewer/CMakeLists.txt
+++ b/src/navigation/map-viewer/CMakeLists.txt
@@ -90,6 +90,26 @@ if(${YOCTO_CONFIG})
endif()
if (WITH_PLUGIN_MIGRATION)
+ # DBus Path
+ if(DBUS_LIB_PATH)
+ set(DBUS_INCLUDE_DIRS ${DBUS_LIB_PATH}/include/dbus-1.0 ${DBUS_LIB_PATH}/lib/dbus-1.0/include)
+ set(DBUS_LIBDIR ${DBUS_LIB_PATH}/lib)
+ set(DBUS_LIBRARIES ${DBUS_LIB_PATH}/lib/libdbus-1.so)
+ else()
+ message(FATAL_ERROR "Please specify the path to your patched DBus library using -DDBUS_LIB_PATH=yourPath")
+ endif()
+
+ # Packages
+ find_package(CommonAPI)
+ find_package(CommonAPI-DBus)
+
+ #pkg_check_modules(DBUS "dbus-1 >= 1.8.4") // #to be fixed, it doesn't work so the paths are set manually (see above)
+ pkg_check_modules(COMMONAPI "CommonAPI >= 3.1.5")
+ pkg_check_modules(COMMONAPI_DBUS "CommonAPI-DBus >= 3.1.5")
+ pkg_check_modules(GOBJECT gobject-2.0)
+ pkg_check_modules(GLIB REQUIRED glib-2.0)
+ pkg_check_modules(DBUS_CPP_GLIB dbus-c++-glib-1)
+
set(FRANCA_DIR "${API_DIR}/franca")
add_subdirectory(configuration-server-plugin)
add_subdirectory(mapviewercontrol-server-plugin)
diff --git a/src/navigation/map-viewer/configuration-server-plugin/CMakeLists.txt b/src/navigation/map-viewer/configuration-server-plugin/CMakeLists.txt
index f04c55f..3e31d54 100644
--- a/src/navigation/map-viewer/configuration-server-plugin/CMakeLists.txt
+++ b/src/navigation/map-viewer/configuration-server-plugin/CMakeLists.txt
@@ -28,26 +28,6 @@ set(CMAKE_CXX_FLAGS "-Wall -std=c++0x")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
-
-# DBus Path
-if(DBUS_LIB_PATH)
- set(DBUS_INCLUDE_DIRS ${DBUS_LIB_PATH}/include/dbus-1.0 ${DBUS_LIB_PATH}/lib/dbus-1.0/include)
- set(DBUS_LIBDIR ${DBUS_LIB_PATH}/lib)
- set(DBUS_LIBRARIES ${DBUS_LIB_PATH}/lib/libdbus-1.so)
-else()
- message(FATAL_ERROR "Please specify the path to your patched DBus library using -DDBUS_LIB_PATH=yourPath")
-endif()
-
-# Packages
-find_package(CommonAPI 3.1.5 REQUIRED)
-find_package(CommonAPI-DBus 3.1.5 REQUIRED)
-
-#pkg_check_modules(DBUS "dbus-1 >= 1.8.4") // #to be fixed, it doesn't work so the paths are set manually (see above)
-pkg_check_modules(COMMONAPI "CommonAPI >= 3.1.5")
-pkg_check_modules(COMMONAPI_DBUS "CommonAPI-DBus >= 3.1.5")
-pkg_check_modules(GOBJECT gobject-2.0)
-pkg_check_modules(GLIB REQUIRED glib-2.0)
-
# Path to the generated files
set(API_VERSION_MAJOR 4)
set(API_VERSION "v${API_VERSION_MAJOR}")
diff --git a/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx b/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx
index 96b1fe5..04be7ae 100644
--- a/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx
+++ b/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx
@@ -344,46 +344,54 @@ class MapViewerControl
CreateMapViewInstance(const uint32_t& sessionHandle, const ::DBus::Struct< uint16_t, uint16_t >& mapViewSize, const DBusCommonAPIEnumeration& mapViewType, int32_t& error, uint32_t& mapViewInstanceHandle)
{
dbg(lvl_debug,"enter\n");
- if (mapViewType != GENIVI_MAPVIEWER_MAIN_MAP)
- throw DBus::ErrorInvalidArgs("Unsupported mapViewType");
- mapViewInstanceHandle=1;
- while (handles[mapViewInstanceHandle]) {
- mapViewInstanceHandle++;
- if (mapViewInstanceHandle == 256)
- throw DBus::ErrorLimitsExceeded("Out of mapviewinstance handles");
- }
- handles[mapViewInstanceHandle]=new MapViewerControlObj(this, mapViewInstanceHandle, mapViewSize);
error=0; //not used
+ mapViewInstanceHandle=0;
+ if (mapViewType != GENIVI_MAPVIEWER_MAIN_MAP) {
+ throw DBus::ErrorInvalidArgs("Unsupported mapViewType");
+ } else {
+ mapViewInstanceHandle=1;
+ while (handles[mapViewInstanceHandle]) {
+ mapViewInstanceHandle++;
+ if (mapViewInstanceHandle == 256)
+ throw DBus::ErrorLimitsExceeded("Out of mapviewinstance handles");
+ }
+ handles[mapViewInstanceHandle]=new MapViewerControlObj(this, mapViewInstanceHandle, mapViewSize);
+ }
}
int32_t
ReleaseMapViewInstance(const uint32_t& SessionHandle, const uint32_t& MapViewInstanceHandle)
- {
- MapViewerControlObj *obj=handles[MapViewInstanceHandle];
- if (!obj)
- throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- delete(obj);
- handles[MapViewInstanceHandle]=NULL;
- return(0); //not implemented yet
- }
-
+ {
+ std::map<uint32_t, MapViewerControlObj *>::iterator iter = handles.find(MapViewInstanceHandle);
+ if (iter != handles.end())
+ {
+ MapViewerControlObj *obj=handles[MapViewInstanceHandle];
+ delete(obj); //delete the navit mapviewer instance
+ //and remove the handle from the dictionary too
+ handles.erase(iter);
+ return(0);
+ }
+ else {
+ return(1);
+ }
+ }
void
SetMapViewPerspective(const uint32_t& sessionHandle, const uint32_t& mapViewInstanceHandle, const DBusCommonAPIEnumeration& perspective)
{
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
- if (!obj)
- throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetMapViewPerspective(sessionHandle, perspective);
+ if (!obj)
+ throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
+ else obj->SetMapViewPerspective(sessionHandle, perspective);
}
DBusCommonAPIEnumeration
GetMapViewPerspective(const uint32_t& mapViewInstanceHandle)
{
- uint16_t MapViewPerspectiveMode;
+ uint16_t MapViewPerspectiveMode=0;
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetMapViewPerspective(MapViewPerspectiveMode);
+ else obj->GetMapViewPerspective(MapViewPerspectiveMode);
return MapViewPerspectiveMode;
}
@@ -400,9 +408,11 @@ class MapViewerControl
MapViewerControlObj *obj=handles[MapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetMapViewScale(SessionHandle, ScaleID);
- //todo: manage the isminmax indicator
- MapViewScaleChanged(MapViewInstanceHandle,ScaleID,GENIVI_MAPVIEWER_INVALID);
+ else {
+ obj->SetMapViewScale(SessionHandle, ScaleID);
+ //todo: manage the isminmax indicator
+ MapViewScaleChanged(MapViewInstanceHandle,ScaleID,GENIVI_MAPVIEWER_INVALID);
+ }
}
void
@@ -411,11 +421,13 @@ class MapViewerControl
MapViewerControlObj *obj=handles[MapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetMapViewScaleByDelta(SessionHandle, ScaleDelta);
- uint8_t current_scale;
- DBusCommonAPIEnumeration is_min_max;
- obj->GetMapViewScale(current_scale,is_min_max);
- MapViewScaleChanged(MapViewInstanceHandle,current_scale,is_min_max);
+ else {
+ obj->SetMapViewScaleByDelta(SessionHandle, ScaleDelta);
+ uint8_t current_scale;
+ DBusCommonAPIEnumeration is_min_max;
+ obj->GetMapViewScale(current_scale,is_min_max);
+ MapViewScaleChanged(MapViewInstanceHandle,current_scale,is_min_max);
+ }
}
void
@@ -424,7 +436,7 @@ class MapViewerControl
MapViewerControlObj *obj=handles[MapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetMapViewScale(ScaleID, IsMinMax);
+ else obj->GetMapViewScale(ScaleID, IsMinMax);
}
void
@@ -434,10 +446,12 @@ class MapViewerControl
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- if (pixelCoordinates.size())
- {
- pixel = pixelCoordinates.at(0);
- obj->SetMapViewPan(sessionHandle, panningAction, pixel);
+ else {
+ if (pixelCoordinates.size())
+ {
+ pixel = pixelCoordinates.at(0);
+ obj->SetMapViewPan(sessionHandle, panningAction, pixel);
+ }
}
}
@@ -449,8 +463,9 @@ class MapViewerControl
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetMapViewPan(valueToReturn, pixel); //limited to one pixel coordinate
+ else obj->GetMapViewPan(valueToReturn, pixel); //limited to one pixel coordinate
pixelCoordinates.push_back(pixel);
+ return pixelCoordinates;
}
void
@@ -459,7 +474,7 @@ class MapViewerControl
MapViewerControlObj *obj=handles[MapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->DisplayRoute(SessionHandle, RouteHandle, highlighted);
+ else obj->DisplayRoute(SessionHandle, RouteHandle, highlighted);
}
void
@@ -468,7 +483,7 @@ class MapViewerControl
MapViewerControlObj *obj=handles[MapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->HideRoute(SessionHandle, RouteHandle);
+ else obj->HideRoute(SessionHandle, RouteHandle);
}
::DBus::Struct< uint16_t, uint16_t, uint16_t, std::string >
@@ -485,11 +500,11 @@ class MapViewerControl
DBusCommonAPIEnumeration
GetMapViewType(const uint32_t& mapViewInstanceHandle)
{
- uint16_t ret;
+ uint16_t ret=0;
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetMapViewType(ret);
+ else obj->GetMapViewType(ret);
return ret;
}
@@ -505,7 +520,7 @@ class MapViewerControl
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetTargetPoint(sessionHandle, targetPoint);
+ else obj->SetTargetPoint(sessionHandle, targetPoint);
}
::DBus::Struct< double, double, double >
@@ -515,7 +530,7 @@ class MapViewerControl
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetTargetPoint(ret);
+ else obj->GetTargetPoint(ret);
return ret;
}
@@ -525,17 +540,17 @@ class MapViewerControl
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetFollowCarMode(sessionHandle, followCarMode);
+ else obj->SetFollowCarMode(sessionHandle, followCarMode);
}
bool
GetFollowCarMode(const uint32_t& mapViewInstanceHandle)
{
- bool followCarMode;
+ bool followCarMode=false;
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetFollowCarMode(followCarMode);
+ else obj->GetFollowCarMode(followCarMode);
return followCarMode;
}
@@ -557,7 +572,7 @@ class MapViewerControl
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetCameraHeadingAngle(sessionHandle, heading);
+ else obj->SetCameraHeadingAngle(sessionHandle, heading);
}
void
@@ -572,17 +587,17 @@ class MapViewerControl
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetCameraTiltAngle(sessionHandle, tilt);
+ else obj->SetCameraTiltAngle(sessionHandle, tilt);
}
int32_t
GetCameraTiltAngle(const uint32_t& mapViewInstanceHandle)
{
- double ret;
+ double ret=0;
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetCameraTiltAngle(ret);
+ else obj->GetCameraTiltAngle(ret);
return ret;
}
@@ -592,7 +607,7 @@ class MapViewerControl
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetCameraRollAngle(sessionHandle, roll);
+ else obj->SetCameraRollAngle(sessionHandle, roll);
}
int32_t
@@ -612,18 +627,18 @@ class MapViewerControl
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetCameraDistanceFromTargetPoint(sessionHandle, distance);
+ else obj->SetCameraDistanceFromTargetPoint(sessionHandle, distance);
}
uint32_t
GetCameraDistanceFromTargetPoint(const uint32_t& mapViewInstanceHandle)
{
- double ret;
+ double ret=0;
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetCameraDistanceFromTargetPoint(ret);
+ else obj->GetCameraDistanceFromTargetPoint(ret);
return ret;
}
@@ -651,17 +666,17 @@ class MapViewerControl
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetCameraHeight(sessionHandle, height);
+ else obj->SetCameraHeight(sessionHandle, height);
}
uint32_t
GetCameraHeight(const uint32_t& mapViewInstanceHandle)
{
- double ret;
+ double ret=0;
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetCameraHeight(ret);
+ else obj->GetCameraHeight(ret);
return ret;
}
@@ -672,7 +687,7 @@ class MapViewerControl
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetScaleList(ret);
+ else obj->GetScaleList(ret);
return ret;
}
@@ -688,7 +703,7 @@ class MapViewerControl
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetMapViewBoundingBox(sessionHandle, boundingBox);
+ else obj->SetMapViewBoundingBox(sessionHandle, boundingBox);
}
::DBus::Struct< ::DBus::Struct< double, double >, ::DBus::Struct< double, double > >
@@ -698,7 +713,7 @@ class MapViewerControl
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetMapViewBoundingBox(ret);
+ else obj->GetMapViewBoundingBox(ret);
return ret;
}
@@ -708,7 +723,7 @@ class MapViewerControl
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetMapViewRotation(sessionHandle, rotationAngle, rotationAnglePerSecond);
+ else obj->SetMapViewRotation(sessionHandle, rotationAngle, rotationAnglePerSecond);
}
void
@@ -717,7 +732,7 @@ class MapViewerControl
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetMapViewRotation(rotationAngle, rotationAnglePerFrame);
+ else obj->GetMapViewRotation(rotationAngle, rotationAnglePerFrame);
}
void
@@ -777,11 +792,11 @@ class MapViewerControl
std::vector< ::DBus::Struct< uint32_t, bool > >
GetDisplayedRoutes(const uint32_t& mapViewInstanceHandle)
{
- MapViewerControlObj *obj=handles[mapViewInstanceHandle];
+ std::vector< ::DBus::Struct< uint32_t, bool > >ret;
+ MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- std::vector< ::DBus::Struct< uint32_t, bool > >ret;
- obj->GetDisplayedRoutes(ret);
+ else obj->GetDisplayedRoutes(ret);
return ret;
}
@@ -791,17 +806,17 @@ class MapViewerControl
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetMapViewTheme(sessionHandle, mapViewTheme);
+ else obj->SetMapViewTheme(sessionHandle, mapViewTheme);
}
DBusCommonAPIEnumeration
GetMapViewTheme(const uint32_t& mapViewInstanceHandle)
{
- uint16_t ret;
+ uint16_t ret=0;
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetMapViewTheme(ret);
+ else obj->GetMapViewTheme(ret);
return ret;
}
@@ -814,22 +829,22 @@ class MapViewerControl
std::vector< ::DBus::Struct< double, double > >
ConvertPixelCoordsToGeoCoords(const uint32_t& sessionHandle, const uint32_t& mapViewInstanceHandle, const std::vector< ::DBus::Struct< uint16_t, uint16_t > >& pixelCoordinates)
{
- MapViewerControlObj *obj=handles[mapViewInstanceHandle];
+ std::vector< ::DBus::Struct< double, double > >ret;
+ MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- std::vector< ::DBus::Struct< double, double > >ret;
- obj->ConvertPixelCoordsToGeoCoords(sessionHandle, pixelCoordinates, ret);
+ else obj->ConvertPixelCoordsToGeoCoords(sessionHandle, pixelCoordinates, ret);
return ret;
}
std::vector< ::DBus::Struct< uint16_t, uint16_t > >
ConvertGeoCoordsToPixelCoords(const uint32_t& sessionHandle, const uint32_t& mapViewInstanceHandle, const std::vector< ::DBus::Struct< double, double > >& geoCoordinates)
{
- MapViewerControlObj *obj=handles[mapViewInstanceHandle];
+ std::vector< ::DBus::Struct< uint16_t, uint16_t > >ret;
+ MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- std::vector< ::DBus::Struct< uint16_t, uint16_t > >ret;
- obj->ConvertGeoCoordsToPixelCoords(sessionHandle, geoCoordinates, ret);
+ else obj->ConvertGeoCoordsToPixelCoords(sessionHandle, geoCoordinates, ret);
return ret;
}
@@ -839,7 +854,7 @@ class MapViewerControl
MapViewerControlObj *obj=handles[mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetCameraHeadingTrackUp(sessionHandle);
+ else obj->SetCameraHeadingTrackUp(sessionHandle);
}
void
diff --git a/src/navigation/map-viewer/mapviewercontrol-server-plugin/CMakeLists.txt b/src/navigation/map-viewer/mapviewercontrol-server-plugin/CMakeLists.txt
index 115d8ae..7bc22c8 100644
--- a/src/navigation/map-viewer/mapviewercontrol-server-plugin/CMakeLists.txt
+++ b/src/navigation/map-viewer/mapviewercontrol-server-plugin/CMakeLists.txt
@@ -28,29 +28,6 @@ set(CMAKE_CXX_FLAGS "-Wall -std=c++0x")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
-
-# DBus Path
-if(DBUS_LIB_PATH)
- set(DBUS_INCLUDE_DIRS ${DBUS_LIB_PATH}/include/dbus-1.0 ${DBUS_LIB_PATH}/lib/dbus-1.0/include)
- set(DBUS_LIBDIR ${DBUS_LIB_PATH}/lib)
- set(DBUS_LIBRARIES ${DBUS_LIB_PATH}/lib/libdbus-1.so)
-else()
- message(FATAL_ERROR "Please specify the path to your patched DBus library using -DDBUS_LIB_PATH=yourPath")
-endif()
-
-# Packages
-find_package(CommonAPI 3.1.5 REQUIRED)
-find_package(CommonAPI-DBus 3.1.5 REQUIRED)
-
-
-#pkg_check_modules(DBUS "dbus-1 >= 1.8.4") // #to be fixed, it doesn't work so the paths are set manually (see above)
-pkg_check_modules(COMMONAPI "CommonAPI >= 3.1.5")
-pkg_check_modules(COMMONAPI_DBUS "CommonAPI-DBus >= 3.1.5")
-pkg_check_modules(GOBJECT gobject-2.0)
-pkg_check_modules(GLIB REQUIRED glib-2.0)
-pkg_check_modules(DBUS_CPP_GLIB dbus-c++-glib-1)
-
-
# Path to the generated files
set(API_VERSION_MAJOR 4)
set(API_VERSION "v${API_VERSION_MAJOR}")
diff --git a/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx b/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx
index 38c2856..2914746 100644
--- a/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx
+++ b/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx
@@ -344,16 +344,19 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
void createMapViewInstance(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _sessionHandle, MapViewerControl::Dimension _mapViewSize, MapViewerControl::MapViewType _mapViewType, createMapViewInstanceReply_t _reply)
{
MapViewerControl::createMapViewInstanceError _error = MapViewerControl::createMapViewInstanceError::OK;
+ NavigationTypes::Handle _mapViewInstanceHandle=0;
dbg(lvl_debug,"enter\n");
if (_mapViewType != MapViewerControl::MapViewType::MAIN_MAP)
_error = MapViewerControl::createMapViewInstanceError::MAPVIEWERCONTROL_ERROR_NOMOREMAPVIEWINSTANCEHANDLES;
- NavigationTypes::Handle _mapViewInstanceHandle=FIRST_SESSION_HANDLE;
- while ((mp_handles.count(_mapViewInstanceHandle)>0 ) && (mp_handles[_mapViewInstanceHandle] != NULL)) {
- _mapViewInstanceHandle++;
- if (_mapViewInstanceHandle == MAX_SESSION_HANDLE)
- _error = MapViewerControl::createMapViewInstanceError::MAPVIEWERCONTROL_ERROR_NOMOREMAPVIEWINSTANCEHANDLES;
+ else {
+ _mapViewInstanceHandle=FIRST_SESSION_HANDLE;
+ while ((mp_handles.count(_mapViewInstanceHandle)>0 ) && (mp_handles[_mapViewInstanceHandle] != NULL)) {
+ _mapViewInstanceHandle++;
+ if (_mapViewInstanceHandle == MAX_SESSION_HANDLE)
+ _error = MapViewerControl::createMapViewInstanceError::MAPVIEWERCONTROL_ERROR_NOMOREMAPVIEWINSTANCEHANDLES;
+ }
+ mp_handles[_mapViewInstanceHandle]=new MapViewerControlObj(this, _mapViewInstanceHandle, _mapViewSize);
}
- mp_handles[_mapViewInstanceHandle]=new MapViewerControlObj(this, _mapViewInstanceHandle, _mapViewSize);
_reply(_error,_mapViewInstanceHandle);
}
@@ -364,11 +367,13 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
void releaseMapViewInstance(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _sessionHandle, ::v4::org::genivi::navigation::NavigationTypes::Handle _mapViewInstanceHandle, releaseMapViewInstanceReply_t _reply)
{
MapViewerControl::releaseMapViewInstanceError _error = MapViewerControl::releaseMapViewInstanceError::OK;
- if (mp_handles.find(_mapViewInstanceHandle) != mp_handles.end())
+ std::map<uint32_t, MapViewerControlObj *>::iterator iter = mp_handles.find(_mapViewInstanceHandle);
+ if (iter != mp_handles.end())
{
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
- delete(obj);
- mp_handles[_mapViewInstanceHandle]=NULL;
+ delete(obj); //delete the navit mapviewer instance
+ //and remove the handle from the dictionary too
+ mp_handles.erase(iter);
}
else {
_error = MapViewerControl::releaseMapViewInstanceError::MAPVIEWERCONTROL_ERROR_MAPVIEWINSTANCENOTAVAILABLE;
@@ -382,11 +387,11 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
* set using CreateMapViewInstance
*/
void getMapViewType(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _mapViewInstanceHandle, getMapViewTypeReply_t _reply){
- MapViewerControl::MapViewType _mapViewType;
+ MapViewerControl::MapViewType _mapViewType=MapViewerControl::MapViewType::INVALID;
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetMapViewType(_mapViewType);
+ else obj->GetMapViewType(_mapViewType);
_reply(_mapViewType);
}
@@ -408,7 +413,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetTargetPoint(_sessionHandle, _targetPoint);
+ else obj->SetTargetPoint(_sessionHandle, _targetPoint);
_reply();
}
@@ -420,7 +425,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetTargetPoint(_targetPoint);
+ else obj->GetTargetPoint(_targetPoint);
_reply(_targetPoint);
}
@@ -432,7 +437,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetFollowCarMode(_sessionHandle, _followCarMode);
+ else obj->SetFollowCarMode(_sessionHandle, _followCarMode);
_reply();
}
@@ -440,11 +445,11 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
* description: getFollowCarMode = This method returns the current FollowCar-mode
*/
void getFollowCarMode(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _mapViewInstanceHandle, getFollowCarModeReply_t _reply){
- bool _followCarMode;
+ bool _followCarMode=false;
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetFollowCarMode(_followCarMode);
+ else obj->GetFollowCarMode(_followCarMode);
_reply(_followCarMode);
}
@@ -477,7 +482,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetCameraHeadingAngle(_sessionHandle, _heading);
+ else obj->SetCameraHeadingAngle(_sessionHandle, _heading);
_reply();
}
@@ -497,7 +502,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetCameraHeadingTrackUp(_sessionHandle);
+ else obj->SetCameraHeadingTrackUp(_sessionHandle);
_reply();
}
@@ -515,7 +520,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetCameraTiltAngle(_sessionHandle, _tilt);
+ else obj->SetCameraTiltAngle(_sessionHandle, _tilt);
_reply();
}
@@ -527,7 +532,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetCameraTiltAngle(_tilt);
+ else obj->GetCameraTiltAngle(_tilt);
_reply(_tilt);
}
@@ -539,7 +544,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetCameraRollAngle(_sessionHandle, _roll);
+ else obj->SetCameraRollAngle(_sessionHandle, _roll);
_reply();
}
@@ -551,7 +556,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetCameraRollAngle(_roll);
+ else obj->GetCameraRollAngle(_roll);
_reply(_roll);
}
@@ -564,7 +569,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetCameraDistanceFromTargetPoint(_sessionHandle, _distance);
+ else obj->SetCameraDistanceFromTargetPoint(_sessionHandle, _distance);
_reply();
}
@@ -573,11 +578,11 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
* distance from the target point
*/
void getCameraDistanceFromTargetPoint(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _mapViewInstanceHandle, getCameraDistanceFromTargetPointReply_t _reply){
- uint32_t _distance;
+ uint32_t _distance=0;
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetCameraDistanceFromTargetPoint(_distance);
+ else obj->GetCameraDistanceFromTargetPoint(_distance);
_reply(_distance);
}
@@ -625,7 +630,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetCameraHeight(_sessionHandle, _height);
+ else obj->SetCameraHeight(_sessionHandle, _height);
_reply();
}
@@ -637,7 +642,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetCameraHeight(_height);
+ else obj->GetCameraHeight(_height);
_reply(_height);
}
@@ -648,7 +653,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetMapViewPerspective(_sessionHandle, _perspective);
+ else obj->SetMapViewPerspective(_sessionHandle, _perspective);
_reply();
}
@@ -656,11 +661,11 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
* description: getMapViewPerspective = This method returns the current map perspective
*/
void getMapViewPerspective(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _mapViewInstanceHandle, getMapViewPerspectiveReply_t _reply){
- MapViewerControl::MapPerspective _perspective;
+ MapViewerControl::MapPerspective _perspective=MapViewerControl::MapPerspective::INVALID;
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetMapViewPerspective(_perspective);
+ else obj->GetMapViewPerspective(_perspective);
_reply(_perspective);
}
@@ -704,7 +709,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetScaleList(_scaleList);
+ else obj->GetScaleList(_scaleList);
_reply(_scaleList);
}
@@ -716,9 +721,13 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetMapViewScale(_sessionHandle, _scaleID);
- //todo: manage the isminmax indicator
- fireMapViewScaleChangedEvent(_mapViewInstanceHandle,_scaleID,MapViewerControl::MapScaleType::INVALID);
+ else {
+ obj->SetMapViewScale(_sessionHandle, _scaleID);
+ uint8_t current_scale;
+ MapViewerControl::MapScaleType is_min_max;
+ obj->GetMapViewScale(current_scale,is_min_max);
+ fireMapViewScaleChangedEvent(_mapViewInstanceHandle,current_scale,is_min_max);
+ }
_reply();
}
@@ -730,11 +739,13 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetMapViewScaleByDelta(_sessionHandle, _scaleDelta);
- uint8_t current_scale;
- MapViewerControl::MapScaleType is_min_max;
- obj->GetMapViewScale(current_scale,is_min_max);
- fireMapViewScaleChangedEvent(_mapViewInstanceHandle,current_scale,is_min_max);
+ else {
+ obj->SetMapViewScaleByDelta(_sessionHandle, _scaleDelta);
+ uint8_t current_scale;
+ MapViewerControl::MapScaleType is_min_max;
+ obj->GetMapViewScale(current_scale,is_min_max);
+ fireMapViewScaleChangedEvent(_mapViewInstanceHandle,current_scale,is_min_max);
+ }
_reply();
}
@@ -750,12 +761,12 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
* description: getMapViewScale = This method returns the currently used map scale
*/
void getMapViewScale(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _mapViewInstanceHandle, getMapViewScaleReply_t _reply){
- uint8_t _scaleID;
- MapViewerControl::MapScaleType _isMinMax;
+ uint8_t _scaleID=0;
+ MapViewerControl::MapScaleType _isMinMax=MapViewerControl::MapScaleType::INVALID;
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetMapViewScale(_scaleID, _isMinMax);
+ else obj->GetMapViewScale(_scaleID, _isMinMax);
_reply(_scaleID,_isMinMax);
}
@@ -766,7 +777,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetMapViewBoundingBox(_sessionHandle, _boundingBox);
+ else obj->SetMapViewBoundingBox(_sessionHandle, _boundingBox);
_reply();
}
@@ -779,7 +790,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetMapViewBoundingBox(_boundingBox);
+ else obj->GetMapViewBoundingBox(_boundingBox);
_reply(_boundingBox);
}
@@ -807,10 +818,12 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- if (_pixelCoordinates.size())
- {
- pixel = _pixelCoordinates.at(0);
- obj->SetMapViewPan(_sessionHandle, _panningAction, pixel);
+ else {
+ if (_pixelCoordinates.size())
+ {
+ pixel = _pixelCoordinates.at(0);
+ obj->SetMapViewPan(_sessionHandle, _panningAction, pixel);
+ }
}
_reply();
}
@@ -824,7 +837,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetMapViewPan(_valueToReturn, pixel); //limited to one pixel coordinate
+ else obj->GetMapViewPan(_valueToReturn, pixel); //limited to one pixel coordinate
_pixelCoordinates.push_back(pixel);
_reply(_pixelCoordinates);
}
@@ -836,7 +849,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetMapViewRotation(_sessionHandle, _rotationAngle, _rotationAnglePerSecond);
+ else obj->SetMapViewRotation(_sessionHandle, _rotationAngle, _rotationAnglePerSecond);
_reply();
}
@@ -845,12 +858,12 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
* purposes
*/
void getMapViewRotation(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _mapViewInstanceHandle, getMapViewRotationReply_t _reply){
- int32_t _rotationAngle;
- int32_t _rotationAnglePerFrame;
+ int32_t _rotationAngle=0;
+ int32_t _rotationAnglePerFrame=0;
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetMapViewRotation(_rotationAngle, _rotationAnglePerFrame);
+ else obj->GetMapViewRotation(_rotationAngle, _rotationAnglePerFrame);
_reply(_rotationAngle,_rotationAnglePerFrame);
}
@@ -907,7 +920,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->DisplayRoute(_sessionHandle, _routeHandle, _highlighted);
+ else obj->DisplayRoute(_sessionHandle, _routeHandle, _highlighted);
_reply();
}
@@ -918,7 +931,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->HideRoute(_sessionHandle, _routeHandle);
+ else obj->HideRoute(_sessionHandle, _routeHandle);
_reply();
}
@@ -927,10 +940,10 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
*/
void getDisplayedRoutes(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _mapViewInstanceHandle, getDisplayedRoutesReply_t _reply){
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
+ std::vector<MapViewerControl::DisplayedRoute> _displayedRoutes;
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- std::vector<MapViewerControl::DisplayedRoute> _displayedRoutes;
- obj->GetDisplayedRoutes(_displayedRoutes);
+ else obj->GetDisplayedRoutes(_displayedRoutes);
_reply(_displayedRoutes);
}
@@ -985,7 +998,7 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->SetMapViewTheme(_sessionHandle, _mapViewTheme);
+ else obj->SetMapViewTheme(_sessionHandle, _mapViewTheme);
_reply();
}
@@ -994,11 +1007,11 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
* instance
*/
void getMapViewTheme(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _mapViewInstanceHandle, getMapViewThemeReply_t _reply){
- MapViewerControl::MapTheme _mapViewTheme;
+ MapViewerControl::MapTheme _mapViewTheme=MapViewerControl::MapTheme::INVALID;
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- obj->GetMapViewTheme(_mapViewTheme);
+ else obj->GetMapViewTheme(_mapViewTheme);
_reply(_mapViewTheme);
}
@@ -1016,10 +1029,10 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
*/
void convertPixelCoordsToGeoCoords(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _sessionHandle, ::v4::org::genivi::navigation::NavigationTypes::Handle _mapViewInstanceHandle, std::vector<MapViewerControl::Pixel> _pixelCoordinates, convertPixelCoordsToGeoCoordsReply_t _reply){
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
+ std::vector< ::v4::org::genivi::navigation::NavigationTypes::Coordinate2D> _geoCoordinates;
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- std::vector< ::v4::org::genivi::navigation::NavigationTypes::Coordinate2D> _geoCoordinates;
- obj->ConvertPixelCoordsToGeoCoords(_sessionHandle, _pixelCoordinates, _geoCoordinates);
+ else obj->ConvertPixelCoordsToGeoCoords(_sessionHandle, _pixelCoordinates, _geoCoordinates);
_reply(_geoCoordinates);
}
@@ -1029,10 +1042,10 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault
*/
void convertGeoCoordsToPixelCoords(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _sessionHandle, ::v4::org::genivi::navigation::NavigationTypes::Handle _mapViewInstanceHandle, std::vector< ::v4::org::genivi::navigation::NavigationTypes::Coordinate2D> _geoCoordinates, convertGeoCoordsToPixelCoordsReply_t _reply){
MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle];
+ std::vector<MapViewerControl::Pixel> _pixelCoordinates;
if (!obj)
throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle");
- std::vector<MapViewerControl::Pixel> _pixelCoordinates;
- obj->ConvertGeoCoordsToPixelCoords(_sessionHandle, _geoCoordinates, _pixelCoordinates);
+ else obj->ConvertGeoCoordsToPixelCoords(_sessionHandle, _geoCoordinates, _pixelCoordinates);
_reply(_pixelCoordinates);
}
@@ -1116,12 +1129,13 @@ MapViewerControlObj::SetMapViewScale(NavigationTypes::Handle SessionHandle, uint
void
MapViewerControlObj::SetMapViewScaleByDelta(NavigationTypes::Handle SessionHandle, int16_t ScaleDelta)
{
- if (!ScaleDelta)
+ if (!ScaleDelta)
throw DBus::ErrorInvalidArgs("ScaleDelta must not be 0");
- if (ScaleDelta < 0)
- navit_zoom_out(m_navit.u.navit,1 << (-ScaleDelta),NULL);
- else if (ScaleDelta > 0)
- navit_zoom_in(m_navit.u.navit,1 << ScaleDelta,NULL);
+ else {
+ if (ScaleDelta < 0)
+ navit_zoom_out(m_navit.u.navit,1 << (-ScaleDelta),NULL);
+ else navit_zoom_in(m_navit.u.navit,1 << ScaleDelta,NULL);
+ }
}
void
@@ -1490,7 +1504,7 @@ MapViewerControlObj::GetMapViewBoundingBox(NavigationTypes::Rectangle& boundingB
void
MapViewerControlObj::GetDisplayedRoutes(std::vector<MapViewerControl::DisplayedRoute>& displayedRoutes)
{
- int i;
+ size_t i;
for (i = 0 ; i < m_displayed_routes.size(); i++) {
MapViewerControl::DisplayedRoute route;
route.setRouteHandle(m_displayed_routes[i]->RouteHandle());
diff --git a/src/navigation/map-viewer/session-server-plugin/CMakeLists.txt b/src/navigation/map-viewer/session-server-plugin/CMakeLists.txt
index 797bf89..df45597 100644
--- a/src/navigation/map-viewer/session-server-plugin/CMakeLists.txt
+++ b/src/navigation/map-viewer/session-server-plugin/CMakeLists.txt
@@ -27,29 +27,6 @@ set(CMAKE_CXX_FLAGS "-Wall -std=c++0x")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
-
-# DBus Path
-if(DBUS_LIB_PATH)
- set(DBUS_INCLUDE_DIRS ${DBUS_LIB_PATH}/include/dbus-1.0 ${DBUS_LIB_PATH}/lib/dbus-1.0/include)
- set(DBUS_LIBDIR ${DBUS_LIB_PATH}/lib)
- set(DBUS_LIBRARIES ${DBUS_LIB_PATH}/lib/libdbus-1.so)
-else()
- message(FATAL_ERROR "Please specify the path to your patched DBus library using -DDBUS_LIB_PATH=yourPath")
-endif()
-
-# Packages
-find_package(CommonAPI 3.1.5 REQUIRED)
-find_package(CommonAPI-DBus 3.1.5 REQUIRED)
-
-
-#pkg_check_modules(DBUS "dbus-1 >= 1.8.4") // #to be fixed, it doesn't work so the paths are set manually (see above)
-pkg_check_modules(COMMONAPI "CommonAPI >= 3.1.5")
-pkg_check_modules(COMMONAPI_DBUS "CommonAPI-DBus >= 3.1.5")
-pkg_check_modules(GOBJECT gobject-2.0)
-pkg_check_modules(GLIB REQUIRED glib-2.0)
-pkg_check_modules(DBUS_CPP_GLIB dbus-c++-glib-1)
-
-
# Path to the generated files
set(API_VERSION_MAJOR 4)
set(API_VERSION "v${API_VERSION_MAJOR}")
diff --git a/src/navigation/navigation-core/CMakeLists.txt b/src/navigation/navigation-core/CMakeLists.txt
index d6b08c9..4a0d362 100644
--- a/src/navigation/navigation-core/CMakeLists.txt
+++ b/src/navigation/navigation-core/CMakeLists.txt
@@ -90,6 +90,26 @@ if(${YOCTO_CONFIG})
endif()
if (WITH_PLUGIN_MIGRATION)
+ # DBus Path
+ if(DBUS_LIB_PATH)
+ set(DBUS_INCLUDE_DIRS ${DBUS_LIB_PATH}/include/dbus-1.0 ${DBUS_LIB_PATH}/lib/dbus-1.0/include)
+ set(DBUS_LIBDIR ${DBUS_LIB_PATH}/lib)
+ set(DBUS_LIBRARIES ${DBUS_LIB_PATH}/lib/libdbus-1.so)
+ else()
+ message(FATAL_ERROR "Please specify the path to your patched DBus library using -DDBUS_LIB_PATH=yourPath")
+ endif()
+
+ # Packages
+ find_package(CommonAPI)
+ find_package(CommonAPI-DBus)
+
+ #pkg_check_modules(DBUS "dbus-1 >= 1.8.4") // #to be fixed, it doesn't work so the paths are set manually (see above)
+ pkg_check_modules(COMMONAPI "CommonAPI >= 3.1.5")
+ pkg_check_modules(COMMONAPI_DBUS "CommonAPI-DBus >= 3.1.5")
+ pkg_check_modules(GOBJECT gobject-2.0)
+ pkg_check_modules(GLIB REQUIRED glib-2.0)
+ pkg_check_modules(DBUS_CPP_GLIB dbus-c++-glib-1)
+
set(FRANCA_DIR "${API_DIR}/franca")
add_subdirectory(configuration-server-plugin)
add_subdirectory(locationinput-server-plugin)
diff --git a/src/navigation/navigation-core/configuration-server-plugin/CMakeLists.txt b/src/navigation/navigation-core/configuration-server-plugin/CMakeLists.txt
index 7b286e6..4e35c17 100644
--- a/src/navigation/navigation-core/configuration-server-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/configuration-server-plugin/CMakeLists.txt
@@ -28,28 +28,6 @@ set(CMAKE_CXX_FLAGS "-Wall -std=c++0x")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
-
-# DBus Path
-if(DBUS_LIB_PATH)
- set(DBUS_INCLUDE_DIRS ${DBUS_LIB_PATH}/include/dbus-1.0 ${DBUS_LIB_PATH}/lib/dbus-1.0/include)
- set(DBUS_LIBDIR ${DBUS_LIB_PATH}/lib)
- set(DBUS_LIBRARIES ${DBUS_LIB_PATH}/lib/libdbus-1.so)
-else()
- message(FATAL_ERROR "Please specify the path to your patched DBus library using -DDBUS_LIB_PATH=yourPath")
-endif()
-
-# Packages
-find_package(CommonAPI 3.1.5 REQUIRED)
-find_package(CommonAPI-DBus 3.1.5 REQUIRED)
-
-
-#pkg_check_modules(DBUS "dbus-1 >= 1.8.4") // #to be fixed, it doesn't work so the paths are set manually (see above)
-pkg_check_modules(COMMONAPI "CommonAPI >= 3.1.5")
-pkg_check_modules(COMMONAPI_DBUS "CommonAPI-DBus >= 3.1.5")
-pkg_check_modules(GOBJECT gobject-2.0)
-pkg_check_modules(GLIB REQUIRED glib-2.0)
-
-
# Path to the generated files
set(API_VERSION_MAJOR 4)
set(API_VERSION "v${API_VERSION_MAJOR}")
diff --git a/src/navigation/navigation-core/enhancedposition-client-plugin/CMakeLists.txt b/src/navigation/navigation-core/enhancedposition-client-plugin/CMakeLists.txt
index 65bcaa7..3d4e7fe 100644
--- a/src/navigation/navigation-core/enhancedposition-client-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/enhancedposition-client-plugin/CMakeLists.txt
@@ -28,29 +28,6 @@ set(CMAKE_CXX_FLAGS "-Wall -std=c++0x")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
-
-# DBus Path
-if(DBUS_LIB_PATH)
- set(DBUS_INCLUDE_DIRS ${DBUS_LIB_PATH}/include/dbus-1.0 ${DBUS_LIB_PATH}/lib/dbus-1.0/include)
- set(DBUS_LIBDIR ${DBUS_LIB_PATH}/lib)
- set(DBUS_LIBRARIES ${DBUS_LIB_PATH}/lib/libdbus-1.so)
-else()
- message(FATAL_ERROR "Please specify the path to your patched DBus library using -DDBUS_LIB_PATH=yourPath")
-endif()
-
-# Packages
-find_package(CommonAPI 3.1.5 REQUIRED)
-find_package(CommonAPI-DBus 3.1.5 REQUIRED)
-
-
-#pkg_check_modules(DBUS "dbus-1 >= 1.8.4") // #to be fixed, it doesn't work so the paths are set manually (see above)
-pkg_check_modules(COMMONAPI "CommonAPI >= 3.1.5")
-pkg_check_modules(COMMONAPI_DBUS "CommonAPI-DBus >= 3.1.5")
-pkg_check_modules(GOBJECT gobject-2.0)
-pkg_check_modules(GLIB REQUIRED glib-2.0)
-pkg_check_modules(DBUS_CPP_GLIB dbus-c++-glib-1)
-
-
# Path to the generated files
set(PRJ_SRC_GEN_ENHANCEDPOSITIONSERVICE_PATH "${COMMONAPI_GEN_DIR_POSITIONING}/org/genivi/EnhancedPositionService") #files shared by the enhanced position service APIs
diff --git a/src/navigation/navigation-core/guidance-server-plugin/CMakeLists.txt b/src/navigation/navigation-core/guidance-server-plugin/CMakeLists.txt
index 8477e5b..749b82a 100644
--- a/src/navigation/navigation-core/guidance-server-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/guidance-server-plugin/CMakeLists.txt
@@ -28,29 +28,6 @@ set(CMAKE_CXX_FLAGS "-Wall -std=c++0x")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
-
-# DBus Path
-if(DBUS_LIB_PATH)
- set(DBUS_INCLUDE_DIRS ${DBUS_LIB_PATH}/include/dbus-1.0 ${DBUS_LIB_PATH}/lib/dbus-1.0/include)
- set(DBUS_LIBDIR ${DBUS_LIB_PATH}/lib)
- set(DBUS_LIBRARIES ${DBUS_LIB_PATH}/lib/libdbus-1.so)
-else()
- message(FATAL_ERROR "Please specify the path to your patched DBus library using -DDBUS_LIB_PATH=yourPath")
-endif()
-
-# Packages
-find_package(CommonAPI 3.1.5 REQUIRED)
-find_package(CommonAPI-DBus 3.1.5 REQUIRED)
-
-
-#pkg_check_modules(DBUS "dbus-1 >= 1.8.4") // #to be fixed, it doesn't work so the paths are set manually (see above)
-pkg_check_modules(COMMONAPI "CommonAPI >= 3.1.5")
-pkg_check_modules(COMMONAPI_DBUS "CommonAPI-DBus >= 3.1.5")
-pkg_check_modules(GOBJECT gobject-2.0)
-pkg_check_modules(GLIB REQUIRED glib-2.0)
-pkg_check_modules(DBUS_CPP_GLIB dbus-c++-glib-1)
-
-
# Path to the generated files
set(API_VERSION_MAJOR 4)
set(API_VERSION "v${API_VERSION_MAJOR}")
diff --git a/src/navigation/navigation-core/locationinput-server-plugin/CMakeLists.txt b/src/navigation/navigation-core/locationinput-server-plugin/CMakeLists.txt
index 5cee666..20cb3ac 100644
--- a/src/navigation/navigation-core/locationinput-server-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/locationinput-server-plugin/CMakeLists.txt
@@ -28,29 +28,6 @@ set(CMAKE_CXX_FLAGS "-Wall -std=c++0x")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
-
-# DBus Path
-if(DBUS_LIB_PATH)
- set(DBUS_INCLUDE_DIRS ${DBUS_LIB_PATH}/include/dbus-1.0 ${DBUS_LIB_PATH}/lib/dbus-1.0/include)
- set(DBUS_LIBDIR ${DBUS_LIB_PATH}/lib)
- set(DBUS_LIBRARIES ${DBUS_LIBDIR}/libdbus-1.so)
-else()
- message(FATAL_ERROR "Please specify the path to your patched DBus library using -DDBUS_LIB_PATH=yourPath")
-endif()
-
-# Packages
-find_package(CommonAPI 3.1.5 REQUIRED)
-find_package(CommonAPI-DBus 3.1.5 REQUIRED)
-
-
-#pkg_check_modules(DBUS "dbus-1 >= 1.8.4") // #to be fixed, it doesn't work so the paths are set manually (see above)
-pkg_check_modules(COMMONAPI "CommonAPI >= 3.1.5")
-pkg_check_modules(COMMONAPI_DBUS "CommonAPI-DBus >= 3.1.5")
-pkg_check_modules(GOBJECT gobject-2.0)
-pkg_check_modules(GLIB REQUIRED glib-2.0)
-pkg_check_modules(DBUS_CPP_GLIB dbus-c++-glib-1)
-
-
# Path to the generated files
set(API_VERSION_MAJOR 4)
set(API_VERSION "v${API_VERSION_MAJOR}")
diff --git a/src/navigation/navigation-core/mapmatchedposition-server-plugin/CMakeLists.txt b/src/navigation/navigation-core/mapmatchedposition-server-plugin/CMakeLists.txt
index 1251da4..bf5cac5 100644
--- a/src/navigation/navigation-core/mapmatchedposition-server-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/mapmatchedposition-server-plugin/CMakeLists.txt
@@ -28,29 +28,6 @@ set(CMAKE_CXX_FLAGS "-Wall -std=c++0x")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
-
-# DBus Path
-if(DBUS_LIB_PATH)
- set(DBUS_INCLUDE_DIRS ${DBUS_LIB_PATH}/include/dbus-1.0 ${DBUS_LIB_PATH}/lib/dbus-1.0/include)
- set(DBUS_LIBDIR ${DBUS_LIB_PATH}/lib)
- set(DBUS_LIBRARIES ${DBUS_LIB_PATH}/lib/libdbus-1.so)
-else()
- message(FATAL_ERROR "Please specify the path to your patched DBus library using -DDBUS_LIB_PATH=yourPath")
-endif()
-
-# Packages
-find_package(CommonAPI 3.1.5 REQUIRED)
-find_package(CommonAPI-DBus 3.1.5 REQUIRED)
-
-
-#pkg_check_modules(DBUS "dbus-1 >= 1.8.4") // #to be fixed, it doesn't work so the paths are set manually (see above)
-pkg_check_modules(COMMONAPI "CommonAPI >= 3.1.5")
-pkg_check_modules(COMMONAPI_DBUS "CommonAPI-DBus >= 3.1.5")
-pkg_check_modules(GOBJECT gobject-2.0)
-pkg_check_modules(GLIB REQUIRED glib-2.0)
-pkg_check_modules(DBUS_CPP_GLIB dbus-c++-glib-1)
-
-
# Path to the generated files
set(API_VERSION_MAJOR 4)
set(API_VERSION "v${API_VERSION_MAJOR}")
diff --git a/src/navigation/navigation-core/poicam-server-plugin/CMakeLists.txt b/src/navigation/navigation-core/poicam-server-plugin/CMakeLists.txt
index dee705b..2256ffa 100644
--- a/src/navigation/navigation-core/poicam-server-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/poicam-server-plugin/CMakeLists.txt
@@ -28,29 +28,6 @@ set(CMAKE_CXX_FLAGS "-Wall -std=c++0x")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
-
-# DBus Path
-if(DBUS_LIB_PATH)
- set(DBUS_INCLUDE_DIRS ${DBUS_LIB_PATH}/include/dbus-1.0 ${DBUS_LIB_PATH}/lib/dbus-1.0/include)
- set(DBUS_LIBDIR ${DBUS_LIB_PATH}/lib)
- set(DBUS_LIBRARIES ${DBUS_LIB_PATH}/lib/libdbus-1.so)
-else()
- message(FATAL_ERROR "Please specify the path to your patched DBus library using -DDBUS_LIB_PATH=yourPath")
-endif()
-
-# Packages
-find_package(CommonAPI 3.1.5 REQUIRED)
-find_package(CommonAPI-DBus 3.1.5 REQUIRED)
-
-
-#pkg_check_modules(DBUS "dbus-1 >= 1.8.4") // #to be fixed, it doesn't work so the paths are set manually (see above)
-pkg_check_modules(COMMONAPI "CommonAPI >= 3.1.5")
-pkg_check_modules(COMMONAPI_DBUS "CommonAPI-DBus >= 3.1.5")
-pkg_check_modules(GOBJECT gobject-2.0)
-pkg_check_modules(GLIB REQUIRED glib-2.0)
-pkg_check_modules(DBUS_CPP_GLIB dbus-c++-glib-1)
-
-
# Path to the generated files
set(API_VERSION_MAJOR 4)
set(API_VERSION "v${API_VERSION_MAJOR}")
diff --git a/src/navigation/navigation-core/routing-server-plugin/CMakeLists.txt b/src/navigation/navigation-core/routing-server-plugin/CMakeLists.txt
index c8d0a5b..ea1fbcf 100644
--- a/src/navigation/navigation-core/routing-server-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/routing-server-plugin/CMakeLists.txt
@@ -28,29 +28,6 @@ set(CMAKE_CXX_FLAGS "-Wall -std=c++0x")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
-
-# DBus Path
-if(DBUS_LIB_PATH)
- set(DBUS_INCLUDE_DIRS ${DBUS_LIB_PATH}/include/dbus-1.0 ${DBUS_LIB_PATH}/lib/dbus-1.0/include)
- set(DBUS_LIBDIR ${DBUS_LIB_PATH}/lib)
- set(DBUS_LIBRARIES ${DBUS_LIB_PATH}/lib/libdbus-1.so)
-else()
- message(FATAL_ERROR "Please specify the path to your patched DBus library using -DDBUS_LIB_PATH=yourPath")
-endif()
-
-# Packages
-find_package(CommonAPI 3.1.5 REQUIRED)
-find_package(CommonAPI-DBus 3.1.5 REQUIRED)
-
-
-#pkg_check_modules(DBUS "dbus-1 >= 1.8.4") // #to be fixed, it doesn't work so the paths are set manually (see above)
-pkg_check_modules(COMMONAPI "CommonAPI >= 3.1.5")
-pkg_check_modules(COMMONAPI_DBUS "CommonAPI-DBus >= 3.1.5")
-pkg_check_modules(GOBJECT gobject-2.0)
-pkg_check_modules(GLIB REQUIRED glib-2.0)
-pkg_check_modules(DBUS_CPP_GLIB dbus-c++-glib-1)
-
-
# Path to the generated files
set(API_VERSION_MAJOR 4)
set(API_VERSION "v${API_VERSION_MAJOR}")
diff --git a/src/navigation/navigation-core/routing-server-plugin/genivi_navigationcore_routing.cxx b/src/navigation/navigation-core/routing-server-plugin/genivi_navigationcore_routing.cxx
index bef3b16..ae10e09 100644
--- a/src/navigation/navigation-core/routing-server-plugin/genivi_navigationcore_routing.cxx
+++ b/src/navigation/navigation-core/routing-server-plugin/genivi_navigationcore_routing.cxx
@@ -405,7 +405,7 @@ class RoutingServerStub : public RoutingStubDefault
* starting from the one closest to the current position to the one closest to
* the destination
*/
- void getRouteSegments(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _routeHandle, int16_t _detailLevel, std::vector<Routing::RouteSegmentType> _valuesToReturn, uint32_t _numberOfSegments, uint32_t _offset, getRouteSegmentsReply_t _reply){
+ void getRouteSegments(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _routeHandle, int16_t _detailLevel, std::vector< Routing::RouteSegmentType > _valuesToReturn, uint32_t _numberOfSegments, uint32_t _offset, getRouteSegmentsReply_t _reply){
dbg(lvl_debug,"enter\n");
uint32_t _totalNumberOfSegments;
std::vector<Routing::RouteSegment> _routeSegments;
diff --git a/src/navigation/navigation-core/session-server-plugin/CMakeLists.txt b/src/navigation/navigation-core/session-server-plugin/CMakeLists.txt
index 680f83c..5a4931a 100644
--- a/src/navigation/navigation-core/session-server-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/session-server-plugin/CMakeLists.txt
@@ -27,29 +27,6 @@ set(CMAKE_CXX_FLAGS "-Wall -std=c++0x")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
-
-# DBus Path
-if(DBUS_LIB_PATH)
- set(DBUS_INCLUDE_DIRS ${DBUS_LIB_PATH}/include/dbus-1.0 ${DBUS_LIB_PATH}/lib/dbus-1.0/include)
- set(DBUS_LIBDIR ${DBUS_LIB_PATH}/lib)
- set(DBUS_LIBRARIES ${DBUS_LIB_PATH}/lib/libdbus-1.so)
-else()
- message(FATAL_ERROR "Please specify the path to your patched DBus library using -DDBUS_LIB_PATH=yourPath")
-endif()
-
-# Packages
-find_package(CommonAPI 3.1.5 REQUIRED)
-find_package(CommonAPI-DBus 3.1.5 REQUIRED)
-
-
-#pkg_check_modules(DBUS "dbus-1 >= 1.8.4") // #to be fixed, it doesn't work so the paths are set manually (see above)
-pkg_check_modules(COMMONAPI "CommonAPI >= 3.1.5")
-pkg_check_modules(COMMONAPI_DBUS "CommonAPI-DBus >= 3.1.5")
-pkg_check_modules(GOBJECT gobject-2.0)
-pkg_check_modules(GLIB REQUIRED glib-2.0)
-pkg_check_modules(DBUS_CPP_GLIB dbus-c++-glib-1)
-
-
# Path to the generated files
set(API_VERSION_MAJOR 4)
set(API_VERSION "v${API_VERSION_MAJOR}")
diff --git a/test/navigation/test-address-input-capi.py b/test/navigation/test-address-input-capi.py
index 0eccc2e..cb0a189 100755
--- a/test/navigation/test-address-input-capi.py
+++ b/test/navigation/test-address-input-capi.py
@@ -329,15 +329,15 @@ def search_result_list_handler(handle, total_size, window_offset, window_size, r
# add signal receiver
bus.add_signal_receiver(search_status_handler,
- dbus_interface='org.genivi.navigation.navigationcore.LocationInput',
+ dbus_interface='org.genivi.navigation.navigationcore.LocationInput.v4_0',
signal_name='searchStatus')
bus.add_signal_receiver(search_result_list_handler,
- dbus_interface='org.genivi.navigation.navigationcore.LocationInput',
+ dbus_interface='org.genivi.navigation.navigationcore.LocationInput.v4_0',
signal_name='searchResultList')
bus.add_signal_receiver(content_updated_handler,
- dbus_interface='org.genivi.navigation.navigationcore.LocationInput',
+ dbus_interface='org.genivi.navigation.navigationcore.LocationInput.v4_0',
signal_name='contentUpdated')
@@ -373,16 +373,16 @@ def startSearch(address_index):
full_string_search(location_input_handle, target_search_string)
-session = bus.get_object('org.genivi.navigation.navigationcore.Session_Session', '/Session')
-session_interface = dbus.Interface(session, dbus_interface='org.genivi.navigation.navigationcore.Session')
+session = bus.get_object('org.genivi.navigation.navigationcore.Session.v4_0_Session', '/Session')
+session_interface = dbus.Interface(session, dbus_interface='org.genivi.navigation.navigationcore.Session.v4_0')
# Get SessionHandle
ret = session_interface.createSession(dbus.String('test location input'))
session_handle=ret[1]
print ('Session handle = ' + str(session_handle))
-location_input_obj = bus.get_object('org.genivi.navigation.navigationcore.LocationInput_LocationInput', '/LocationInput')
-location_input_interface = dbus.Interface(location_input_obj, dbus_interface='org.genivi.navigation.navigationcore.LocationInput')
+location_input_obj = bus.get_object('org.genivi.navigation.navigationcore.LocationInput.v4_0_LocationInput', '/LocationInput')
+location_input_interface = dbus.Interface(location_input_obj, dbus_interface='org.genivi.navigation.navigationcore.LocationInput.v4_0')
# Get LocationInputHandle
ret = location_input_interface.createLocationInput(dbus.UInt32(session_handle))
location_input_handle = ret[1]
diff --git a/test/navigation/test-all b/test/navigation/test-all
new file mode 100755
index 0000000..215e522
--- /dev/null
+++ b/test/navigation/test-all
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+./test-location-input.py -l locations.xml
+sleep 2
+./test-route-calculation.py -r routes.xml
+sleep 2
+./test-address-input.py -l location.xml
+sleep 2
+./test-guidance.py -r route.xml
+sleep 2
+./test-map-viewer-control.py
diff --git a/test/navigation/test-all-capi b/test/navigation/test-all-capi
new file mode 100755
index 0000000..3e021c8
--- /dev/null
+++ b/test/navigation/test-all-capi
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+./test-location-input-capi.py -l locations.xml
+sleep 2
+./test-route-calculation-capi.py -r routes.xml
+sleep 2
+./test-address-input-capi.py -l location.xml
+sleep 2
+./test-guidance-capi.py -r route.xml
+sleep 2
+./test-map-viewer-control-capi.py
+
diff --git a/test/navigation/test-guidance-capi.py b/test/navigation/test-guidance-capi.py
index 0730e04..8113c94 100755
--- a/test/navigation/test-guidance-capi.py
+++ b/test/navigation/test-guidance-capi.py
@@ -83,9 +83,7 @@ def routing_routeCalculationSuccessful_handler(routeHandle,unfullfilledPreferenc
h, m = divmod(m, 60)
print "Total Time: %d:%02d:%02d" % (h, m, s)
#get route segments GetRouteSegments(const uint32_t& routeHandle, const int16_t& detailLevel, const std::vector< DBusCommonAPIEnumeration >& valuesToReturn, const uint32_t& numberOfSegments, const uint32_t& offset, uint32_t& totalNumberOfSegments, std::vector< std::map< DBusCommonAPIEnumeration, DBusCommonAPIVariant > >& routeSegments)
- valuesToReturn = [dbus.Int32(GENIVI_NAVIGATIONCORE_TOTAL_DISTANCE),
- dbus.Int32(GENIVI_NAVIGATIONCORE_TOTAL_TIME),
- dbus.Int32(GENIVI_NAVIGATIONCORE_ROAD_NAME),
+ valuesToReturn = [dbus.Int32(GENIVI_NAVIGATIONCORE_ROAD_NAME),
dbus.Int32(GENIVI_NAVIGATIONCORE_START_LATITUDE),
dbus.Int32(GENIVI_NAVIGATIONCORE_END_LATITUDE),
dbus.Int32(GENIVI_NAVIGATIONCORE_START_LONGITUDE),
@@ -270,50 +268,50 @@ if __name__ == '__main__':
bus = dbus.SessionBus()
bus.add_signal_receiver(routing_routeCalculationProgressUpdate_handler, \
- dbus_interface = "org.genivi.navigation.navigationcore.Routing", \
+ dbus_interface = "org.genivi.navigation.navigationcore.Routing.v4_0", \
signal_name = "routeCalculationProgressUpdate")
bus.add_signal_receiver(routing_routeCalculationSuccessful_handler, \
- dbus_interface = "org.genivi.navigation.navigationcore.Routing", \
+ dbus_interface = "org.genivi.navigation.navigationcore.Routing.v4_0", \
signal_name = "routeCalculationSuccessful")
bus.add_signal_receiver(routing_routeDeleted_handler, \
- dbus_interface = "org.genivi.navigation.navigationcore.Routing", \
+ dbus_interface = "org.genivi.navigation.navigationcore.Routing.v4_0", \
signal_name = "routeDeleted")
bus.add_signal_receiver(session_sessionDeleted_handler, \
- dbus_interface = "org.genivi.navigation.navigationcore.Session", \
+ dbus_interface = "org.genivi.navigation.navigationcore.Session.v4_0", \
signal_name = "sessionDeleted")
bus.add_signal_receiver(guidance_guidanceStatusChanged_handler, \
- dbus_interface = "org.genivi.navigation.navigationcore.Guidance", \
+ dbus_interface = "org.genivi.navigation.navigationcore.Guidance.v4_0", \
signal_name = "guidanceStatusChanged")
bus.add_signal_receiver(guidance_positionOnRouteChanged_handler, \
- dbus_interface = "org.genivi.navigation.navigationcore.Guidance", \
+ dbus_interface = "org.genivi.navigation.navigationcore.Guidance.v4_0", \
signal_name = "positionOnRouteChanged")
bus.add_signal_receiver(mapmatchedposition_simulationStatusChanged_handler, \
- dbus_interface = "org.genivi.navigation.navigationcore.MapMatchedPosition", \
+ dbus_interface = "org.genivi.navigation.navigationcore.MapMatchedPosition.v4_0", \
signal_name = "simulationStatusChanged")
-navigationcore_session_obj = bus.get_object('org.genivi.navigation.navigationcore.Session_Session','/Session')
-g_navigationcore_session_interface = dbus.Interface(navigationcore_session_obj, dbus_interface='org.genivi.navigation.navigationcore.Session')
+navigationcore_session_obj = bus.get_object('org.genivi.navigation.navigationcore.Session.v4_0_Session','/Session')
+g_navigationcore_session_interface = dbus.Interface(navigationcore_session_obj, dbus_interface='org.genivi.navigation.navigationcore.Session.v4_0')
-routing_obj = bus.get_object('org.genivi.navigation.navigationcore.Routing_Routing','/Routing')
-g_routing_interface = dbus.Interface(routing_obj, dbus_interface='org.genivi.navigation.navigationcore.Routing')
+routing_obj = bus.get_object('org.genivi.navigation.navigationcore.Routing.v4_0_Routing','/Routing')
+g_routing_interface = dbus.Interface(routing_obj, dbus_interface='org.genivi.navigation.navigationcore.Routing.v4_0')
-guidance_obj = bus.get_object('org.genivi.navigation.navigationcore.Guidance_Guidance','/Guidance')
-g_guidance_interface = dbus.Interface(guidance_obj, dbus_interface='org.genivi.navigation.navigationcore.Guidance')
+guidance_obj = bus.get_object('org.genivi.navigation.navigationcore.Guidance.v4_0_Guidance','/Guidance')
+g_guidance_interface = dbus.Interface(guidance_obj, dbus_interface='org.genivi.navigation.navigationcore.Guidance.v4_0')
-mapviewer_session_obj = bus.get_object('org.genivi.navigation.mapviewer.Session_Session','/Session')
-g_mapviewer_session_interface = dbus.Interface(mapviewer_session_obj, dbus_interface='org.genivi.navigation.mapviewer.Session')
+mapviewer_session_obj = bus.get_object('org.genivi.navigation.mapviewer.Session.v4_0_Session','/Session')
+g_mapviewer_session_interface = dbus.Interface(mapviewer_session_obj, dbus_interface='org.genivi.navigation.mapviewer.Session.v4_0')
-g_mapviewercontrol_obj = bus.get_object('org.genivi.navigation.mapviewer.MapViewerControl_MapViewerControl','/MapViewerControl')
-g_mapviewercontrol_interface = dbus.Interface(g_mapviewercontrol_obj, dbus_interface='org.genivi.navigation.mapviewer.MapViewerControl')
+g_mapviewercontrol_obj = bus.get_object('org.genivi.navigation.mapviewer.MapViewerControl.v4_0_MapViewerControl','/MapViewerControl')
+g_mapviewercontrol_interface = dbus.Interface(g_mapviewercontrol_obj, dbus_interface='org.genivi.navigation.mapviewer.MapViewerControl.v4_0')
-g_mapmatchedposition_obj = bus.get_object('org.genivi.navigation.navigationcore.MapMatchedPosition_MapMatchedPosition','/MapMatchedPosition')
-g_mapmatchedposition_interface = dbus.Interface(g_mapmatchedposition_obj, dbus_interface='org.genivi.navigation.navigationcore.MapMatchedPosition')
+g_mapmatchedposition_obj = bus.get_object('org.genivi.navigation.navigationcore.MapMatchedPosition.v4_0_MapMatchedPosition','/MapMatchedPosition')
+g_mapmatchedposition_interface = dbus.Interface(g_mapmatchedposition_obj, dbus_interface='org.genivi.navigation.navigationcore.MapMatchedPosition.v4_0')
#get navigationcore session handle
ret = g_navigationcore_session_interface.createSession(dbus.String("test guidance"))
diff --git a/test/navigation/test-guidance.py b/test/navigation/test-guidance.py
index f4f0158..a4a6f82 100755
--- a/test/navigation/test-guidance.py
+++ b/test/navigation/test-guidance.py
@@ -82,9 +82,7 @@ def routing_routeCalculationSuccessful_handler(routeHandle,unfullfilledPreferenc
h, m = divmod(m, 60)
print "Total Time: %d:%02d:%02d" % (h, m, s)
#get route segments GetRouteSegments(const uint32_t& routeHandle, const int16_t& detailLevel, const std::vector< DBusCommonAPIEnumeration >& valuesToReturn, const uint32_t& numberOfSegments, const uint32_t& offset, uint32_t& totalNumberOfSegments, std::vector< std::map< DBusCommonAPIEnumeration, DBusCommonAPIVariant > >& routeSegments)
- valuesToReturn = [dbus.Int32(GENIVI_NAVIGATIONCORE_TOTAL_DISTANCE),
- dbus.Int32(GENIVI_NAVIGATIONCORE_TOTAL_TIME),
- dbus.Int32(GENIVI_NAVIGATIONCORE_ROAD_NAME),
+ valuesToReturn = [dbus.Int32(GENIVI_NAVIGATIONCORE_ROAD_NAME),
dbus.Int32(GENIVI_NAVIGATIONCORE_START_LATITUDE),
dbus.Int32(GENIVI_NAVIGATIONCORE_END_LATITUDE),
dbus.Int32(GENIVI_NAVIGATIONCORE_START_LONGITUDE),
diff --git a/test/navigation/test-location-input-capi.py b/test/navigation/test-location-input-capi.py
index 2ec0723..091645c 100755
--- a/test/navigation/test-location-input-capi.py
+++ b/test/navigation/test-location-input-capi.py
@@ -36,7 +36,8 @@ import xml.dom.minidom
import argparse
import sys
import errno
-#import pdb;pdb.set_trace()
+#import pdb;
+#pdb.set_trace()
# constants as defined in the Navigation API
@@ -408,19 +409,19 @@ def search_result_list_handler(handle, total_size, window_offset, window_size, r
# add signal receiver
bus.add_signal_receiver(search_status_handler,
- dbus_interface='org.genivi.navigation.navigationcore.LocationInput',
+ dbus_interface='org.genivi.navigation.navigationcore.LocationInput.v4_0',
signal_name='searchStatus')
bus.add_signal_receiver(search_result_list_handler,
- dbus_interface='org.genivi.navigation.navigationcore.LocationInput',
+ dbus_interface='org.genivi.navigation.navigationcore.LocationInput.v4_0',
signal_name='searchResultList')
bus.add_signal_receiver(spell_result_handler,
- dbus_interface='org.genivi.navigation.navigationcore.LocationInput',
+ dbus_interface='org.genivi.navigation.navigationcore.LocationInput.v4_0',
signal_name='spellResult')
bus.add_signal_receiver(content_updated_handler,
- dbus_interface='org.genivi.navigation.navigationcore.LocationInput',
+ dbus_interface='org.genivi.navigation.navigationcore.LocationInput.v4_0',
signal_name='contentUpdated')
@@ -459,17 +460,16 @@ def startSearch(address_index):
elif country_search_mode == 1:
full_string_search(location_input_handle, target_search_string)
-
-session = bus.get_object('org.genivi.navigation.navigationcore.Session_Session', '/Session')
-session_interface = dbus.Interface(session, dbus_interface='org.genivi.navigation.navigationcore.Session')
+session = bus.get_object('org.genivi.navigation.navigationcore.Session.v4_0_Session', '/Session')
+session_interface = dbus.Interface(session, dbus_interface='org.genivi.navigation.navigationcore.Session.v4_0')
# Get SessionHandle
ret = session_interface.createSession(dbus.String('test location input'))
session_handle=ret[1]
print ('Session handle = ' + str(session_handle))
-location_input_obj = bus.get_object('org.genivi.navigation.navigationcore.LocationInput_LocationInput', '/LocationInput')
-location_input_interface = dbus.Interface(location_input_obj, dbus_interface='org.genivi.navigation.navigationcore.LocationInput')
+location_input_obj = bus.get_object('org.genivi.navigation.navigationcore.LocationInput.v4_0_LocationInput', '/LocationInput')
+location_input_interface = dbus.Interface(location_input_obj, dbus_interface='org.genivi.navigation.navigationcore.LocationInput.v4_0')
# Get LocationInputHandle
ret = location_input_interface.createLocationInput(dbus.UInt32(session_handle))
location_input_handle = ret[1]
diff --git a/test/navigation/test-map-viewer-control-capi.py b/test/navigation/test-map-viewer-control-capi.py
index 7f4aa90..9660851 100755
--- a/test/navigation/test-map-viewer-control-capi.py
+++ b/test/navigation/test-map-viewer-control-capi.py
@@ -32,7 +32,7 @@ import gobject
import dbus.mainloop.glib
import time
-#import pdb;
+import pdb
#pdb.set_trace()
#constants as defined in the Navigation API
@@ -54,9 +54,9 @@ def mapviewer_mapViewScaleChanged_handler(mapViewInstanceHandle,scale,isMinMax):
new_scale=int(scale)
print("Scale: "+str(new_scale))
print('Is min max: '+str(int(isMinMax)))
+ time.sleep(0.25)
if g_scale > new_scale and new_scale !=MIN_SCALE:
print("Zoom in")
-# pdb.set_trace()
g_scale=new_scale
MapViewerControl_interface.setMapViewScaleByDelta( \
dbus.UInt32(sessionhandle), \
@@ -95,11 +95,11 @@ if __name__ == '__main__':
bus = dbus.SessionBus()
bus.add_signal_receiver(mapviewer_mapViewScaleChanged_handler, \
- dbus_interface = "org.genivi.navigation.mapviewer.MapViewerControl", \
+ dbus_interface = "org.genivi.navigation.mapviewer.MapViewerControl.v4_0", \
signal_name = "mapViewScaleChanged")
-session = bus.get_object('org.genivi.navigation.mapviewer.Session_Session','/Session')
-session_interface = dbus.Interface(session, dbus_interface='org.genivi.navigation.mapviewer.Session')
+session = bus.get_object('org.genivi.navigation.mapviewer.Session.v4_0_Session','/Session')
+session_interface = dbus.Interface(session, dbus_interface='org.genivi.navigation.mapviewer.Session.v4_0')
#get session handle
ret = session_interface.createSession(dbus.String('test mapviewer'))
@@ -112,8 +112,8 @@ print 'Session status: ' + str(sessionstatus)
sessionlist = session_interface.getAllSessions();
print 'Active sessions = ' + str(len(sessionlist))
-MapViewerControl_obj = bus.get_object('org.genivi.navigation.mapviewer.MapViewerControl_MapViewerControl','/MapViewerControl')
-MapViewerControl_interface = dbus.Interface(MapViewerControl_obj, dbus_interface='org.genivi.navigation.mapviewer.MapViewerControl')
+MapViewerControl_obj = bus.get_object('org.genivi.navigation.mapviewer.MapViewerControl.v4_0_MapViewerControl','/MapViewerControl')
+MapViewerControl_interface = dbus.Interface(MapViewerControl_obj, dbus_interface='org.genivi.navigation.mapviewer.MapViewerControl.v4_0')
#get mapviewer handle
ret = MapViewerControl_interface.createMapViewInstance( \
@@ -121,6 +121,7 @@ ret = MapViewerControl_interface.createMapViewInstance( \
dbus.Struct((dbus.UInt16(HORIZONTAL_SIZE),dbus.UInt16(VERTICAL_SIZE))), \
dbus.Int32(MAIN_MAP))
mapviewerhandle=ret[1]
+
print 'MapView handle: ' + str(mapviewerhandle)
# Bern
@@ -167,13 +168,11 @@ print('Is min max: '+str(int(ret[1])))
g_scale=int(ret[0])
-time.sleep(3)
+time.sleep(0.25)
print 'Zoom in'
MapViewerControl_interface.setMapViewScaleByDelta(dbus.UInt32(sessionhandle), dbus.UInt32(mapviewerhandle), dbus.Int16(1))
-time.sleep(1)
-
#main loop
gobject.timeout_add(TIME_OUT, timeout)
loop = gobject.MainLoop()
diff --git a/test/navigation/test-map-viewer-control.py b/test/navigation/test-map-viewer-control.py
index 37a10c6..ae4219b 100755
--- a/test/navigation/test-map-viewer-control.py
+++ b/test/navigation/test-map-viewer-control.py
@@ -170,16 +170,12 @@ print('Is min max: '+str(int(ret[1])))
g_scale=int(ret[0])
-time.sleep(1)
-
print 'Zoom in'
MapViewerControl_interface.SetMapViewScaleByDelta( \
dbus.UInt32(sessionhandle), \
dbus.UInt32(mapviewerhandle), \
dbus.Int16(1))
-time.sleep(1)
-
#main loop
gobject.timeout_add(TIME_OUT, timeout)
loop = gobject.MainLoop()
diff --git a/test/navigation/test-poi-capi.py b/test/navigation/test-poi-capi.py
index 68e696f..f1f6c33 100755
--- a/test/navigation/test-poi-capi.py
+++ b/test/navigation/test-poi-capi.py
@@ -98,25 +98,25 @@ print("Search for hotel and station with keyword: "+ STRING_TO_SEARCH)
bus = dbus.SessionBus()
bus.add_signal_receiver(catch_poi_configurationChanged_signal_handler, \
- dbus_interface = "org.genivi.navigation.poiservice.POIConfiguration", \
+ dbus_interface = "org.genivi.navigation.poiservice.POIConfiguration.v4_0", \
signal_name = "configurationChanged")
bus.add_signal_receiver(catch_poi_poiStatus_signal_handler, \
- dbus_interface = "org.genivi.navigation.poiservice.POISearch", \
+ dbus_interface = "org.genivi.navigation.poiservice.POISearch.v4_0", \
signal_name = "poiStatus")
bus.add_signal_receiver(catch_poi_resultListChanged_signal_handler, \
- dbus_interface = "org.genivi.navigation.poiservice.POISearch", \
+ dbus_interface = "org.genivi.navigation.poiservice.POISearch.v4_0", \
signal_name = "resultListChanged")
-poiConfiguration = bus.get_object('org.genivi.navigation.poiservice.POIConfiguration_POIConfiguration','/POIConfiguration')
-g_poiConfiguration_interface = dbus.Interface(poiConfiguration, dbus_interface='org.genivi.navigation.poiservice.POIConfiguration')
+poiConfiguration = bus.get_object('org.genivi.navigation.poiservice.POIConfiguration.v4_0_POIConfiguration','/POIConfiguration')
+g_poiConfiguration_interface = dbus.Interface(poiConfiguration, dbus_interface='org.genivi.navigation.poiservice.POIConfiguration.v4_0')
-poiContentAccess = bus.get_object('org.genivi.navigation.poiservice.POIContentAccess_POIContentAccess','/POIContentAccess')
-g_poiContentAccess_interface = dbus.Interface(poiContentAccess, dbus_interface='org.genivi.navigation.poiservice.POIContentAccess')
+poiContentAccess = bus.get_object('org.genivi.navigation.poiservice.POIContentAccess.v4_0_POIContentAccess','/POIContentAccess')
+g_poiContentAccess_interface = dbus.Interface(poiContentAccess, dbus_interface='org.genivi.navigation.poiservice.POIContentAccess.v4_0')
-poiSearch = bus.get_object('org.genivi.navigation.poiservice.POISearch_POISearch','/POISearch')
-g_poiSearch_interface = dbus.Interface(poiSearch, dbus_interface='org.genivi.navigation.poiservice.POISearch')
+poiSearch = bus.get_object('org.genivi.navigation.poiservice.POISearch.v4_0_POISearch','/POISearch')
+g_poiSearch_interface = dbus.Interface(poiSearch, dbus_interface='org.genivi.navigation.poiservice.POISearch.v4_0')
g_poiConfiguration_interface.setLocale(dbus.String("fra"),dbus.String("FRA"),dbus.String("Latn"))
diff --git a/test/navigation/test-route-calculation-capi.py b/test/navigation/test-route-calculation-capi.py
index 991c1ab..31e8b0c 100755
--- a/test/navigation/test-route-calculation-capi.py
+++ b/test/navigation/test-route-calculation-capi.py
@@ -39,7 +39,8 @@ import argparse
import sys
import errno
-#import pdb;pdb.set_trace()
+import pdb;
+#pdb.set_trace()
from pip import locations
@@ -110,9 +111,7 @@ def route_calculation_signals_handler(routeHandle, status, percentage):
h, m = divmod(m, 60)
print "Total Time: %d:%02d:%02d" % (h, m, s)
#get route segments GetRouteSegments(const uint32_t& routeHandle, const int16_t& detailLevel, const std::vector< DBusCommonAPIEnumeration >& valuesToReturn, const uint32_t& numberOfSegments, const uint32_t& offset, uint32_t& totalNumberOfSegments, std::vector< std::map< DBusCommonAPIEnumeration, DBusCommonAPIVariant > >& routeSegments)
- valuesToReturn = [dbus.Int32(GENIVI_NAVIGATIONCORE_TOTAL_DISTANCE),
- dbus.Int32(GENIVI_NAVIGATIONCORE_TOTAL_TIME),
- dbus.Int32(GENIVI_NAVIGATIONCORE_ROAD_NAME),
+ valuesToReturn = [dbus.Int32(GENIVI_NAVIGATIONCORE_ROAD_NAME),
dbus.Int32(GENIVI_NAVIGATIONCORE_START_LATITUDE),
dbus.Int32(GENIVI_NAVIGATIONCORE_END_LATITUDE),
dbus.Int32(GENIVI_NAVIGATIONCORE_START_LONGITUDE),
@@ -121,7 +120,7 @@ def route_calculation_signals_handler(routeHandle, status, percentage):
dbus.Int32(GENIVI_NAVIGATIONCORE_TIME),
dbus.Int32(GENIVI_NAVIGATIONCORE_SPEED)]
ret = g_routing_interface.getRouteSegments(dbus.UInt32(g_route_handle),dbus.Int16(0),dbus.Array(valuesToReturn),dbus.UInt32(500),dbus.UInt32(0))
- print "Total number of segments: " + str(ret[0])
+ print "Total number of segments: " + str(ret[0])
#len(ret[1]) is size
#ret[1][0][GENIVI_NAVIGATIONCORE_START_LATITUDE] is the start latitude
# pdb.set_trace()
@@ -145,15 +144,15 @@ def route_deleted_signals_handler(routeHandle):
print('Route handle deleted: '+str(routeHandle))
bus.add_signal_receiver(route_calculation_signals_handler, \
- dbus_interface = "org.genivi.navigation.navigationcore.Routing", \
+ dbus_interface = "org.genivi.navigation.navigationcore.Routing.v4_0", \
signal_name = "routeCalculationProgressUpdate")
bus.add_signal_receiver(route_deleted_signals_handler, \
- dbus_interface = "org.genivi.navigation.navigationcore.Routing", \
+ dbus_interface = "org.genivi.navigation.navigationcore.Routing.v4_0", \
signal_name = "routeDeleted")
bus.add_signal_receiver(session_signals_handler, \
- dbus_interface = "org.genivi.navigation.navigationcore.Session", \
+ dbus_interface = "org.genivi.navigation.navigationcore.Session.v4_0", \
signal_name = "sessionDeleted")
#timeout
@@ -194,16 +193,16 @@ def launch_route_calculation(route):
g_routing_interface.calculateRoute(dbus.UInt32(g_session_handle),dbus.UInt32(g_route_handle))
-session = bus.get_object('org.genivi.navigation.navigationcore.Session_Session','/Session')
-g_session_interface = dbus.Interface(session, dbus_interface='org.genivi.navigation.navigationcore.Session')
+session = bus.get_object('org.genivi.navigation.navigationcore.Session.v4_0_Session','/Session')
+g_session_interface = dbus.Interface(session, dbus_interface='org.genivi.navigation.navigationcore.Session.v4_0')
#get session handle
ret = g_session_interface.createSession(dbus.String("test route calculation"))
g_session_handle=ret[1]
print 'Session handle: ' + str(g_session_handle)
-routing_obj = bus.get_object('org.genivi.navigation.navigationcore.Routing_Routing','/Routing')
-g_routing_interface = dbus.Interface(routing_obj, dbus_interface='org.genivi.navigation.navigationcore.Routing')
+routing_obj = bus.get_object('org.genivi.navigation.navigationcore.Routing.v4_0_Routing','/Routing')
+g_routing_interface = dbus.Interface(routing_obj, dbus_interface='org.genivi.navigation.navigationcore.Routing.v4_0')
g_current_route = 0
launch_route_calculation(0)
diff --git a/test/navigation/test-route-calculation.py b/test/navigation/test-route-calculation.py
index a9e0fb2..281b9b7 100755
--- a/test/navigation/test-route-calculation.py
+++ b/test/navigation/test-route-calculation.py
@@ -110,9 +110,7 @@ def catchall_route_calculation_signals_handler(routeHandle, status, percentage):
h, m = divmod(m, 60)
print "Total Time: %d:%02d:%02d" % (h, m, s)
#get route segments GetRouteSegments(const uint32_t& routeHandle, const int16_t& detailLevel, const std::vector< DBusCommonAPIEnumeration >& valuesToReturn, const uint32_t& numberOfSegments, const uint32_t& offset, uint32_t& totalNumberOfSegments, std::vector< std::map< DBusCommonAPIEnumeration, DBusCommonAPIVariant > >& routeSegments)
- valuesToReturn = [dbus.Int32(GENIVI_NAVIGATIONCORE_TOTAL_DISTANCE),
- dbus.Int32(GENIVI_NAVIGATIONCORE_TOTAL_TIME),
- dbus.Int32(GENIVI_NAVIGATIONCORE_ROAD_NAME),
+ valuesToReturn = [dbus.Int32(GENIVI_NAVIGATIONCORE_ROAD_NAME),
dbus.Int32(GENIVI_NAVIGATIONCORE_START_LATITUDE),
dbus.Int32(GENIVI_NAVIGATIONCORE_END_LATITUDE),
dbus.Int32(GENIVI_NAVIGATIONCORE_START_LONGITUDE),