summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author <philippe colliot>2015-08-04 17:54:50 +0200
committer <philippe colliot>2015-08-04 17:54:50 +0200
commitf0d502c1548dc8cc0805a0a72f74e46d821c0a9e (patch)
treed395a1e6c079a18e871fc97c85ac5e53efe4b7c5
parent86c047d1c415e506069e222f621e8c13735f9c20 (diff)
downloadpoi-service-f0d502c1548dc8cc0805a0a72f74e46d821c0a9e.tar.gz
Fix an issue with the former POC of POI search
-rwxr-xr-xapi/franca/navigation/poiservice/POIContentManager.fidl2
-rwxr-xr-xapi/franca/navigation/poiservice/POIServiceTypes.fidl2
-rwxr-xr-xapi/franca/navigation/poiservice/ServiceContentAccess.fidl12
-rw-r--r--src/navigation/CMakeLists.txt29
-rw-r--r--src/navigation/README12
-rw-r--r--src/navigation/map-viewer/CMakeLists.txt19
-rw-r--r--src/navigation/navigation-core/CMakeLists.txt23
-rw-r--r--src/navigation/navigation-core/configuration-plugin/CMakeLists.txt1
-rw-r--r--src/navigation/poi-cam/CMakeLists.txt4
-rw-r--r--src/poi-service/poi-common/poi-common-data-model.h2
-rw-r--r--src/poi-service/poi-manager-server/poi-manager-server-stub.cpp2
-rw-r--r--src/poi-service/poi-manager-server/poi-manager-server-stub.h4
-rw-r--r--src/poi-service/poi-server/main.cpp2
-rw-r--r--test/poi-service/CMakeLists.txt2
-rw-r--r--test/poi-service/README1
15 files changed, 89 insertions, 28 deletions
diff --git a/api/franca/navigation/poiservice/POIContentManager.fidl b/api/franca/navigation/poiservice/POIContentManager.fidl
index d16a48a..6e16736 100755
--- a/api/franca/navigation/poiservice/POIContentManager.fidl
+++ b/api/franca/navigation/poiservice/POIContentManager.fidl
@@ -175,7 +175,7 @@ interface POIContentManager {
method resultListRequested {
in {
<** @description : Content access module unique id as known by the POI service component.**>
- UInt8 camId
+ ContentAccessModuleID camId
<** @description : poi search unique handle.**>
Handle poiSearchHandle
<** @description : List of attributes id to retrieve. This is optional and the list could be empty.**>
diff --git a/api/franca/navigation/poiservice/POIServiceTypes.fidl b/api/franca/navigation/poiservice/POIServiceTypes.fidl
index 55170d2..ed214fa 100755
--- a/api/franca/navigation/poiservice/POIServiceTypes.fidl
+++ b/api/franca/navigation/poiservice/POIServiceTypes.fidl
@@ -26,6 +26,8 @@ typeCollection POIServiceTypes {
typedef ResourceID is UInt32
typedef AttributeID is UInt32
+
+ typedef ContentAccessModuleID is UInt8
<** @description: Current state of the search**>
enumeration SearchStatusState {
diff --git a/api/franca/navigation/poiservice/ServiceContentAccess.fidl b/api/franca/navigation/poiservice/ServiceContentAccess.fidl
index 04b17bb..c5cbb12 100755
--- a/api/franca/navigation/poiservice/ServiceContentAccess.fidl
+++ b/api/franca/navigation/poiservice/ServiceContentAccess.fidl
@@ -28,7 +28,7 @@ interface POIContentAccess {
out {
<** @description : Content access module unique id as known by the POI service component.**>
- UInt8 camId
+ ContentAccessModuleID camId
}
}
@@ -36,7 +36,7 @@ interface POIContentAccess {
method unRegisterContentAccessModule {
in {
<** @description : Content access module unique id as known by the POI service component.**>
- UInt8 camId
+ ContentAccessModuleID camId
}
}
<** @description : Register to the POI provider module the categories you can search for POI.
@@ -44,7 +44,7 @@ interface POIContentAccess {
method registerPoiCategories {
in {
<** @description : Content access module unique id as known by the POI service component.**>
- UInt8 camId
+ ContentAccessModuleID camId
<** @description : array[unique_id].
List of POI categories to register.
unique_id = Unique category id.
@@ -58,7 +58,7 @@ interface POIContentAccess {
method updateCategories {
in {
<** @description : Content access module unique id as known by the POI service component.**>
- UInt8 camId
+ ContentAccessModuleID camId
<** @description : array[unique_id, attributes, sortOptions].**>
CAMCategoryUpdate[] poiCategories
}
@@ -68,7 +68,7 @@ interface POIContentAccess {
method addCategories {
in {
<** @description : Content access module unique id as known by the POI service component.**>
- UInt8 camId
+ ContentAccessModuleID camId
<** @description : List of details for all the POI categories.**>
CAMCategory[] poiCategories
}
@@ -85,7 +85,7 @@ interface POIContentAccess {
method removeCategories {
in {
<** @description : Content access module unique id as known by the POI service component.**>
- UInt8 camId
+ ContentAccessModuleID camId
<** @description : array[unique_id].
List of POI categories to remove.**>
CategoryID[] poiCategories
diff --git a/src/navigation/CMakeLists.txt b/src/navigation/CMakeLists.txt
index 3827bba..7711766 100644
--- a/src/navigation/CMakeLists.txt
+++ b/src/navigation/CMakeLists.txt
@@ -25,6 +25,8 @@ option(WITH_DBUS_INTERFACE
"Build using the D-Bus interfaces" ON)
option(WITH_DEBUG
"Enable the debug messages" OFF)
+option(YOCTO_CONFIG
+ "Build using Yocto" OFF)
option(NAVIT_DISABLE_QT
"Disable Qt to build navit" 1)
option(NAVIT_SAMPLE_MAP
@@ -37,6 +39,7 @@ option(NAVIT_QTPAINTER
message(STATUS "WITH_FRANCA_INTERFACE = ${WITH_FRANCA_INTERFACE}")
message(STATUS "WITH_DBUS_INTERFACE = ${WITH_DBUS_INTERFACE}")
message(STATUS "WITH_DEBUG = ${WITH_DEBUG}")
+message(STATUS "YOCTO_CONFIG = ${YOCTO_CONFIG}")
message(STATUS "NAVIT_DISABLE_QT = ${NAVIT_DISABLE_QT}")
message(STATUS "NAVIT_SAMPLE_MAP = ${NAVIT_SAMPLE_MAP}")
message(STATUS "NAVIT_NULL_VEHICLE = ${NAVIT_NULL_VEHICLE}")
@@ -48,13 +51,21 @@ set(vehicle/null "${NAVIT_NULL_VEHICLE}")
set(graphics/qt_qpainter "${NAVIT_QTPAINTER}")
set(API_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../api")
+
+if(NOT ${YOCTO_CONFIG})
+ set(NAVIT_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/navit/navit/cmake")
+ set(DBUS_GENERATED_INCLUDE_DIR_POSITIONING "${CMAKE_BINARY_DIR}/api") # this one is for positioning
+ set(NAVIT_CONFIG_H_DIR "${CMAKE_CURRENT_BINARY_DIR}/navit/navit")
+else()
+ set(NAVIT_CMAKE_DIR "${STAGING_LIBDIR}/navit/cmake")
+ set(DBUS_GENERATED_INCLUDE_DIR_POSITIONING "${STAGING_INCDIR}/positioning") # this one is for positioning
+ set(NAVIT_CONFIG_H_DIR "${STAGING_DATADIR}")
+endif()
+
set(NAVIT_BIN_DIR "${CMAKE_CURRENT_BINARY_DIR}/navit/navit/navit")
-set(NAVIT_CONFIG_H_DIR "${CMAKE_CURRENT_BINARY_DIR}/navit/navit")
set(NAVIT_MAPS_DIR "${NAVIT_BIN_DIR}/maps")
-set(NAVIT_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/navit/navit/cmake")
set(DBUS_GENERATED_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/dbus-include")
-set(DBUS_GENERATED_INCLUDE_DIR_POSITIONING "${CMAKE_BINARY_DIR}/api") # this one is for positioning
set(PRELOAD_CACHE_FOR_PLUGINS "${NAVIT_CONFIG_H_DIR}/cmake_plugin_settings.txt")
get_directory_property(hasParent PARENT_DIRECTORY)
@@ -65,8 +76,10 @@ set(DBUS_GENERATED_INCLUDE_DIR_PARENT_SCOPE ${DBUS_GENERATED_INCLUDE_DIR} PARENT
set(DBUS_GENERATED_INCLUDE_DIR_POSITIONING_PARENT_SCOPE ${DBUS_GENERATED_INCLUDE_DIR_POSITIONING} PARENT_SCOPE)
endif(hasParent)
-if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/positioning")
-message(FATAL_ERROR "Don't you forget to download additional code ? Please see README first")
+if(NOT ${YOCTO_CONFIG})
+ if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/positioning")
+ message(FATAL_ERROR "Don't you forget to download additional code ? Please see README first")
+ endif()
endif()
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
@@ -77,8 +90,10 @@ add_subdirectory(positioning)
unset(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
unset(CMAKE_RUNTIME_OUTPUT_DIRECTORY)
-if(NOT EXISTS "${PRELOAD_CACHE_FOR_PLUGINS}")
- message(FATAL_ERROR "Build navit first, see README")
+if(NOT ${YOCTO_CONFIG})
+ if(NOT EXISTS "${PRELOAD_CACHE_FOR_PLUGINS}")
+ message(FATAL_ERROR "Build navit first, see README")
+ endif()
endif()
# For the moment, there's still an issue there
diff --git a/src/navigation/README b/src/navigation/README
index 25c0ad5..672518f 100644
--- a/src/navigation/README
+++ b/src/navigation/README
@@ -1,4 +1,4 @@
-Release date of the file: 09-06-2015
+Release date of the file: 04-08-2015
Status: OK
Project:
@@ -109,3 +109,13 @@ cd ../../test/navigation
If everything is OK, you must see:
Test PASSED
+
+===============================
+How To for Yocto
+===============================
+Due to a different way to manage the build, some specific settings are required:
+
+cmake -DYOCTO_BUILD=ON ../
+
+
+
diff --git a/src/navigation/map-viewer/CMakeLists.txt b/src/navigation/map-viewer/CMakeLists.txt
index bd8bdc7..b6e2f67 100644
--- a/src/navigation/map-viewer/CMakeLists.txt
+++ b/src/navigation/map-viewer/CMakeLists.txt
@@ -42,10 +42,17 @@ include_directories(${NAVIT_CONFIG_H_DIR}) # this one contains config.h that is
find_program(XSLTPROC xsltproc REQUIRED)
# Generate the config file for navit/mapviewer
-execute_process(
- OUTPUT_FILE ${NAVIT_BIN_DIR}/navit_genivi_mapviewer.xml
- COMMAND ${XSLTPROC} ${CMAKE_CURRENT_SOURCE_DIR}/navit_genivi_mapviewer.xsl ${navit_SOURCE_DIR}/navit/navit_shipped.xml
- )
+if(NOT ${YOCTO_CONFIG})
+ execute_process(
+ OUTPUT_FILE ${NAVIT_BIN_DIR}/navit_genivi_mapviewer.xml
+ COMMAND ${XSLTPROC} ${CMAKE_CURRENT_SOURCE_DIR}/navit_genivi_mapviewer.xsl ${navit_SOURCE_DIR}/navit/navit_shipped.xml
+ )
+else()
+ execute_process(
+ OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/navit_genivi_mapviewer.xml
+ COMMAND ${XSLTPROC} ${CMAKE_CURRENT_SOURCE_DIR}/navit_genivi_mapviewer.xsl ${NAVIT_CMAKE_DIR}/../navit/navit_shipped.xml
+ )
+endif()
add_definitions(-DPLUGIN=1)
if(WITH_DEBUG)
@@ -62,6 +69,10 @@ endif()
set(PLUGIN_LDFLAGS ${DBUS_CPP_LDFLAGS} ${DBUS_CPP_GLIB_LDFLAGS} ${GLIB_LDFLAGS})
set(PLUGIN_LIBRARIES ${DBUS_CPP_LIBRARY_DIRS} ${GLIB_LIBRARY_DIRS} ${DBUS_CPP_GLIB_LIBRARY_DIRS})
+if(${YOCTO_CONFIG})
+ include_directories(${STAGING_INCDIR}/navit)
+endif()
+
add_subdirectory(configuration-plugin)
add_subdirectory(mapviewercontrol-plugin)
diff --git a/src/navigation/navigation-core/CMakeLists.txt b/src/navigation/navigation-core/CMakeLists.txt
index 63be80f..3c65eee 100644
--- a/src/navigation/navigation-core/CMakeLists.txt
+++ b/src/navigation/navigation-core/CMakeLists.txt
@@ -30,7 +30,9 @@ include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
include_directories(${DBUS_CPP_GLIB_INCLUDE_DIRS})
-include(${PRELOAD_CACHE_FOR_PLUGINS})
+if(NOT ${YOCTO_CONFIG})
+ include(${PRELOAD_CACHE_FOR_PLUGINS})
+endif()
include_directories(${INCLUDE_DIRECTORIES})
include_directories(.)
@@ -42,10 +44,17 @@ include_directories(${NAVIT_CONFIG_H_DIR}) # this one contains config.h that is
find_program(XSLTPROC xsltproc REQUIRED)
# Generate the config file for navit/navigation-core
-execute_process(
- OUTPUT_FILE ${NAVIT_BIN_DIR}/navit_genivi_navigationcore.xml
- COMMAND ${XSLTPROC} ${CMAKE_CURRENT_SOURCE_DIR}/navit_genivi_navigationcore.xsl ${navit_SOURCE_DIR}/navit/navit_shipped.xml
- )
+if(NOT ${YOCTO_CONFIG})
+ execute_process(
+ OUTPUT_FILE ${NAVIT_BIN_DIR}/navit_genivi_navigationcore.xml
+ COMMAND ${XSLTPROC} ${CMAKE_CURRENT_SOURCE_DIR}/navit_genivi_navigationcore.xsl ${navit_SOURCE_DIR}/navit/navit_shipped.xml
+ )
+else()
+ execute_process(
+ OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/navit_genivi_navigationcore.xml
+ COMMAND ${XSLTPROC} ${CMAKE_CURRENT_SOURCE_DIR}/navit_genivi_navigationcore.xsl ${NAVIT_CMAKE_DIR}/../navit/navit_shipped.xml
+ )
+endif()
add_definitions(-DPLUGIN=1)
if(WITH_DEBUG)
@@ -62,6 +71,10 @@ endif()
set(PLUGIN_LDFLAGS ${DBUS_CPP_LDFLAGS} ${DBUS_CPP_GLIB_LDFLAGS} ${GLIB_LDFLAGS})
set(PLUGIN_LIBRARIES ${DBUS_CPP_LIBRARY_DIRS} ${GLIB_LIBRARY_DIRS} ${DBUS_CPP_GLIB_LIBRARY_DIRS})
+if(${YOCTO_CONFIG})
+ include_directories(${STAGING_INCDIR}/navit)
+endif()
+
add_subdirectory(configuration-plugin)
add_subdirectory(guidance-plugin)
diff --git a/src/navigation/navigation-core/configuration-plugin/CMakeLists.txt b/src/navigation/navigation-core/configuration-plugin/CMakeLists.txt
index 3d9c6c1..c227b00 100644
--- a/src/navigation/navigation-core/configuration-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/configuration-plugin/CMakeLists.txt
@@ -29,6 +29,7 @@ project(navigation)
cmake_minimum_required(VERSION 2.8)
message(STATUS "configuration")
+
include_directories(${DBUS_GENERATED_INCLUDE_DIR}/navigation-core)
set(genivi_navigationcore_configuration_LIBS ${PLUGIN_LDFLAGS})
diff --git a/src/navigation/poi-cam/CMakeLists.txt b/src/navigation/poi-cam/CMakeLists.txt
index 72e379e..250dfca 100644
--- a/src/navigation/poi-cam/CMakeLists.txt
+++ b/src/navigation/poi-cam/CMakeLists.txt
@@ -51,6 +51,10 @@ include_directories(${NAVIT_CONFIG_H_DIR}) # this one contains config.h that is
include_directories(${DBUS_GENERATED_INCLUDE_DIR}/poi-service)
+if(${YOCTO_CONFIG})
+ include_directories(${STAGING_INCDIR}/navit)
+endif()
+
set(PLUGIN_LDFLAGS ${DBUS_CPP_LDFLAGS} ${DBUS_CPP_GLIB_LDFLAGS} ${GLIB_LDFLAGS})
set(PLUGIN_LIBRARIES ${DBUS_CPP_LIBRARY_DIRS} ${GLIB_LIBRARY_DIRS} ${DBUS_CPP_GLIB_LIBRARY_DIRS})
diff --git a/src/poi-service/poi-common/poi-common-data-model.h b/src/poi-service/poi-common/poi-common-data-model.h
index e3db5e4..645a597 100644
--- a/src/poi-service/poi-common/poi-common-data-model.h
+++ b/src/poi-service/poi-common/poi-common-data-model.h
@@ -136,6 +136,8 @@ typedef struct
#define SEARCH_HANDLE 1
#define SEARCH_MAX_SIZE 50
+#define CAM_ID 1
+
#define NO_HANDLE 0
#endif
diff --git a/src/poi-service/poi-manager-server/poi-manager-server-stub.cpp b/src/poi-service/poi-manager-server/poi-manager-server-stub.cpp
index b8a04d7..bc33b9a 100644
--- a/src/poi-service/poi-manager-server/poi-manager-server-stub.cpp
+++ b/src/poi-service/poi-manager-server/poi-manager-server-stub.cpp
@@ -1454,7 +1454,7 @@ void PoiManagerServerStub::poiSearchCanceled(const std::shared_ptr<CommonAPI::Cl
fireSearchStatusChangedEvent(_poiSearchHandle,POIServiceTypes::SearchStatusState::NOT_STARTED,poiIDList);
}
-void PoiManagerServerStub::resultListRequested(const std::shared_ptr<CommonAPI::ClientId> _client, uint8_t _camId, ::org::genivi::navigation::NavigationTypes::Handle _poiSearchHandle, std::vector< ::v0_1::org::genivi::navigation::poiservice::POIServiceTypes::AttributeID> _attributes, resultListRequestedReply_t _reply)
+void PoiManagerServerStub::resultListRequested(const std::shared_ptr<CommonAPI::ClientId> _client, POIServiceTypes::ContentAccessModuleID _camId, ::org::genivi::navigation::NavigationTypes::Handle _poiSearchHandle, std::vector< ::v0_1::org::genivi::navigation::poiservice::POIServiceTypes::AttributeID> _attributes, resultListRequestedReply_t _reply)
{
}
diff --git a/src/poi-service/poi-manager-server/poi-manager-server-stub.h b/src/poi-service/poi-manager-server/poi-manager-server-stub.h
index 26830d1..9d6103e 100644
--- a/src/poi-service/poi-manager-server/poi-manager-server-stub.h
+++ b/src/poi-service/poi-manager-server/poi-manager-server-stub.h
@@ -203,7 +203,7 @@ public:
void removePOIs(const std::shared_ptr<CommonAPI::ClientId> _client, std::vector< POIServiceTypes::POI_ID> _ids, removePOIsReply_t _reply);
void poiSearchStarted(const std::shared_ptr<CommonAPI::ClientId> _client, ::org::genivi::navigation::NavigationTypes::Handle _poiSearchHandle, uint16_t _maxSize, ::org::genivi::navigation::NavigationTypes::Coordinate3D _location, std::vector< ::v0_1::org::genivi::navigation::poiservice::POIServiceTypes::CategoryAndRadius> _poiCategories, std::vector< ::v0_1::org::genivi::navigation::poiservice::POIServiceTypes::AttributeDetails> _poiAttributes, std::string _inputString, uint16_t _sortOption, poiSearchStartedReply_t _reply);
void poiSearchCanceled(const std::shared_ptr<CommonAPI::ClientId> _client, ::org::genivi::navigation::NavigationTypes::Handle _poiSearchHandle, poiSearchCanceledReply_t _reply);
- void resultListRequested(const std::shared_ptr<CommonAPI::ClientId> _client, uint8_t _camId, ::org::genivi::navigation::NavigationTypes::Handle _poiSearchHandle, std::vector< ::v0_1::org::genivi::navigation::poiservice::POIServiceTypes::AttributeID> _attributes, resultListRequestedReply_t _reply);
+ void resultListRequested(const std::shared_ptr<CommonAPI::ClientId> _client, POIServiceTypes::ContentAccessModuleID _camId, ::org::genivi::navigation::NavigationTypes::Handle _poiSearchHandle, std::vector< ::v0_1::org::genivi::navigation::poiservice::POIServiceTypes::AttributeID> _attributes, resultListRequestedReply_t _reply);
void poiDetailsRequested(const std::shared_ptr<CommonAPI::ClientId> _client, std::vector< ::v0_1::org::genivi::navigation::poiservice::POIServiceTypes::POI_ID> _source_id, poiDetailsRequestedReply_t _reply);
void run();
@@ -222,6 +222,8 @@ private:
NavigationTypes::Handle m_search_handle;
+ POIServiceTypes::ContentAccessModuleID m_camID;
+
sqlRequest* mp_sqlRequest;
void refreshCategoryList();
diff --git a/src/poi-service/poi-server/main.cpp b/src/poi-service/poi-server/main.cpp
index 1c5a999..5e775f7 100644
--- a/src/poi-service/poi-server/main.cpp
+++ b/src/poi-service/poi-server/main.cpp
@@ -159,7 +159,7 @@ uint8_t poiContentAccessServer::RegisterContentAccessModule(const std::string& m
else
{
m_camName = moduleName;
- m_camId = VALID_HANDLE;
+ m_camId = CAM_ID;
// create a client for contentAccessModule
mp_clientcontentAccessModule = new contentAccessModule(*dbusConnection, moduleName);
// connect it to the POISearch server
diff --git a/test/poi-service/CMakeLists.txt b/test/poi-service/CMakeLists.txt
index 3911d77..e45a8e4 100644
--- a/test/poi-service/CMakeLists.txt
+++ b/test/poi-service/CMakeLists.txt
@@ -38,7 +38,7 @@ message(STATUS "WITH_DATABASE_SUPPLIER = ${WITH_DATABASE_SUPPLIER}")
set(API_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../api")
set(DBUS_GENERATED_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/dbus-include")
-set(DBUS_GENERATED_INCLUDE_DIR_POSITIONING "${CMAKE_CURRENT_BINARY_DIR}/api") # this one is for positioning
+set(DBUS_GENERATED_INCLUDE_DIR_POSITIONING "${CMAKE_CURRENT_BINARY_DIR}/enhanced-position-service/dbus/api") # this one is for positioning
set(POI_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../src")
set(COMMON_DIR "${CMAKE_CURRENT_SOURCE_DIR}/poi-common")
diff --git a/test/poi-service/README b/test/poi-service/README
index 64ecdb5..cc61596 100644
--- a/test/poi-service/README
+++ b/test/poi-service/README
@@ -76,6 +76,7 @@ NB: You need to build the poi-supplier first:
cd build
cmake -DWITH_DATABASE_SUPPLIER=ON ../
make
+cd ..
To launch the stuff for Paris:
./prepare -c paris