summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author <philippe colliot>2014-10-14 17:00:48 +0200
committer <philippe colliot>2014-10-14 17:00:48 +0200
commit52e369fc570b033c2f10e24193e127a01be968be (patch)
treeee2dfa32ba9552779946d9eeb674b0053f096522
parent469f4bbb8e811ee024e2f831eceec79bd65578bd (diff)
downloadpoi-service-52e369fc570b033c2f10e24193e127a01be968be.tar.gz
preliminary commit of some updates for ilm migration
-rw-r--r--src/navigation/.gitignore1
-rw-r--r--src/navigation/CMakeLists.txt67
-rw-r--r--src/navigation/map-viewer/configuration-plugin/CMakeLists.txt2
-rw-r--r--src/navigation/map-viewer/mapviewercontrol-plugin/CMakeLists.txt4
-rw-r--r--src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx33
-rw-r--r--src/navigation/map-viewer/session-plugin/CMakeLists.txt2
-rw-r--r--src/navigation/navigation-core/configuration-plugin/CMakeLists.txt2
-rw-r--r--src/navigation/navigation-core/enhancedposition-plugin/CMakeLists.txt2
-rw-r--r--src/navigation/navigation-core/guidance-plugin/CMakeLists.txt2
-rw-r--r--src/navigation/navigation-core/locationinput-plugin/CMakeLists.txt2
-rw-r--r--src/navigation/navigation-core/mapmatchedposition-plugin/CMakeLists.txt2
-rw-r--r--src/navigation/navigation-core/routing-plugin/CMakeLists.txt2
-rw-r--r--src/navigation/navigation-core/session-plugin/CMakeLists.txt2
-rwxr-xr-xsrc/navigation/patches/0001-client.pro-Disable-create_cmake-configuration.patch25
-rwxr-xr-xsrc/navigation/patches/0002-Update-ivi-application.xml-and-fix-inplementation-of.patch103
-rwxr-xr-xsrc/navigation/script/build.sh39
16 files changed, 279 insertions, 11 deletions
diff --git a/src/navigation/.gitignore b/src/navigation/.gitignore
index 26d5a0b..717cb89 100644
--- a/src/navigation/.gitignore
+++ b/src/navigation/.gitignore
@@ -1 +1,2 @@
navit
+ilm
diff --git a/src/navigation/CMakeLists.txt b/src/navigation/CMakeLists.txt
index 52d75c6..cfef46a 100644
--- a/src/navigation/CMakeLists.txt
+++ b/src/navigation/CMakeLists.txt
@@ -35,6 +35,71 @@ set (svn_get_src_version svnversion)
set(cmake_create_dir cmake -E make_directory)
+# Check if ivi layer management stuff with the right version has been cloned and do it if necessary
+set(layer-management_URL http://git.projects.genivi.org/wayland-ivi-extension.git)
+set(layer-management_VERSION 278437417d1ac0958a800eecfebd2a388d6d9ca7)
+set(layer-management_PATCH_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/patches)
+set(layer-management_PATCH_DUMMY_FILE ${layer-management_SRC_DIR}/.patched)
+
+if (EXISTS ${layer-management_SRC_DIR})
+ execute_process(
+ COMMAND ${git_get_src_version}
+ WORKING_DIRECTORY "${layer-management_SRC_DIR}"
+ RESULT_VARIABLE result
+ OUTPUT_VARIABLE version
+ )
+ if (${version} MATCHES ${layer-management_VERSION})
+ message(STATUS "version of layer-management up to date")
+ else()
+ message(STATUS "get the right version")
+ execute_process(
+ COMMAND "${git_executable}" pull
+ COMMAND "${git_executable}" checkout ${layer-management_VERSION}
+ WORKING_DIRECTORY "${layer-management_SRC_DIR}"
+ RESULT_VARIABLE error_code
+ )
+ if(error_code)
+ message(FATAL_ERROR "Failed to checkout version: '${layer-management_VERSION}'")
+ endif()
+ endif()
+else()
+ message(STATUS "clone layer-management")
+ execute_process(
+ COMMAND "${git_executable}" clone "${layer-management_URL}" "${layer-management_SRC_DIR}"
+ RESULT_VARIABLE error_code
+ )
+ if(error_code)
+ message(FATAL_ERROR "Failed to clone repository: '${layer-management_URL}'")
+ endif()
+ message(STATUS "get the right version")
+ execute_process(
+ COMMAND "${git_executable}" pull
+ COMMAND "${git_executable}" checkout ${layer-management_VERSION}
+ WORKING_DIRECTORY "${layer-management_SRC_DIR}"
+ RESULT_VARIABLE error_code
+ )
+ if(error_code)
+ message(FATAL_ERROR "Failed to checkout version: '${layer-management_VERSION}'")
+ endif()
+endif()
+
+set (PATCH_EXECUTABLE patch -p1 -s)
+if (EXISTS ${layer-management_PATCH_DUMMY_FILE})
+ message(STATUS "patch already applied")
+else()
+ message(STATUS "apply the patches")
+ execute_process(
+ COMMAND ${PATCH_EXECUTABLE} -i ${layer-management_PATCH_SRC_DIR}/0001-client.pro-Disable-create_cmake-configuration.patch
+ COMMAND ${PATCH_EXECUTABLE} -i ${layer-management_PATCH_SRC_DIR}/0002-Update-ivi-application.xml-and-fix-inplementation-of.patch
+ COMMAND ${create_file} ${layer-management_PATCH_DUMMY_FILE}
+ TIMEOUT 0.1 #cmake -E touch never ends so add a timeout here
+ WORKING_DIRECTORY "${layer-management_SRC_DIR}"
+ RESULT_VARIABLE error_code
+ )
+ message( STATUS "Patch result: ${error_code}, PROF SOURCE DIR: ${layer-management_SRC_DIR}" )
+endif()
+
+
# Check if positioning stuff with the right version has been cloned and do it if necessary
# positioning_SRC_DIR is set by cmake -Dpositioning_SRC_DIR=<path to positioning src dir>
set(positioning_URL http://git.projects.genivi.org/lbs/positioning.git)
@@ -50,6 +115,7 @@ if (EXISTS ${positioning_SRC_DIR})
else()
message(STATUS "get the right version")
execute_process(
+ COMMAND "${git_executable}" pull
COMMAND "${git_executable}" checkout ${positioning_VERSION}
WORKING_DIRECTORY "${positioning_SRC_DIR}"
RESULT_VARIABLE error_code
@@ -70,6 +136,7 @@ else()
message(STATUS "get the right version")
execute_process(
+ COMMAND "${git_executable}" pull
COMMAND "${git_executable}" checkout ${positioning_VERSION}
WORKING_DIRECTORY "${positioning_SRC_DIR}"
RESULT_VARIABLE error_code
diff --git a/src/navigation/map-viewer/configuration-plugin/CMakeLists.txt b/src/navigation/map-viewer/configuration-plugin/CMakeLists.txt
index f287351..c967e5a 100644
--- a/src/navigation/map-viewer/configuration-plugin/CMakeLists.txt
+++ b/src/navigation/map-viewer/configuration-plugin/CMakeLists.txt
@@ -35,6 +35,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
add_definitions(-DPLUGIN=1)
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
+pkg_search_module(GLIB glib-2.0)
+include_directories(${GLIB_INCLUDE_DIRS})
include_directories("${DBUS_CPP_INCLUDE_DIRS}")
include_directories(${DBUS_CPP_INCLUDE_DIRS})
set(genivi_mapviewer_configuration_LIBS ${DBUS_CPP_LDFLAGS})
diff --git a/src/navigation/map-viewer/mapviewercontrol-plugin/CMakeLists.txt b/src/navigation/map-viewer/mapviewercontrol-plugin/CMakeLists.txt
index 3efda81..0d9acf5 100644
--- a/src/navigation/map-viewer/mapviewercontrol-plugin/CMakeLists.txt
+++ b/src/navigation/map-viewer/mapviewercontrol-plugin/CMakeLists.txt
@@ -40,11 +40,13 @@ set(CMAKE_REQUIRED_INCLUDES ${layer_management_INST}/include;${layer_management_
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs ${layer_management_INST}/lib)
add_definitions(-DPLUGIN=1)
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
+pkg_search_module(GLIB glib-2.0)
+include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
check_include_files (ilm/ilm_client.h LM)
if (LM)
message("building with layer management")
- set(genivi_mapviewer_mapviewercontrol_LIBS ${DBUS_CPP_LDFLAGS} "-lilmClient")
+ set(genivi_mapviewer_mapviewercontrol_LIBS ${DBUS_CPP_LDFLAGS} "-lilmCommon" "-lilmClient" "-lilmControl")
add_definitions(-DLM=1)
else()
message("building without layer management")
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 5bc86b7..c55fb65 100644
--- a/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx
+++ b/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx
@@ -10,6 +10,7 @@
*
* \author Martin Schaller <martin.schaller@it-schaller.de>
* \author Philippe Colliot <philippe.colliot@mpsa.com>
+* \author Tanibata, Nobuhiko (ADITJ/SWG) <ntanibata@jp.adit-jv.com>
*
* \version 1.0
*
@@ -22,7 +23,7 @@
*
* List of changes:
*
-* <date>, <name>, <description of change>
+* 13-10-2014, Tanibata, Nobuhiko, adaptation to layer management
*
* @licence end@
*/
@@ -32,6 +33,11 @@
#include <stdlib.h>
#if LM
#include <ilm/ilm_client.h>
+#include <ilm/ilm_client.h>
+#include <ilm/ilm_control.h>
+#ifndef FSA_LAYER
+#define FSA_LAYER 2000
+#endif
#endif
#include "genivi_mapviewer_mapviewercontrol_adaptor.h"
#include "genivi_navigationcore_routing_proxy.h"
@@ -1467,15 +1473,30 @@ MapViewerControlObj::MapViewerControlObj(MapViewerControl *mapviewercontrol, uin
sel.u.p_rect.rl.y=MapViewSize._2;
transform_set_screen_selection(trans, &sel);
#if LM
+ t_ilm_nativedisplay display = (t_ilm_nativedisplay)graphics_get_data(m_graphics.u.graphics, "display");
+ if (ilm_initWithNativedisplay(display) != ILM_SUCCESS) {
+ dbg(0, "error on ilm_initWidthNativeDisplay\n");
+ }
+
t_ilm_nativehandle nativehandle=(t_ilm_nativehandle)graphics_get_data(m_graphics.u.graphics,"xwindow_id");
- t_ilm_surface surfaceId=2000+m_handle;
- t_ilm_layer layerId=2000;
+ t_ilm_surface surfaceId=FSA_LAYER+m_handle;
+ t_ilm_layer layerId=FSA_LAYER;
if (ilm_surfaceCreate(nativehandle, MapViewSize._1, MapViewSize._2, ILM_PIXELFORMAT_RGBA_8888, &surfaceId) != ILM_SUCCESS) {
dbg(0,"error on ilm_surfaceCreate\n");
}
+#if 0
if (ilm_layerAddSurface(layerId, surfaceId) != ILM_SUCCESS) {
dbg(0,"error on ilm_layerAddSurface\n");
}
+#else
+ t_ilm_surface surfaceId_order[2] = {
+ FSA_LAYER + m_handle,
+ FSA_LAYER + m_handle + 1
+ };
+ if (ilm_layerSetRenderOrder(layerId, surfaceId_order, 2) != ILM_SUCCESS) {
+ dbg(0,"error on ilm_layerSetRenderOrder\n");
+ }
+#endif
if (ilm_commitChanges() != ILM_SUCCESS) {
dbg(0,"error on ilm_commitChanges\n");
}
@@ -1485,8 +1506,8 @@ MapViewerControlObj::MapViewerControlObj(MapViewerControl *mapviewercontrol, uin
MapViewerControlObj::~MapViewerControlObj()
{
#if LM
- t_ilm_surface surfaceId=2000+m_handle;
- t_ilm_layer layerId=2000;
+ t_ilm_surface surfaceId=FSA_LAYER+m_handle;
+ t_ilm_layer layerId=FSA_LAYER;
if (ilm_surfaceRemove(surfaceId) != ILM_SUCCESS) {
dbg(0,"error on ilm_surfaceRemove\n");
}
@@ -1664,8 +1685,10 @@ plugin_init(void)
conns[0]->request_name("org.genivi.mapviewer.MapViewerControl");
server=new MapViewerControl(*conns[0]);
#if LM
+#if 0
if (ilm_init() != ILM_SUCCESS) {
dbg(0,"error on ilm_init\n");
}
#endif
+#endif
}
diff --git a/src/navigation/map-viewer/session-plugin/CMakeLists.txt b/src/navigation/map-viewer/session-plugin/CMakeLists.txt
index 051c794..c477d6b 100644
--- a/src/navigation/map-viewer/session-plugin/CMakeLists.txt
+++ b/src/navigation/map-viewer/session-plugin/CMakeLists.txt
@@ -35,6 +35,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
add_definitions(-DPLUGIN=1)
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
+pkg_search_module(GLIB glib-2.0)
+include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
set(genivi_mapviewer_session_LIBS ${DBUS_CPP_LDFLAGS})
ADD_CUSTOM_COMMAND(OUTPUT genivi_mapviewer_session_adaptor.h
diff --git a/src/navigation/navigation-core/configuration-plugin/CMakeLists.txt b/src/navigation/navigation-core/configuration-plugin/CMakeLists.txt
index 60d0145..fb69f2c 100644
--- a/src/navigation/navigation-core/configuration-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/configuration-plugin/CMakeLists.txt
@@ -35,6 +35,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
add_definitions(-DPLUGIN=1)
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
+pkg_search_module(GLIB glib-2.0)
+include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
set(genivi_navigationcore_configuration_LIBS ${DBUS_CPP_LDFLAGS})
ADD_CUSTOM_COMMAND(OUTPUT genivi_navigationcore_configuration_adaptor.h
diff --git a/src/navigation/navigation-core/enhancedposition-plugin/CMakeLists.txt b/src/navigation/navigation-core/enhancedposition-plugin/CMakeLists.txt
index 584c7ee..99ae2ca 100644
--- a/src/navigation/navigation-core/enhancedposition-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/enhancedposition-plugin/CMakeLists.txt
@@ -35,6 +35,8 @@ include_directories(compat_includes)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
add_definitions(-DPLUGIN=1)
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
+pkg_search_module(GLIB glib-2.0)
+include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
set(genivi_positioning_enhancedposition_LIBS ${DBUS_CPP_LDFLAGS})
ADD_CUSTOM_COMMAND(OUTPUT genivi_positioning_enhancedposition_proxy.h
diff --git a/src/navigation/navigation-core/guidance-plugin/CMakeLists.txt b/src/navigation/navigation-core/guidance-plugin/CMakeLists.txt
index ba71412..3469394 100644
--- a/src/navigation/navigation-core/guidance-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/guidance-plugin/CMakeLists.txt
@@ -35,6 +35,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
add_definitions(-DPLUGIN=1)
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
+pkg_search_module(GLIB glib-2.0)
+include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
set(genivi_navigationcore_guidance_LIBS ${DBUS_CPP_LDFLAGS})
ADD_CUSTOM_COMMAND(OUTPUT genivi_navigationcore_guidance_adaptor.h
diff --git a/src/navigation/navigation-core/locationinput-plugin/CMakeLists.txt b/src/navigation/navigation-core/locationinput-plugin/CMakeLists.txt
index b65cb13..23d8430 100644
--- a/src/navigation/navigation-core/locationinput-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/locationinput-plugin/CMakeLists.txt
@@ -36,6 +36,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
add_definitions(-DPLUGIN=1)
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
+pkg_search_module(GLIB glib-2.0)
+include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
set(genivi_navigationcore_locationinput_LIBS ${DBUS_CPP_LDFLAGS})
ADD_CUSTOM_COMMAND(OUTPUT genivi_navigationcore_locationinput_adaptor.h
diff --git a/src/navigation/navigation-core/mapmatchedposition-plugin/CMakeLists.txt b/src/navigation/navigation-core/mapmatchedposition-plugin/CMakeLists.txt
index af7d338..513a95a 100644
--- a/src/navigation/navigation-core/mapmatchedposition-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/mapmatchedposition-plugin/CMakeLists.txt
@@ -35,6 +35,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
add_definitions(-DPLUGIN=1)
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
+pkg_search_module(GLIB glib-2.0)
+include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
set(genivi_navigationcore_mapmatchedposition_LIBS ${DBUS_CPP_LDFLAGS})
ADD_CUSTOM_COMMAND(OUTPUT genivi_navigationcore_mapmatchedposition_adaptor.h
diff --git a/src/navigation/navigation-core/routing-plugin/CMakeLists.txt b/src/navigation/navigation-core/routing-plugin/CMakeLists.txt
index 980ba02..38b6762 100644
--- a/src/navigation/navigation-core/routing-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/routing-plugin/CMakeLists.txt
@@ -36,6 +36,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
add_definitions(-DPLUGIN=1 -g)
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
+pkg_search_module(GLIB glib-2.0)
+include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
set(genivi_navigationcore_routing_LIBS ${DBUS_CPP_LDFLAGS})
ADD_CUSTOM_COMMAND(OUTPUT genivi_navigationcore_routing_adaptor.h
diff --git a/src/navigation/navigation-core/session-plugin/CMakeLists.txt b/src/navigation/navigation-core/session-plugin/CMakeLists.txt
index 02484bc..e7ba6e0 100644
--- a/src/navigation/navigation-core/session-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/session-plugin/CMakeLists.txt
@@ -35,6 +35,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
add_definitions(-DPLUGIN=1)
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
+pkg_search_module(GLIB glib-2.0)
+include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
set(genivi_navigationcore_session_LIBS ${DBUS_CPP_LDFLAGS})
ADD_CUSTOM_COMMAND(OUTPUT genivi_navigationcore_session_adaptor.h
diff --git a/src/navigation/patches/0001-client.pro-Disable-create_cmake-configuration.patch b/src/navigation/patches/0001-client.pro-Disable-create_cmake-configuration.patch
new file mode 100755
index 0000000..926bb77
--- /dev/null
+++ b/src/navigation/patches/0001-client.pro-Disable-create_cmake-configuration.patch
@@ -0,0 +1,25 @@
+From 9112aeed43f40eeeefd20484e14eedcee6c80544 Mon Sep 17 00:00:00 2001
+From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
+Date: Fri, 3 Oct 2014 14:43:37 +0900
+Subject: [PATCH] client.pro: Disable create_cmake configuration
+
+Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
+---
+ src/client/client.pro | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/client/client.pro b/src/client/client.pro
+index fd094fd..c9dc668 100644
+--- a/src/client/client.pro
++++ b/src/client/client.pro
+@@ -8,6 +8,7 @@ MODULE_PLUGIN_TYPES = wayland-graphics-integration-client
+ load(qt_module)
+
+ CONFIG += link_pkgconfig qpa/genericunixfontdatabase wayland-scanner
++CONFIG -= create_cmake
+
+ !equals(QT_WAYLAND_GL_CONFIG, nogl) {
+ DEFINES += QT_WAYLAND_GL_SUPPORT
+--
+1.9.1
+
diff --git a/src/navigation/patches/0002-Update-ivi-application.xml-and-fix-inplementation-of.patch b/src/navigation/patches/0002-Update-ivi-application.xml-and-fix-inplementation-of.patch
new file mode 100755
index 0000000..979d531
--- /dev/null
+++ b/src/navigation/patches/0002-Update-ivi-application.xml-and-fix-inplementation-of.patch
@@ -0,0 +1,103 @@
+From 8f61a686557ae1b8930f8a4771415586c22cb628 Mon Sep 17 00:00:00 2001
+From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
+Date: Mon, 6 Oct 2014 10:49:07 +0900
+Subject: [PATCH] Update ivi-application.xml, and fix inplementation of
+ qwaylandivisurface class
+
+Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
+---
+ src/3rdparty/protocol/ivi-application.xml | 41 +++++++++++--------------------
+ src/client/qwaylandivisurface.cpp | 5 +++-
+ src/client/qwaylandivisurface_p.h | 2 +-
+ 3 files changed, 19 insertions(+), 29 deletions(-)
+
+diff --git a/src/3rdparty/protocol/ivi-application.xml b/src/3rdparty/protocol/ivi-application.xml
+index 833fd38..0c3fb8c 100644
+--- a/src/3rdparty/protocol/ivi-application.xml
++++ b/src/3rdparty/protocol/ivi-application.xml
+@@ -42,36 +42,23 @@
+ <arg name="visibility" type="int"/>
+ </event>
+
+- <enum name="warning_code">
+- <description summary="possible warning codes returned by ivi compositor">
+- These define all possible warning codes returned by ivi compositor on server-side warnings.
+- invalid_wl_surface:
+- - wl_surface already has a another role.
+- - wl_surface is destroyed before the ivi_surface is destroyed.
+- ivi_id_in_use: ivi_id is already assigned by another application.
+- </description>
+- <entry name="invalid_wl_surface" value="1" summary="wl_surface is invalid"/>
+- <entry name="ivi_id_in_use" value="2" summary="ivi_id is in use and can not be shared"/>
+- </enum>
++ <event name="configure">
++ <description summary="suggest resize">
++ The configure event asks the client to resize its surface.
+
+- <event name="warning">
+- <description summary="server-side warning detected">
+- The ivi compositor encountered warning while processing a request by this
+- application. The warning is defined by argument warning_code and optional
+- warning_text. If the warning is detected, client shall destroy the ivi_surface
+- object.
++ The size is a hint, in the sense that the client is free to
++ ignore it if it doesn't resize, pick a smaller size (to
++ satisfy aspect ratio or resize in steps of NxM pixels).
+
+- When a warning event is sent, the compositor turns the ivi_surface object inert.
+- The ivi_surface will not deliver further events, all requests on it are ignored
+- except 'destroy', and the association to the ivi_id is removed. The client
+- should destroy the ivi_surface object. If an inert ivi_surface object is used as
+- an argument to any other object's request, that request will [produce a fatal
+- error / produce a warning / be ignored].
+- </description>
+- <arg name="warning_code" type="int"/>
+- <arg name="warning_text" type="string" allow-null="true"/>
+- </event>
++ The client is free to dismiss all but the last configure
++ event it received.
+
++ The width and height arguments specify the size of the window
++ in surface local coordinates.
++ </description>
++ <arg name="width" type="int"/>
++ <arg name="height" type="int"/>
++ </event>
+ </interface>
+
+ <interface name="ivi_application" version="1">
+diff --git a/src/client/qwaylandivisurface.cpp b/src/client/qwaylandivisurface.cpp
+index d3fd096..1c2c24a 100644
+--- a/src/client/qwaylandivisurface.cpp
++++ b/src/client/qwaylandivisurface.cpp
+@@ -63,10 +63,13 @@ QWaylandIviSurface::~QWaylandIviSurface()
+
+ void QWaylandIviSurface::ivi_surface_visibility(int32_t visibility)
+ {
++ Q_UNUSED(visibility);
+ }
+
+-void QWaylandIviSurface::ivi_surface_warning(int32_t warning_code, const QString &warning_text)
++void QWaylandIviSurface::ivi_surface_configure(int32_t width, int32_t height)
+ {
++ Q_UNUSED(width);
++ Q_UNUSED(height);
+ }
+
+ QT_END_NAMESPACE
+diff --git a/src/client/qwaylandivisurface_p.h b/src/client/qwaylandivisurface_p.h
+index 2283f99..f4038e6 100644
+--- a/src/client/qwaylandivisurface_p.h
++++ b/src/client/qwaylandivisurface_p.h
+@@ -63,7 +63,7 @@ public:
+
+ private:
+ void ivi_surface_visibility(int32_t visibility) Q_DECL_OVERRIDE;
+- void ivi_surface_warning(int32_t warning_code, const QString &warning_text) Q_DECL_OVERRIDE;
++ void ivi_surface_configure(int32_t width, int32_t height) Q_DECL_OVERRIDE;
+
+ friend class QWaylandWindow;
+ QWaylandWindow *m_window;
+--
+1.9.1
+
diff --git a/src/navigation/script/build.sh b/src/navigation/script/build.sh
index 9eee589..d5430d8 100755
--- a/src/navigation/script/build.sh
+++ b/src/navigation/script/build.sh
@@ -37,10 +37,12 @@ GNSS_SERVICE=gnss-service
SENSORS_SERVICE=sensors-service
ENHANCED_POSITION_SERVICE=enhanced-position-service
NAVIT=navit
+IVI_LAYER_MANAGER=ilm
target_root=$PWD/..
target_bin=$PWD/../bin #by default
target_positioning=$PWD/../$POSITIONING #by default
+target_ilm=$PWD/../$IVI_LAYER_MANAGER #by default
#--------------------------------------------------------------------------
# Compiler Flags
@@ -109,19 +111,25 @@ set-path()
NAVIT_SRC_DIR=$TOP_DIR/$NAVIT
NAVIT_BIN_DIR=$TOP_BIN_DIR/$NAVIT
+
+ IVI_LAYER_MANAGER_SRC_DIR=$target_ilm
+ IVI_LAYER_MANAGER_BIN_DIR=$TOP_BIN_DIR/$IVI_LAYER_MANAGER
}
usage() {
echo "Usage: ./build.sh Build navigation"
echo " or: ./build.sh [command])"
- echo " or: ./build.sh [command] <target bin> <target positioning>)"
+ echo " or: ./build.sh [command] <target bin> <target positioning> <target ilm>)"
echo
echo "command:"
echo " make Build"
- echo " make <target bin> <target positioning> Build and set targets "
+ echo " make <target bin> <target positioning>"
+ echo " makelm Build with layer manager"
+ echo " makelm <target bin> <target positioning> <target ilm> "
echo " <target bin> Path of the binaries"
- echo " <target positioning> Path of the positioning code"
+ echo " <target positioning> Path of the positioning code"
+ echo " <target ilm> Path of the ilm code"
echo " clean Clean"
echo " src-clean Clean the cloned sources"
echo " help Print Help"
@@ -134,7 +142,7 @@ build() {
cd $TOP_DIR
mkdir -p bin
cd $TOP_BIN_DIR
- cmake -Dpositioning_SRC_DIR=$target_positioning $TOP_DIR
+ cmake -Dpositioning_SRC_DIR=$target_positioning -Dlayer-management_SRC_DIR=$target_ilm $TOP_DIR
# make navit first, because plugins need navit built stuff
echo ''
@@ -145,6 +153,14 @@ build() {
cmake $NAVIT_FLAGS $NAVIT_SRC_DIR/navit && make
echo ''
+ echo 'Building layer manager'
+ cd $TOP_BIN_DIR
+ mkdir -p $IVI_LAYER_MANAGER
+ cd $IVI_LAYER_MANAGER_BIN_DIR
+# cmake $IVI_LAYER_MANAGER_SRC_DIR && make
+# sudo make install
+
+ echo ''
echo 'Building positioning'
cd $TOP_BIN_DIR
mkdir -p $POSITIONING
@@ -214,7 +230,7 @@ build() {
cd $TOP_BIN_DIR
mkdir -p $MAP_VIEWER_MAPVIEWERCONTROL
cd $MAP_VIEWER_MAPVIEWERCONTROL_BIN_DIR
- cmake -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dlayer_management_INST=$(layer_management_INST) -Dmapviewer_API=$MAP_VIEWER_API_DIR -Dnavigationcore_API=$NAVIGATION_CORE_API_DIR $MAP_VIEWER_MAPVIEWERCONTROL_SRC_DIR && make
+ cmake -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -DLM=$lm -Dlayer_management_INST=$layer_management_INST -Dmapviewer_API=$MAP_VIEWER_API_DIR -Dnavigationcore_API=$NAVIGATION_CORE_API_DIR $MAP_VIEWER_MAPVIEWERCONTROL_SRC_DIR && make
cd $TOP_BIN_DIR
mkdir -p $MAP_VIEWER_SESSION
@@ -238,6 +254,8 @@ src-clean() {
rm -rf $POSITIONING_SRC_DIR
echo 'delete' $NAVIT_SRC_DIR
rm -rf $NAVIT_SRC_DIR
+ echo 'delete' $IVI_LAYER_MANAGER_SRC_DIR
+ rm -rf $IVI_LAYER_MANAGER_SRC_DIR
clean
}
@@ -253,6 +271,17 @@ if [ $# -ge 1 ]; then
target_positioning=$(readlink -f $3)
fi
set-path
+ lm=0
+ build
+ elif [ $1 = makelm ]; then
+ if [ $# -eq 4 ]; then
+ #use for remote build
+ target_bin=$(readlink -f $2)
+ target_positioning=$(readlink -f $3)
+ target_ilm=$(readlink -f $4)
+ fi
+ set-path
+ lm=1
build
elif [ $1 = clean ]; then
set-path