summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorasanoaozora <fifitaneki@hotmail.com>2016-06-17 16:12:09 +0200
committerasanoaozora <fifitaneki@hotmail.com>2016-06-17 16:12:09 +0200
commitafd74c2978de340727b7890027acbe855def5821 (patch)
tree3aa78a2dc404fb8d7b30173b6033158b7e723215
parent2d611927b31167b0d0f51dc3303f582985221b35 (diff)
downloadpoi-service-afd74c2978de340727b7890027acbe855def5821.tar.gz
migration of poi add/remove POC to CommonAPI in progress
-rw-r--r--api/franca/README.md (renamed from api/franca/README)9
-rw-r--r--api/franca/hmi/speechservice/CMakeLists.txt (renamed from api/franca/hmi/speechoutputservice/CMakeLists.txt)2
-rw-r--r--api/franca/hmi/speechservice/SpeechOutput.fidl (renamed from api/franca/hmi/speechoutputservice/SpeechOutput.fidl)0
-rw-r--r--api/franca/navigation/freetextsearchservice/CMakeLists.txt2
-rw-r--r--api/franca/navigation/mapviewer/CMakeLists.txt2
-rw-r--r--api/franca/navigation/navigationcore/CMakeLists.txt2
-rw-r--r--api/franca/navigation/poiservice/CMakeLists.txt2
-rw-r--r--src/navigation/README.md5
-rw-r--r--src/poi-service/CMakeLists.txt7
-rw-r--r--src/poi-service/README133
-rw-r--r--src/poi-service/README.md37
-rwxr-xr-xsrc/poi-service/build.sh46
-rw-r--r--src/poi-service/poi-manager-server/CMakeLists.txt11
-rw-r--r--src/poi-service/poi-manager-server/README.md47
-rwxr-xr-xsrc/poi-service/poi-manager-server/build.sh69
-rw-r--r--src/poi-service/poi-manager-server/poi-manager-server-stub.cpp8
-rw-r--r--src/poi-service/poi-manager-server/poi-manager-server-stub.h22
-rwxr-xr-xsrc/poi-service/rebuild_all.sh79
-rw-r--r--test/navigation/.gitignore3
-rw-r--r--test/poi-service/CMakeLists.txt7
-rw-r--r--test/poi-service/README221
-rw-r--r--test/poi-service/README.md110
-rwxr-xr-xtest/poi-service/build.sh61
-rwxr-xr-xtest/poi-service/clone_and_build.sh29
-rw-r--r--test/poi-service/poi-client/main.cpp3
-rw-r--r--test/poi-service/poi-contentaccess-module/main.cpp4
-rw-r--r--test/poi-service/poi-manager-client/CMakeLists.txt9
-rw-r--r--test/poi-service/poi-manager-client/README.md100
-rwxr-xr-xtest/poi-service/poi-manager-client/build.sh75
-rw-r--r--test/poi-service/poi-manager-client/main.cpp14
-rwxr-xr-xtest/poi-service/poi-manager-client/run (renamed from test/poi-service/run_capi)16
-rwxr-xr-xtest/poi-service/rebuild_all.sh97
32 files changed, 648 insertions, 584 deletions
diff --git a/api/franca/README b/api/franca/README.md
index c09d1e4..410d928 100644
--- a/api/franca/README
+++ b/api/franca/README.md
@@ -14,9 +14,10 @@ HOW TO GENERATE THE COMMON API FILES
First you need to have generated the common api tools and the common api dbus tools.
For example, to generate the whole set of stubs:
-mkdir build
-cd build
-cmake -DCOMMONAPI_TOOL_DIR=<tools path> -DCOMMONAPI_DBUS_TOOL_DIR=<dbus tools path> ../
+```mkdir build```
+```cd build```
+```cmake -DCOMMONAPI_TOOL_DIR=<tools path> -DCOMMONAPI_DBUS_TOOL_DIR=<dbus tools path> ../```
To generate part of the stubs, for example the stubs for poi service:
-cmake -DCOMMONAPI_TOOL_DIR=<tools path> -DCOMMONAPI_DBUS_TOOL_DIR=<dbus tools path> ../
+```cmake -DCOMMONAPI_TOOL_DIR=<tools path> -DCOMMONAPI_DBUS_TOOL_DIR=<dbus tools path> ../
+``` \ No newline at end of file
diff --git a/api/franca/hmi/speechoutputservice/CMakeLists.txt b/api/franca/hmi/speechservice/CMakeLists.txt
index 94ec064..fb2dfd5 100644
--- a/api/franca/hmi/speechoutputservice/CMakeLists.txt
+++ b/api/franca/hmi/speechservice/CMakeLists.txt
@@ -32,6 +32,8 @@ option(COMMONAPI_DBUS_TOOL_DIR
execute_process(COMMAND uname -i OUTPUT_VARIABLE OS_VERSION)
if("${OS_VERSION}" MATCHES "i686")
set(OS_VERSION "x86")
+else()
+ set(OS_VERSION "x86_64")
endif()
message(STATUS "OS_VERSION = ${OS_VERSION}")
diff --git a/api/franca/hmi/speechoutputservice/SpeechOutput.fidl b/api/franca/hmi/speechservice/SpeechOutput.fidl
index fbd4a50..fbd4a50 100644
--- a/api/franca/hmi/speechoutputservice/SpeechOutput.fidl
+++ b/api/franca/hmi/speechservice/SpeechOutput.fidl
diff --git a/api/franca/navigation/freetextsearchservice/CMakeLists.txt b/api/franca/navigation/freetextsearchservice/CMakeLists.txt
index 06c73c7..ec1cb82 100644
--- a/api/franca/navigation/freetextsearchservice/CMakeLists.txt
+++ b/api/franca/navigation/freetextsearchservice/CMakeLists.txt
@@ -32,6 +32,8 @@ option(COMMONAPI_DBUS_TOOL_DIR
execute_process(COMMAND uname -i OUTPUT_VARIABLE OS_VERSION)
if("${OS_VERSION}" MATCHES "i686")
set(OS_VERSION "x86")
+else()
+ set(OS_VERSION "x86_64")
endif()
message(STATUS "OS_VERSION = ${OS_VERSION}")
diff --git a/api/franca/navigation/mapviewer/CMakeLists.txt b/api/franca/navigation/mapviewer/CMakeLists.txt
index c8e9247..7e8049d 100644
--- a/api/franca/navigation/mapviewer/CMakeLists.txt
+++ b/api/franca/navigation/mapviewer/CMakeLists.txt
@@ -32,6 +32,8 @@ option(COMMONAPI_DBUS_TOOL_DIR
execute_process(COMMAND uname -i OUTPUT_VARIABLE OS_VERSION)
if("${OS_VERSION}" MATCHES "i686")
set(OS_VERSION "x86")
+else()
+ set(OS_VERSION "x86_64")
endif()
message(STATUS "OS_VERSION = ${OS_VERSION}")
diff --git a/api/franca/navigation/navigationcore/CMakeLists.txt b/api/franca/navigation/navigationcore/CMakeLists.txt
index 5e0fc22..91cc5cc 100644
--- a/api/franca/navigation/navigationcore/CMakeLists.txt
+++ b/api/franca/navigation/navigationcore/CMakeLists.txt
@@ -32,6 +32,8 @@ option(COMMONAPI_DBUS_TOOL_DIR
execute_process(COMMAND uname -i OUTPUT_VARIABLE OS_VERSION)
if("${OS_VERSION}" MATCHES "i686")
set(OS_VERSION "x86")
+else()
+ set(OS_VERSION "x86_64")
endif()
message(STATUS "OS_VERSION = ${OS_VERSION}")
diff --git a/api/franca/navigation/poiservice/CMakeLists.txt b/api/franca/navigation/poiservice/CMakeLists.txt
index 758c224..1323e47 100644
--- a/api/franca/navigation/poiservice/CMakeLists.txt
+++ b/api/franca/navigation/poiservice/CMakeLists.txt
@@ -32,6 +32,8 @@ option(COMMONAPI_DBUS_TOOL_DIR
execute_process(COMMAND uname -i OUTPUT_VARIABLE OS_VERSION)
if("${OS_VERSION}" MATCHES "i686")
set(OS_VERSION "x86")
+else()
+ set(OS_VERSION "x86_64")
endif()
message(STATUS "OS_VERSION = ${OS_VERSION}")
diff --git a/src/navigation/README.md b/src/navigation/README.md
index 3c026f3..7794076 100644
--- a/src/navigation/README.md
+++ b/src/navigation/README.md
@@ -40,7 +40,7 @@ sudo apt-get install python-pip python-dbus python-gobject python-pil
sudo pip install --upgrade pip
To test, launch the navigation middleware by entering:
-./run-r
+./run -r
test files:
./test-route-calculation.py
./test-location-input.py
@@ -79,4 +79,7 @@ So, for the time being, export NAVIT_GRAPHICS='sdl' is set into the run script
There's an issue with the svg to png library so inkscape is used. It seems to be necessary to do:
export NO_AT_BRIDGE=1
+## License
+
+Mozilla Public License Version 2.0
diff --git a/src/poi-service/CMakeLists.txt b/src/poi-service/CMakeLists.txt
index 300cfae..83840f3 100644
--- a/src/poi-service/CMakeLists.txt
+++ b/src/poi-service/CMakeLists.txt
@@ -20,14 +20,11 @@ cmake_minimum_required(VERSION 2.8)
message(STATUS ${PROJECT_NAME})
-option(WITH_FRANCA_DBUS_INTERFACE
- "Build using the Franca interfaces" OFF)
option(WITH_DBUS_INTERFACE
"Build using the D-Bus interfaces" ON)
option(WITH_DEBUG
"Enable the debug messages" OFF)
-message(STATUS "WITH_FRANCA_DBUS_INTERFACE = ${WITH_FRANCA_DBUS_INTERFACE}")
message(STATUS "WITH_DBUS_INTERFACE = ${WITH_DBUS_INTERFACE}")
message(STATUS "WITH_DEBUG = ${WITH_DEBUG}")
@@ -46,7 +43,3 @@ add_subdirectory(${API_DIR}/poi-service "${DBUS_GENERATED_INCLUDE_DIR}/poi-servi
add_subdirectory(poi-server)
-if (WITH_FRANCA_DBUS_INTERFACE)
- set(FRANCA_DIR "${API_DIR}/franca")
- add_subdirectory(poi-manager-server)
-endif()
diff --git a/src/poi-service/README b/src/poi-service/README
deleted file mode 100644
index a86ba0d..0000000
--- a/src/poi-service/README
+++ /dev/null
@@ -1,133 +0,0 @@
-Release date of the file: 15-01-2016
-Status: OK
-
-Project:
-Search engine for Point Of Interest with a content access module mechanism to extend to additional sources of data
-This project is one of the navigation-service common projects that implements the GENIVI navigation APIs.
-
-More:
-The project is made of sub parts:
-- poi-supplier that populates a sqlite3 based database from OSM data in xml format
-- poi-server that implements the poi search API and access an embedded database
-- poi-contentaccess-module that implements a content access module that access an additional database, and a simple HMI
-- poi-client that implements a client with a test HMI
-- poi-manager-server and poi-manager-client that implements a CommonAPI based proof of concept of an extension of the poi-contentaccess-module
-See also other navigation projects like navigation or proof of concepts implemented for traffic-info and positioning
-
-What is in:
-This folder contains scripts for building poi-server and poi-manager-server
-FYI: poi-supplier, poi-contentaccess-module and poi-client are located under test/poi-service
-
-Author:
-Philippe Colliot philippe.colliot@mpsa.com
-
-License:
-See headers and LICENSE file
-
-Test target:
-Ubuntu 14.04 LTS 32bits
-Ubuntu 15.10 64bits
-
-To get the code:
-Code is part of the navigation-service repository, so you need to clone the whole content:
-git clone http://git.projects.genivi.org/lbs/navigation-service.git $WORKING-DIR
-
-=============================================================================================
-How-to for the proof of concept
-=============================================================================================
-
-==========================================
-All-in-one script
-==========================================
-./rebuild_all.sh
-
-==========================================
-How-to step by step, with explanations
-==========================================
----Create and enter the build folder---
-mkdir ./build
-cd build
-cmake ../
-make
-cd ..
-
-==========================================
-How To Run
-==========================================
-./bin/poi-server -f ./resource/poi-database-sample.db
-
-=============================================================================================
-How to for the common api based proof of concept (for testing add/remove stuff into a database)
-=============================================================================================
-NB: You need CommonAPI 3.1.2 and Franca 0.9.1 installed
-
-==========================================
-All-in-one script
-==========================================
-./rebuild_all.sh -f
-
-==========================================
-How-to step by step, with explanations
-==========================================
-You need to pass as parameter to the cmake the link to your patched dbus library (required by CommonAPI)
-
-cd build
-cmake -DWITH_FRANCA_DBUS_INTERFACE=ON -DDBUS_LIB_PATH=yourPath -DCOMMONAPI_DBUS_TOOL_DIR=<common-api-dbus-tools folder> -DCOMMONAPI_TOOL_DIR=<common-api-tools folder> -DWITH_DEBUG=ON ../
-make
-cd ..
-
-==========================================
-How To Run
-==========================================
-
-Copy the configuration file ./resource/commonapi-dbus.ini in a directory of your choice
-
-Set the environment variable COMMONAPI_DBUS_DEFAULT_CONFIG before starting the poi-manager-server.
-
-Example:
-export COMMONAPI_DBUS_DEFAULT_CONFIG=<your path>/commonapi-dbus.ini
-
-cp ./resource/poi-database-managed.db ./bin
-./bin/poi-manager-server -f ./bin/poi-database-managed.db
-
-==========================================
-About CommonAPI issues
-==========================================
-It seems to have an issue with the .cmake files when two versions of CommonAPI are installed
-(see into /usr/local/lib/cmake/)
-
-=============
-For the Ubuntu 64 bits, due to the use of symbol versioning LIBDBUS_1_0 by CommonAPI-DBus, the patched version of dbus has to be >= 1.10.0
-(the patch to be applied has to be fix a little bit)
-
-=============
-In case the .pc are not well generated, please add these files to /usr/local/lib/pkgconfig
-
-CommonAPI.pc
-
-prefix=/usr/local
-exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include
-
-Name: Common API C++
-Description: GENIVI Common API C++ Library
-Version: 3.1.2
-Libs: -L${libdir} -lCommonAPI
-Cflags: -I${includedir}/CommonAPI-3.1
-
-CommonAPI-DBus.pc
-
-prefix=/usr/local
-exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include
-
-Name: Common API C++ D-Bus Middleware
-Description: GENIVI Common API C++ D-Bus Middleware
-Version: 3.1.2
-Requires: CommonAPI dbus-1
-Libs: -L${libdir} -Wl,--no-as-needed -lCommonAPI-DBus -Wl,--as-needed
-Cflags: -I${includedir}/CommonAPI-3.1
-
-=============
diff --git a/src/poi-service/README.md b/src/poi-service/README.md
new file mode 100644
index 0000000..c20cff7
--- /dev/null
+++ b/src/poi-service/README.md
@@ -0,0 +1,37 @@
+# POI service middleware
+
+## Synopsis
+This folder contains the server part of the proof of concepts (POC) for the POI service interfaces.
+These interfaces provide access to a search engine for Point Of Interest with a content access module mechanism to extend to additional sources of data.
+NB: The client part is located under ../../test/poi-service
+NB: See the README.md into the sub folder poi-manager-server for the CommonAPI based POC
+
+##Tested targets
+Desktop: Tested under Ubuntu 16.04 LTS 64 bits
+## About the POI service interfaces project
+The project is made of sub parts:
+- poi-supplier that populates a sqlite3 based database from OSM data in xml format
+- poi-server that implements the poi search API and access an embedded database
+- poi-contentaccess-module that implements a content access module that access an additional database, and a simple HMI
+- poi-client that implements a client with a test HMI
+- poi-manager-server and poi-manager-client that implements a proof of concept of an extension of the poi-contentaccess-module (separate build)
+
+## Prerequisites
+
+## How to build
+A script allows either:
+to clean and rebuild all (including invoking cmake)
+```./build.sh -c```
+or to build updated parts
+```./build.sh```
+
+
+
+## How To Run
+```./bin/poi-server -f ./resource/poi-database-sample.db```
+
+
+## License
+
+Mozilla Public License Version 2.0
+
diff --git a/src/poi-service/build.sh b/src/poi-service/build.sh
new file mode 100755
index 0000000..b6fe81c
--- /dev/null
+++ b/src/poi-service/build.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+debug="OFF"
+dbus="ON"
+clean=0
+
+while getopts cdh opt
+do
+ case $opt in
+ c)
+ clean=1
+ ;;
+ d)
+ debug="ON"
+ ;;
+ h)
+ echo "Usage:"
+ echo "$0 [-cd]"
+ echo "-c: Rebuild with clean"
+ echo "-d: Enable the debug messages"
+ exit 1
+ esac
+done
+set -e
+
+if [ "$clean" = 1 ]
+then
+ echo 'clean up the build folder'
+ if [ -d "./build" ]
+ then
+ find ./build ! -name '*.cbp' -type f -exec rm -f {} +
+ fi
+fi
+
+
+mkdir -p build
+cd build
+
+echo 'build poi-server'
+if [ "$clean" = 1 ]
+then
+ cmake -DWITH_DEBUG=$debug ../
+fi
+make
+
+
diff --git a/src/poi-service/poi-manager-server/CMakeLists.txt b/src/poi-service/poi-manager-server/CMakeLists.txt
index 54e8e1e..cb00ca8 100644
--- a/src/poi-service/poi-manager-server/CMakeLists.txt
+++ b/src/poi-service/poi-manager-server/CMakeLists.txt
@@ -16,6 +16,8 @@
# @licence end@
###########################################################################
project(poi-manager-server)
+cmake_minimum_required(VERSION 2.8)
+
message(STATUS ${PROJECT_NAME})
option(DBUS_LIB_PATH
@@ -26,12 +28,17 @@ set(CMAKE_CXX_FLAGS "-Wall -std=c++0x")
set(PARENT_API poiservice)
set(ROOT_API navigation)
-set(API_VERSION_MAJOR 0)
+set(API_VERSION_MAJOR 4)
set(API_VERSION "v${API_VERSION_MAJOR}")
set(COMMONAPI_GEN_DIR "${CMAKE_CURRENT_BINARY_DIR}/src-gen")
set(PRJ_SRC_GEN_PATH ${COMMONAPI_GEN_DIR}/${API_VERSION}/org/genivi/${ROOT_API}/${PARENT_API})
-set(PRJ_SRC_GEN_NAVIGATION_TYPES_PATH ${COMMONAPI_GEN_DIR}/org/genivi/${ROOT_API})
+set(PRJ_SRC_GEN_NAVIGATION_TYPES_PATH ${COMMONAPI_GEN_DIR}/${API_VERSION}/org/genivi/${ROOT_API})
set(PRJ_SRC_GEN_POISERVICE_TYPES_PATH ${COMMONAPI_GEN_DIR}/${API_VERSION}/org/genivi/${ROOT_API}/${PARENT_API})
+set(API_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../api")
+set(FRANCA_DIR "${API_DIR}/franca")
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
+set(COMMON_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../poi-common")
# DBus Path
if(DBUS_LIB_PATH)
diff --git a/src/poi-service/poi-manager-server/README.md b/src/poi-service/poi-manager-server/README.md
new file mode 100644
index 0000000..b35ee26
--- /dev/null
+++ b/src/poi-service/poi-manager-server/README.md
@@ -0,0 +1,47 @@
+# POI service middleware: CommonAPI based POC
+
+## Synopsis
+This folder contains the server part of the proof of concepts (POC) for the POI manager service interfaces, based on CommonAPI
+These interfaces provide access to a search engine for Point Of Interest with a content access module mechanism to extend to additional sources of data.
+NB: The client part is located under ../../test/poi-manager-client
+
+##Tested targets
+Desktop: Tested under Ubuntu 16.04 LTS 64 bits
+
+## Prerequisites
+You need CommonAPI 3.1.5 and Franca 0.9.1 installed
+For the Ubuntu 64 bits, due to the use of symbol versioning LIBDBUS_1_0 by CommonAPI-DBus, the patched version of DBus has to be >= 1.10.0
+NB: the patch common-api-dbus-runtime/src/dbus-patches/capi-dbus-add-support-for-custom-marshalling.patch failed a little bit, it's needed to update the dbus/dbus-string.h manually
+
+## How to build
+First it's required to set some paths:
+```
+export DBUS_LIB_PATH=<path to the patched version of the DBus lib>
+export COMMONAPI_DBUS_TOOL_DIR=<path to the common-api-dbus-tools folder>
+export COMMONAPI_TOOL_DIR=<path to the common-api-tools folder>
+```
+A script allows either:
+to clean and rebuild all (including invoking cmake)
+```./build.sh -c```
+or to build updated parts
+```./build.sh```
+
+## How To Run
+First it's required to set a config file:
+Copy the configuration file ../resource/commonapi-dbus.ini in a directory of your choice
+
+Set the environment variable COMMONAPI_DBUS_DEFAULT_CONFIG before starting the poi-manager-server.
+
+Example:
+```export COMMONAPI_DBUS_DEFAULT_CONFIG=<your path>/commonapi-dbus.ini```
+
+Copy the database for testing:
+
+```cp ../resource/poi-database-managed.db ./bin```
+
+And launch the server (use d-feet to check if it's running or build the client)
+```./bin/poi-manager-server -f ./bin/poi-database-managed.db```
+
+## License
+
+Mozilla Public License Version 2.0
diff --git a/src/poi-service/poi-manager-server/build.sh b/src/poi-service/poi-manager-server/build.sh
new file mode 100755
index 0000000..9769fad
--- /dev/null
+++ b/src/poi-service/poi-manager-server/build.sh
@@ -0,0 +1,69 @@
+#!/bin/bash
+
+commonapi_tools_option=""
+clean=0
+
+while getopts cdh opt
+do
+ case $opt in
+ c)
+ clean=1
+ ;;
+ d)
+ debug="ON"
+ ;;
+ h)
+ echo "Usage:"
+ echo "$0 [-cd]"
+ echo "-c: Rebuild with clean"
+ echo "-d: Enable the debug messages"
+ exit 1
+ esac
+done
+set -e
+
+if [ ! $COMMONAPI_TOOL_DIR ]
+then
+ echo 'Set the dir of the common api tools'
+ echo 'export COMMONAPI_TOOL_DIR=<path>'
+ exit 1
+fi
+
+if [ ! $COMMONAPI_DBUS_TOOL_DIR ]
+then
+ echo 'Set the dir of the common api dbus tools'
+ echo 'export COMMONAPI_DBUS_TOOL_DIR=<path>'
+ exit 1
+fi
+
+if [ ! $DBUS_LIB_PATH ]
+then
+ echo 'Set the dir of the patched dbus'
+ echo 'export DBUS_LIB_PATH=<path>'
+ exit 1
+fi
+
+commonapi_tools_option="-DDBUS_LIB_PATH="$DBUS_LIB_PATH" -DCOMMONAPI_DBUS_TOOL_DIR="$COMMONAPI_DBUS_TOOL_DIR" -DCOMMONAPI_TOOL_DIR="$COMMONAPI_TOOL_DIR
+
+
+if [ "$clean" = 1 ]
+then
+ echo 'clean up the build folder'
+ if [ -d "./build" ]
+ then
+ find ./build ! -name '*.cbp' -type f -exec rm -f {} +
+ fi
+fi
+
+
+mkdir -p build
+cd build
+
+echo 'build poi-manager-server'
+if [ "$clean" = 1 ]
+then
+ cmake $commonapi_tools_option -DWITH_DEBUG=$debug ../
+fi
+make
+
+
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 137cf9b..a4cfb39 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
@@ -1396,7 +1396,7 @@ void PoiManagerServerStub::removePOIs(const std::shared_ptr<CommonAPI::ClientId>
}
}
-void PoiManagerServerStub::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, int32_t _sortOption, poiSearchStartedReply_t _reply)
+void PoiManagerServerStub::poiSearchStarted(const std::shared_ptr<CommonAPI::ClientId> _client, NavigationTypes::Handle _poiSearchHandle, uint16_t _maxSize, NavigationTypes::Coordinate3D _location, std::vector< POIServiceTypes::CategoryAndRadius> _poiCategories, std::vector< POIServiceTypes::AttributeDetails> _poiAttributes, std::string _inputString, int32_t _sortOption, poiSearchStartedReply_t _reply)
{
POIServiceTypes::CategoryAndRadius categoryAndRadius;
size_t index;
@@ -1443,7 +1443,7 @@ void PoiManagerServerStub::poiSearchStarted(const std::shared_ptr<CommonAPI::Cli
}
-void PoiManagerServerStub::poiSearchCanceled(const std::shared_ptr<CommonAPI::ClientId> _client, ::org::genivi::navigation::NavigationTypes::Handle _poiSearchHandle, poiSearchCanceledReply_t _reply)
+void PoiManagerServerStub::poiSearchCanceled(const std::shared_ptr<CommonAPI::ClientId> _client, NavigationTypes::Handle _poiSearchHandle, poiSearchCanceledReply_t _reply)
{
std::vector<POIServiceTypes::POI_ID> poiIDList;
@@ -1454,12 +1454,12 @@ 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, POIServiceTypes::ContentAccessModuleID _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, NavigationTypes::Handle _poiSearchHandle, std::vector< POIServiceTypes::AttributeID> _attributes, resultListRequestedReply_t _reply)
{
}
-void PoiManagerServerStub::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 PoiManagerServerStub::poiDetailsRequested(const std::shared_ptr<CommonAPI::ClientId> _client, std::vector< POIServiceTypes::POI_ID> _source_id, poiDetailsRequestedReply_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 b835a40..1d3961b 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
@@ -29,10 +29,10 @@
#include <CommonAPI/CommonAPI.hpp>
-#include <org/genivi/CommonTypes.hpp>
-#include <org/genivi/navigation/NavigationTypes.hpp>
-#include <v0/org/genivi/navigation/poiservice/POIServiceTypes.hpp>
-#include <v0/org/genivi/navigation/poiservice/POIContentAccessModuleStubDefault.hpp>
+#include <v4/org/genivi/CommonTypes.hpp>
+#include <v4/org/genivi/navigation/NavigationTypes.hpp>
+#include <v4/org/genivi/navigation/poiservice/POIServiceTypes.hpp>
+#include <v4/org/genivi/navigation/poiservice/POIContentAccessModuleStubDefault.hpp>
#include "poi-common-database.h"
@@ -41,9 +41,9 @@
#include "poi-common-math.h"
using namespace std;
-using namespace v0::org::genivi::navigation::poiservice;
-using namespace org::genivi::navigation;
-using namespace org::genivi;
+using namespace v4::org::genivi::navigation::poiservice;
+using namespace v4::org::genivi::navigation;
+using namespace v4::org::genivi;
class sqlRequest
{
@@ -203,10 +203,10 @@ public:
void removeCategories(const std::shared_ptr<CommonAPI::ClientId> _client, std::vector< CommonTypes::CategoryID> _categories, removeCategoriesReply_t _reply);
void addPOIs(const std::shared_ptr<CommonAPI::ClientId> _client, CommonTypes::CategoryID _unique_id, std::vector< POIServiceTypes::PoiAddedDetails> _poiList, addPOIsReply_t _reply);
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, int32_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, 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 poiSearchStarted(const std::shared_ptr<CommonAPI::ClientId> _client, NavigationTypes::Handle _poiSearchHandle, uint16_t _maxSize, NavigationTypes::Coordinate3D _location, std::vector< POIServiceTypes::CategoryAndRadius> _poiCategories, std::vector< POIServiceTypes::AttributeDetails> _poiAttributes, std::string _inputString, int32_t _sortOption, poiSearchStartedReply_t _reply);
+ void poiSearchCanceled(const std::shared_ptr<CommonAPI::ClientId> _client, NavigationTypes::Handle _poiSearchHandle, poiSearchCanceledReply_t _reply);
+ void resultListRequested(const std::shared_ptr<CommonAPI::ClientId> _client, POIServiceTypes::ContentAccessModuleID _camId, NavigationTypes::Handle _poiSearchHandle, std::vector< POIServiceTypes::AttributeID> _attributes, resultListRequestedReply_t _reply);
+ void poiDetailsRequested(const std::shared_ptr<CommonAPI::ClientId> _client, std::vector< POIServiceTypes::POI_ID> _source_id, poiDetailsRequestedReply_t _reply);
void run();
diff --git a/src/poi-service/rebuild_all.sh b/src/poi-service/rebuild_all.sh
deleted file mode 100755
index 5d4861e..0000000
--- a/src/poi-service/rebuild_all.sh
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/bash
-
-debug="OFF"
-franca="OFF"
-dbus="ON"
-commonapi_tools_option=""
-clean=0
-
-while getopts cdf opt
-do
- case $opt in
- c)
- clean=1
- ;;
- d)
- debug="ON"
- ;;
- f)
- franca="ON"
- dbus="OFF"
- ;;
- \?)
- echo "Usage:"
- echo "$0 [-cdf]"
- echo "-c: Rebuild with clean"
- echo "-d: Enable the debug messages"
- echo "-f: Build using the Franca interfaces"
- exit 1
- esac
-done
-set -e
-
-if [ "$franca" = "ON" ]
-then
- if [ ! $COMMONAPI_TOOL_DIR ]
- then
- echo 'Set the dir of the common api tools'
- echo 'export COMMONAPI_TOOL_DIR=<path>'
- exit 1
- fi
-
- if [ ! $COMMONAPI_DBUS_TOOL_DIR ]
- then
- echo 'Set the dir of the common api dbus tools'
- echo 'export COMMONAPI_DBUS_TOOL_DIR=<path>'
- exit 1
- fi
-
- if [ ! $DBUS_LIB_PATH ]
- then
- echo 'Set the dir of the patched dbus'
- echo 'export DBUS_LIB_PATH=<path>'
- exit 1
- fi
-
- commonapi_tools_option="-DDBUS_LIB_PATH="$DBUS_LIB_PATH" -DCOMMONAPI_DBUS_TOOL_DIR="$COMMONAPI_DBUS_TOOL_DIR" -DCOMMONAPI_TOOL_DIR="$COMMONAPI_TOOL_DIR
-fi
-
-if [ "$clean" = 1 ]
-then
- echo 'clean up the build folder'
- if [ -d "./build" ]
- then
- find ./build ! -name '*.cbp' -type f -exec rm -f {} +
- fi
-fi
-
-
-mkdir -p build
-cd build
-
-echo 'build poi-server'
-if [ "$clean" = 1 ]
-then
- cmake -DWITH_FRANCA_DBUS_INTERFACE=$franca -DWITH_DBUS_INTERFACE=$dbus $commonapi_tools_option -DWITH_DEBUG=$debug ../
-fi
-make
-
-
diff --git a/test/navigation/.gitignore b/test/navigation/.gitignore
new file mode 100644
index 0000000..d29b348
--- /dev/null
+++ b/test/navigation/.gitignore
@@ -0,0 +1,3 @@
+.project
+.pydevproject
+.settings/
diff --git a/test/poi-service/CMakeLists.txt b/test/poi-service/CMakeLists.txt
index aa52baa..7a23244 100644
--- a/test/poi-service/CMakeLists.txt
+++ b/test/poi-service/CMakeLists.txt
@@ -20,8 +20,6 @@ cmake_minimum_required(VERSION 2.8)
message(STATUS ${PROJECT_NAME})
-option(WITH_FRANCA_DBUS_INTERFACE
- "Build using the Franca interfaces" OFF)
option(WITH_DBUS_INTERFACE
"Build using the D-Bus interfaces" ON)
option(WITH_DEBUG
@@ -29,7 +27,6 @@ option(WITH_DEBUG
option(WITH_DATABASE_SUPPLIER
"Build the database supplier" OFF)
-message(STATUS "WITH_FRANCA_DBUS_INTERFACE = ${WITH_FRANCA_DBUS_INTERFACE}")
message(STATUS "WITH_DBUS_INTERFACE = ${WITH_DBUS_INTERFACE}")
message(STATUS "WITH_DEBUG = ${WITH_DEBUG}")
message(STATUS "WITH_DATABASE_SUPPLIER = ${WITH_DATABASE_SUPPLIER}")
@@ -63,8 +60,4 @@ add_subdirectory(poi-client)
add_subdirectory(poi-contentaccess-module)
-if(WITH_FRANCA_DBUS_INTERFACE)
- set(FRANCA_DIR "${API_DIR}/franca")
- add_subdirectory(poi-manager-client)
-endif()
diff --git a/test/poi-service/README b/test/poi-service/README
deleted file mode 100644
index 5a1b8e0..0000000
--- a/test/poi-service/README
+++ /dev/null
@@ -1,221 +0,0 @@
-Release date of the file: 25-01-2016
-Status: OK
-
-Project:
-Search engine for Point Of Interest with a content access module mechanism to extend to additional sources of data
-This project is one of the navigation-service common projects that implements the GENIVI navigation APIs.
-
-More:
-The project is made of four parts:
-- poi-supplier that populates a sqlite3 based database from OSM data in xml format (you need -DWITH_DATABASE_SUPPLIER=ON)
-- poi-server that implements the poi search API and access an embedded database
-- poi-contentaccess-module that implements a content access module that access an additional database, and a simple HMI
-- poi-client that implements a client with a test HMI
-See also other navigation projects like navigation or proof of concepts implemented for traffic-info and positioning
-
-What is in:
-This folder contains scripts for building poi-supplier, poi-contentaccess-module and poi-client, generating the databases and launching the whole stuff (build poi-server if necessary)
-FYI: poi-server is located under ../../src/poi-service
-
-Author:
-Philippe Colliot philippe.colliot@mpsa.com
-
-License:
-See headers and LICENSE file (mainly MPL V2)
-
-Test target:
-Ubuntu 14.04 LTS 32bits
-Ubuntu 15.10 64bits
-
-Qt version:
-Qt5 (to get the version -> qtchooser -print-env, to set the version -> export QT-SELECT=<version>)
-
-To get the code:
-Code is part of the navigation-service repository, so you need to clone all:
-git clone http://git.projects.genivi.org/lbs/navigation-service.git $WORKING-DIR
-
-Important notice before building the POC:
-# The software is using stream conversion, so please care if your local settings are right
-# There could be a potential runtime error due to a wrong sql request (problem with the use of ',' in place of '.')
-# so, if you enter
-locale | grep 'LC_NUMERIC'
-# you must get
-LC_NUMERIC="en_US.UTF-8"
-
-==========================================
-Current versions of additional code
-==========================================
-<current version of positioning> (git): 32f9e5ce48f76c5c9833dda0e1743ab8b45dc574
-
-==========================================
-How to get additional code
-==========================================
-Get positioning:
-git clone http://git.projects.genivi.org/lbs/positioning.git ./positioning
-cd positioning
-git checkout <current version of positioning>
-cd ../
-
-=============================================================================================
-How-to for the proof of concept
-=============================================================================================
-(you're supposed to have got additional code before)
-
-==========================================
-All-in-one script (for paris area)
-==========================================
-./rebuild_all.sh
-
-==========================================
-How-to step by step, with explanations
-==========================================
----Create and enter the build folder---
-mkdir ./build
-cd build
-cmake ../
-make
-cd ..
-
----Prepare the database and the configuration for a country---
-NB: You need to build the poi-supplier first:
-cd build
-cmake -DWITH_DATABASE_SUPPLIER=ON ../
-make
-cd ..
-
----To generate the database for Paris---
-./prepare -c paris
-
-NB:
-As examples, three databases can be generated for Paris, Tokyo and San-Diego
-The input stuff is taken from the OSM, by using this site:
-http://www.overpass-api.de
-
-For instance, in Paris area, the bounding box used for the demo is
-bbox=2.246304,48.814551,2.430325,48.901289
-In case we want to get the hotels and the museums located inside the area defined, request is:
-http://www.overpass-api.de/api/xapi?*[bbox=2.246304,48.814551,2.430325,48.901289][tourism=museum|hotel]
-for the stations:
-http://www.overpass-api.de/api/xapi?*[bbox=2.246304,48.814551,2.430325,48.901289][railway=station]
-for the bicycle
-http://www.overpass-api.de/api/xapi?*[bbox=2.246304,48.814551,2.430325,48.901289][shop=bicycle]
-for the fuel stations
-http://www.overpass-api.de/api/xapi?*[bbox=2.246304,48.814551,2.430325,48.901289][amenity=fuel]
-
-For Tokyo, the bounding box is 139.691048,35.631628,139.832497,35.738153
-
-NB: In case you get such error message during runtime:
-D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/etc/machine-id": No such file or directory
-You need to fix it by:
-sudo su
-dbus-uuidgen > /etc/machine-id
-
-==========================================
-How To Run
-==========================================
-./run
-
----Test sequence can be---
-On main panel:
-CREATE
-
-On additional panel:
-REGISTER
-ADDandREG
-
-On main panel
-Categories
-all categories with Radius set to 2000
-bicycle with Radius set to 5000
-replace 'enter text to search' with 'Saint'
-SEARCH
-You see FINISHED with 32 records
-Result list
-TOP/PREV/NEXT to watch the result
-For a new search, click on CANCEL first
-
-=============================================================================================
-How to for the common api based proof of concept (for testing add/remove stuff into a database)
-=============================================================================================
-NB: You need CommonAPI 3.1.2 and Franca 0.9.1 installed
-
-==========================================
-All-in-one script
-==========================================
-./rebuild_all.sh -f
-
-==========================================
-How-to step by step, with explanations
-==========================================
-First you need to build the poi-manager-server, see the README in ../../src/poi-service
-
-cd build
-
-You need to pass as parameter to the cmake the link to your patched dbus library (required by CommonAPI)
-
-cd build
-cmake -DWITH_FRANCA_DBUS_INTERFACE=ON -DDBUS_LIB_PATH=yourPath -DCOMMONAPI_DBUS_TOOL_DIR=<common-api-dbus-tools folder> -DCOMMONAPI_TOOL_DIR=<common-api-tools folder> -DWITH_DEBUG=ON ../
-
-make
-
-==========================================
-How To Run
-==========================================
-./run_capi
-NB: the configuration file ./resource/commonapi-dbus.ini is copied into $HOME
-
----Test sequence can be---
-NB: no DLT started
-
-DLT| WARNING: Loging disabled, FIFO /tmp/dlt cannot be opened with open()!
-[CAPI][INFO] Using default binding 'dbus'
-[CAPI][INFO] Using default shared library folder '/usr/local/lib/commonapi'
-[CAPI][INFO] Using default configuration file '/etc/commonapi.ini'
-[CAPI][DEBUG] Registering factory for binding=dbus
-poi manager server started
-
-DLT| WARNING: Loging disabled, FIFO /tmp/dlt cannot be opened with open()!
-[CAPI][INFO] Using default binding 'dbus'
-[CAPI][INFO] Using default shared library folder '/usr/local/lib/commonapi'
-[CAPI][INFO] Using default configuration file '/etc/commonapi.ini'
-[CAPI][DEBUG] Registering factory for binding=dbus
-poi manager client started
-Version 1.0.0
-Date 19-03-2015
-languageCode: eng countryCode: USA scriptCode: Latn
-Configuration changed: 0
-Change locales
-languageCode: fra countryCode: FRA scriptCode: Latn
-id: 0 name: all categories top level: 1
-
-Create category
-
-Category 1 created
-id: 0 name: all categories top level: 1
-id: 1 name: recreation top level: 1
-
-Create POI
-
-POI 1 added
-
-Search
-
-Search state 1298
-Result list size 1
-POI id 1
-
-Delete POI
-
-POI 1 removed
-
-Delete category
-
-Category 1 removed
-id: 0 name: all categories top level: 1
-
-Exit
-poi manager client closed
-DLT| ERROR: Lost log messages in user buffer when exiting: 2
-
-
-
diff --git a/test/poi-service/README.md b/test/poi-service/README.md
new file mode 100644
index 0000000..dea0528
--- /dev/null
+++ b/test/poi-service/README.md
@@ -0,0 +1,110 @@
+# POI service client
+
+## Synopsis
+This folder contains the client part of the proof of concepts (POC) for the POI service interfaces.
+These interfaces provide access to a search engine for Point Of Interest with a content access module mechanism to extend to additional sources of data.
+NB: The server part is located under ../../src/poi-service
+This folder contains scripts for building poi-supplier, poi-contentaccess-module and poi-client, generating the databases and launching the whole stuff (all the stuff can be built from here)
+NB: See the README.md into the sub folder poi-manager-client for the CommonAPI based POC
+
+##Tested targets
+Desktop: Tested under Ubuntu 16.04 LTS 64 bits
+
+## Third parties software
+Positioning from [https://github.com/GENIVI/positioning](https://github.com/GENIVI/positioning)
+
+## About the POI service interfaces project
+The project is made of sub parts:
+- poi-supplier that populates a sqlite3 based database from OSM data in xml format
+- poi-server that implements the poi search API and access an embedded database
+- poi-contentaccess-module that implements a content access module that access an additional database, and a simple HMI
+- poi-client that implements a client with a test HMI
+- poi-manager-server and poi-manager-client that implements a proof of concept of an extension of the poi-contentaccess-module (separate build)
+
+## Prerequisites
+Qt version:
+Qt5 (to get the version -> qtchooser -print-env, to set the version -> export QT-SELECT=<version>)
+
+## How to build
+Important notice before building the POC:
+- The software is using stream conversion, so please care if your local settings are right
+- There could be a potential runtime error due to a wrong sql request (problem with the use of ',' in place of '.')
+so, if you enter
+locale | grep 'LC_NUMERIC'
+you must get
+LC_NUMERIC="en_US.UTF-8"
+### From scratch
+A script allows to clone the third parties code (i.e. positioning and navit) and rebuild all
+./clone_and_build.sh
+### Build
+
+A script allows either:
+to clean and rebuild all (including invoking cmake)
+```./build.sh -c```
+or to build updated parts
+```./build.sh```
+
+## How To Run
+./run
+
+## How to test
+
+On main panel:
+CREATE
+
+On additional panel:
+REGISTER
+ADDandREG
+
+On main panel
+Categories
+all categories with Radius set to 2000
+bicycle with Radius set to 5000
+replace 'enter text to search' with 'Saint'
+SEARCH
+You see FINISHED with 32 records
+Result list
+TOP/PREV/NEXT to watch the result
+For a new search, click on CANCEL first
+
+
+
+## How To prepare the database and the configuration for a country
+NB: You need to get the poi-supplier being built first:
+cd build
+cmake -DWITH_DATABASE_SUPPLIER=ON ../
+make
+cd ..
+
+---To generate the database for Paris---
+./prepare -c paris
+
+NB:
+As examples, three databases can be generated for Paris, Tokyo and San-Diego
+The input stuff is taken from the OSM, by using this site:
+http://www.overpass-api.de
+
+For instance, in Paris area, the bounding box used for the demo is
+bbox=2.246304,48.814551,2.430325,48.901289
+In case we want to get the hotels and the museums located inside the area defined, request is:
+http://www.overpass-api.de/api/xapi?*[bbox=2.246304,48.814551,2.430325,48.901289][tourism=museum|hotel]
+for the stations:
+http://www.overpass-api.de/api/xapi?*[bbox=2.246304,48.814551,2.430325,48.901289][railway=station]
+for the bicycle
+http://www.overpass-api.de/api/xapi?*[bbox=2.246304,48.814551,2.430325,48.901289][shop=bicycle]
+for the fuel stations
+http://www.overpass-api.de/api/xapi?*[bbox=2.246304,48.814551,2.430325,48.901289][amenity=fuel]
+
+For Tokyo, the bounding box is 139.691048,35.631628,139.832497,35.738153
+
+NB: In case you get such error message during runtime:
+D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/etc/machine-id": No such file or directory
+You need to fix it by:
+sudo su
+dbus-uuidgen > /etc/machine-id
+
+## License
+
+Mozilla Public License Version 2.0
+
+
diff --git a/test/poi-service/build.sh b/test/poi-service/build.sh
new file mode 100755
index 0000000..55043a1
--- /dev/null
+++ b/test/poi-service/build.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+debug="OFF"
+dbus="ON"
+clean=0
+
+while getopts cdh opt
+do
+ case $opt in
+ c)
+ clean=1
+ ;;
+ d)
+ debug="ON"
+ ;;
+ h)
+ echo "Usage:"
+ echo "$0 [-cdh]"
+ echo "-c: Rebuild with clean"
+ echo "-d: Enable the debug messages"
+ exit 1
+ esac
+done
+set -e
+
+cd ../../src/poi-service
+./build.sh "$@"
+cd ../../test/poi-service
+
+if [ "$clean" = 1 ]
+then
+ echo 'clean up the build folder'
+ if [ -d "./build" ]
+ then
+ find ./build ! -name '*.cbp' -type f -exec rm -f {} +
+ fi
+else
+ echo 'just build without generation of the database'
+fi
+
+
+mkdir -p build
+
+cd build
+
+echo 'build poi-client'
+if [ "$clean" = 1 ]
+then
+ cmake -DWITH_DATABASE_SUPPLIER=ON -DWITH_DEBUG=$debug ../
+fi
+make
+cd ..
+
+if [ "$clean" = 1 ]
+then
+ echo 'populate the database with POIs of Paris'
+ ./prepare -c paris
+fi
+
+
+
diff --git a/test/poi-service/clone_and_build.sh b/test/poi-service/clone_and_build.sh
new file mode 100755
index 0000000..e864f69
--- /dev/null
+++ b/test/poi-service/clone_and_build.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+positioning_version='9e65831eed02cc8a1b2e2e73787d6007b54214b4'
+
+echo "version of positioning is: $positioning_version"
+
+echo -n "This script deletes, reloads and builds everything, are you sure ? (y or n) "
+read input
+
+if [ ! "$input" = 'y' ]
+then
+ exit 1
+fi
+
+if [ -d "./build" ]
+then
+ find ./build ! -name '*.cbp' -type f -exec rm -f {} +
+fi
+rm -rf positioning
+
+git clone https://github.com/GENIVI/positioning.git ./positioning
+cd positioning
+git checkout $positioning_version
+cd ..
+
+./build.sh -c
+
+
+
diff --git a/test/poi-service/poi-client/main.cpp b/test/poi-service/poi-client/main.cpp
index 7ef2adc..1c7bad2 100644
--- a/test/poi-service/poi-client/main.cpp
+++ b/test/poi-service/poi-client/main.cpp
@@ -31,6 +31,7 @@
#include <QApplication>
#include <QTranslator>
#include <QSettings>
+#include <QDir>
int main(int argc, char *argv[])
{
@@ -79,7 +80,7 @@ int main(int argc, char *argv[])
if (translator.load("poi-client_"+ mainWindow.settingsHMIlanguage))
{
- if (QResource::registerResource("poi-client-resource.rcc","./"))
+ if (QResource::registerResource("poi-client-resource.rcc",QDir::currentPath()))
{
app.installTranslator(&translator);
diff --git a/test/poi-service/poi-contentaccess-module/main.cpp b/test/poi-service/poi-contentaccess-module/main.cpp
index 356f1fa..07af337 100644
--- a/test/poi-service/poi-contentaccess-module/main.cpp
+++ b/test/poi-service/poi-contentaccess-module/main.cpp
@@ -42,6 +42,8 @@
#include <QApplication>
#include <QTranslator>
#include <QResource>
+#include <QDir>
+
#include "mainwindow.h"
#include <QSettings>
@@ -909,7 +911,7 @@ int main(int argc , char** argv )
QApplication a(argc, argv);
QTranslator translator;
- if (QResource::registerResource("poi-client-resource.rcc","./"))
+ if (QResource::registerResource("poi-client-resource.rcc",QDir::currentPath()))
{
if (translator.load("poi-contentaccess-module_"+ language))
{
diff --git a/test/poi-service/poi-manager-client/CMakeLists.txt b/test/poi-service/poi-manager-client/CMakeLists.txt
index cd726e3..b2973b3 100644
--- a/test/poi-service/poi-manager-client/CMakeLists.txt
+++ b/test/poi-service/poi-manager-client/CMakeLists.txt
@@ -27,8 +27,15 @@ set(API_VERSION_MAJOR 0)
set(API_VERSION "v${API_VERSION_MAJOR}")
set(COMMONAPI_GEN_DIR "${CMAKE_CURRENT_BINARY_DIR}/src-gen")
set(PRJ_SRC_GEN_PATH ${COMMONAPI_GEN_DIR}/${API_VERSION}/org/genivi/${ROOT_API}/${PARENT_API})
-set(PRJ_SRC_GEN_NAVIGATION_TYPES_PATH ${COMMONAPI_GEN_DIR}/org/genivi/${ROOT_API})
+set(PRJ_SRC_GEN_NAVIGATION_TYPES_PATH ${COMMONAPI_GEN_DIR}/${API_VERSION}/org/genivi/${ROOT_API})
set(PRJ_SRC_GEN_POISERVICE_TYPES_PATH ${COMMONAPI_GEN_DIR}/${API_VERSION}/org/genivi/${ROOT_API}/${PARENT_API})
+set(API_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../api")
+set(FRANCA_DIR "${API_DIR}/franca")
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
+set(COMMON_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../poi-common")
+set(POI_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../src")
+set(COMMON_DIR_POI_SERVER "${POI_SRC_DIR}/poi-service/poi-common")
# DBus Path
if (DBUS_LIB_PATH)
diff --git a/test/poi-service/poi-manager-client/README.md b/test/poi-service/poi-manager-client/README.md
new file mode 100644
index 0000000..381fd1c
--- /dev/null
+++ b/test/poi-service/poi-manager-client/README.md
@@ -0,0 +1,100 @@
+# POI service client: CommonAPI based POC
+
+## Synopsis
+This folder contains the client part of the proof of concepts (POC) for the POI service interfaces, based on CommonAPI
+These interfaces provide access to a search engine for Point Of Interest with a content access module mechanism to extend to additional sources of data.
+NB: The server part is located under ../../src/poi-manager-service
+
+##Tested targets
+Desktop: Tested under Ubuntu 16.04 LTS 64 bits
+
+## Prerequisites
+You need CommonAPI 3.1.5 and Franca 0.9.1 installed
+For the Ubuntu 64 bits, due to the use of symbol versioning LIBDBUS_1_0 by CommonAPI-DBus, the patched version of DBus has to be >= 1.10.0
+NB: the patch common-api-dbus-runtime/src/dbus-patches/capi-dbus-add-support-for-custom-marshalling.patch failed a little bit, it's needed to update the dbus/dbus-string.h manually
+
+## How to build
+First it's required to set some paths:
+```
+export DBUS_LIB_PATH=<path to the patched version of the DBus lib>
+export COMMONAPI_DBUS_TOOL_DIR=<path to the common-api-dbus-tools folder>
+export COMMONAPI_TOOL_DIR=<path to the common-api-tools folder>
+```
+A script allows either:
+to clean and rebuild all (including invoking cmake)
+```./build.sh -c```
+or to build updated parts
+```./build.sh```
+
+
+## How To Run
+First it's required to set a config file:
+Copy the configuration file ../resource/commonapi-dbus.ini in a directory of your choice
+
+Set the environment variable COMMONAPI_DBUS_DEFAULT_CONFIG before starting the poi-manager-server.
+
+Example:
+```export COMMONAPI_DBUS_DEFAULT_CONFIG=<your path>/commonapi-dbus.ini```
+
+./run
+
+## How to test
+
+---Test sequence can be---
+NB: no DLT started
+
+DLT| WARNING: Loging disabled, FIFO /tmp/dlt cannot be opened with open()!
+[CAPI][INFO] Using default binding 'dbus'
+[CAPI][INFO] Using default shared library folder '/usr/local/lib/commonapi'
+[CAPI][INFO] Using default configuration file '/etc/commonapi.ini'
+[CAPI][DEBUG] Registering factory for binding=dbus
+poi manager server started
+
+DLT| WARNING: Loging disabled, FIFO /tmp/dlt cannot be opened with open()!
+[CAPI][INFO] Using default binding 'dbus'
+[CAPI][INFO] Using default shared library folder '/usr/local/lib/commonapi'
+[CAPI][INFO] Using default configuration file '/etc/commonapi.ini'
+[CAPI][DEBUG] Registering factory for binding=dbus
+poi manager client started
+Version 1.0.0
+Date 19-03-2015
+languageCode: eng countryCode: USA scriptCode: Latn
+Configuration changed: 0
+Change locales
+languageCode: fra countryCode: FRA scriptCode: Latn
+id: 0 name: all categories top level: 1
+
+Create category
+
+Category 1 created
+id: 0 name: all categories top level: 1
+id: 1 name: recreation top level: 1
+
+Create POI
+
+POI 1 added
+
+Search
+
+Search state 1298
+Result list size 1
+POI id 1
+
+Delete POI
+
+POI 1 removed
+
+Delete category
+
+Category 1 removed
+id: 0 name: all categories top level: 1
+
+Exit
+poi manager client closed
+DLT| ERROR: Lost log messages in user buffer when exiting: 2
+
+## License
+
+Mozilla Public License Version 2.0
+
+
diff --git a/test/poi-service/poi-manager-client/build.sh b/test/poi-service/poi-manager-client/build.sh
new file mode 100755
index 0000000..aea6e4a
--- /dev/null
+++ b/test/poi-service/poi-manager-client/build.sh
@@ -0,0 +1,75 @@
+#!/bin/bash
+
+debug="OFF"
+clean=0
+
+while getopts cdh opt
+do
+ case $opt in
+ c)
+ clean=1
+ ;;
+ d)
+ debug="ON"
+ ;;
+ h)
+ echo "Usage:"
+ echo "$0 [-cdh]"
+ echo "-c: Rebuild with clean"
+ echo "-d: Enable the debug messages"
+ exit 1
+ esac
+done
+set -e
+
+if [ ! $COMMONAPI_TOOL_DIR ]
+then
+ echo 'Set the dir of the common api tools'
+ echo 'export COMMONAPI_TOOL_DIR=<path>'
+ exit 1
+fi
+
+if [ ! $COMMONAPI_DBUS_TOOL_DIR ]
+then
+ echo 'Set the dir of the common api dbus tools'
+ echo 'export COMMONAPI_DBUS_TOOL_DIR=<path>'
+ exit 1
+fi
+
+if [ ! $DBUS_LIB_PATH ]
+then
+ echo 'Set the dir of the patched dbus'
+ echo 'export DBUS_LIB_PATH=<path>'
+ exit 1
+fi
+
+commonapi_tools_option="-DDBUS_LIB_PATH="$DBUS_LIB_PATH" -DCOMMONAPI_DBUS_TOOL_DIR="$COMMONAPI_DBUS_TOOL_DIR" -DCOMMONAPI_TOOL_DIR="$COMMONAPI_TOOL_DIR
+
+
+
+cd ../../../src/poi-service/poi-manager-server
+./build.sh "$@"
+cd ../.././../test/poi-service/poi-manager-client
+
+if [ "$clean" = 1 ]
+then
+ echo 'clean up the build folder'
+ if [ -d "./build" ]
+ then
+ find ./build ! -name '*.cbp' -type f -exec rm -f {} +
+ fi
+fi
+
+
+mkdir -p build
+
+cd build
+
+echo 'build poi-manager-client'
+if [ "$clean" = 1 ]
+then
+ cmake $commonapi_tools_option -DWITH_DEBUG=$debug ../
+fi
+make
+cd ..
+
diff --git a/test/poi-service/poi-manager-client/main.cpp b/test/poi-service/poi-manager-client/main.cpp
index 8decba0..e75e685 100644
--- a/test/poi-service/poi-manager-client/main.cpp
+++ b/test/poi-service/poi-manager-client/main.cpp
@@ -40,17 +40,17 @@
#include <functional>
#include <CommonAPI/CommonAPI.hpp> //Defined in the Common API Runtime library
-#include <org/genivi/navigation/NavigationTypes.hpp>
-#include <v0/org/genivi/navigation/poiservice/POIServiceTypes.hpp>
-#include <v0/org/genivi/navigation/poiservice/POIContentAccessModuleProxy.hpp>
+#include <v4/org/genivi/CommonTypes.hpp>
+#include <v4/org/genivi/navigation/NavigationTypes.hpp>
+#include <v4/org/genivi/navigation/poiservice/POIServiceTypes.hpp>
+#include <v4/org/genivi/navigation/poiservice/POIContentAccessModuleProxy.hpp>
#include "poi-common-data-model.h"
using namespace std;
-using namespace v0::org::genivi::navigation;
-using namespace poiservice;
-using namespace org::genivi::navigation;
-using namespace org::genivi;
+using namespace v4::org::genivi::navigation::poiservice;
+using namespace v4::org::genivi::navigation;
+using namespace v4::org::genivi;
// class contentManager
class contentManager
diff --git a/test/poi-service/run_capi b/test/poi-service/poi-manager-client/run
index 56d7ebe..4ade761 100755
--- a/test/poi-service/run_capi
+++ b/test/poi-service/poi-manager-client/run
@@ -28,17 +28,17 @@
CURDIR=$PWD
-POI_CLIENT_DIR=$CURDIR
-POI_CLIENT_BIN_DIR=$POI_CLIENT_DIR/bin
-POI_SERVER_DIR=$CURDIR/../../src/poi-service
-POI_SERVER_BIN_DIR=$POI_SERVER_DIR/bin
+POI_MANAGER_CLIENT_DIR=$CURDIR
+POI_MANAGER_CLIENT_BIN_DIR=$POI_MANAGER_CLIENT_DIR/bin
+POI_MANAGER_SERVER_DIR=$CURDIR/../../../src/poi-service/poi-manager-server
+POI_MANAGER_SERVER_BIN_DIR=$POI_MANAGER_SERVER_DIR/bin
-cp $POI_CLIENT_DIR/resource/commonapi-dbus.ini $HOME
+cp $POI_MANAGER_CLIENT_DIR/../resource/commonapi-dbus.ini $HOME
export COMMONAPI_DBUS_DEFAULT_CONFIG=$HOME/commonapi-dbus.ini
-cp $POI_SERVER_DIR/resource/poi-database-managed.db $POI_SERVER_BIN_DIR
+cp $POI_MANAGER_SERVER_DIR/../resource/poi-database-managed.db $POI_MANAGER_SERVER_BIN_DIR
echo '------------------------start the proof of concept------------------------'
-$POI_SERVER_BIN_DIR/poi-manager-server -f $POI_SERVER_BIN_DIR/poi-database-managed.db &
-$POI_CLIENT_BIN_DIR/poi-manager-client -t &
+$POI_MANAGER_SERVER_BIN_DIR/poi-manager-server -f $POI_MANAGER_SERVER_BIN_DIR/poi-database-managed.db &
+$POI_MANAGER_CLIENT_BIN_DIR/poi-manager-client -t &
diff --git a/test/poi-service/rebuild_all.sh b/test/poi-service/rebuild_all.sh
deleted file mode 100755
index 828b2d6..0000000
--- a/test/poi-service/rebuild_all.sh
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/bin/bash
-
-debug="OFF"
-franca="OFF"
-dbus="ON"
-commonapi_tools_option=""
-clean=0
-
-while getopts cdf opt
-do
- case $opt in
- c)
- clean=1
- ;;
- d)
- debug="ON"
- ;;
- f)
- franca="ON"
- dbus="OFF"
- ;;
- \?)
- echo "Usage:"
- echo "$0 [-cdf]"
- echo "-c: Rebuild with clean"
- echo "-d: Enable the debug messages"
- echo "-f: Build using the Franca interfaces"
- exit 1
- esac
-done
-set -e
-
-if [ "$franca" = "ON" ]
-then
- if [ ! $COMMONAPI_TOOL_DIR ]
- then
- echo 'Set the dir of the common api tools'
- echo 'export COMMONAPI_TOOL_DIR=<path>'
- exit 1
- fi
-
- if [ ! $COMMONAPI_DBUS_TOOL_DIR ]
- then
- echo 'Set the dir of the common api dbus tools'
- echo 'export COMMONAPI_DBUS_TOOL_DIR=<path>'
- exit 1
- fi
-
- if [ ! $DBUS_LIB_PATH ]
- then
- echo 'Set the dir of the patched dbus'
- echo 'export DBUS_LIB_PATH=<path>'
- exit 1
- fi
-
- commonapi_tools_option="-DDBUS_LIB_PATH="$DBUS_LIB_PATH" -DCOMMONAPI_DBUS_TOOL_DIR="$COMMONAPI_DBUS_TOOL_DIR" -DCOMMONAPI_TOOL_DIR="$COMMONAPI_TOOL_DIR
-
-fi
-
-cd ../../src/poi-service
-./rebuild_all.sh "$@"
-cd ../../test/poi-service
-
-if [ "$clean" = 1 ]
-then
- echo 'clean up the build folder'
- if [ -d "./build" ]
- then
- find ./build ! -name '*.cbp' -type f -exec rm -f {} +
- fi
-else
- echo 'just build without generation of the database'
-fi
-
-
-mkdir -p build
-
-cd build
-
-echo 'build poi-client'
-# Important notice: for the time being, it's just poi manager client that can be built against common api,
-# so it's needed to set WITH_DBUS_INTERFACE=ON for positioning
-if [ "$clean" = 1 ]
-then
- cmake -DWITH_DATABASE_SUPPLIER=ON -DWITH_FRANCA_DBUS_INTERFACE=$franca -DWITH_DBUS_INTERFACE=ON $commonapi_tools_option -DWITH_DEBUG=$debug ../
-fi
-make
-cd ..
-
-if [ "$clean" = 1 ]
-then
- echo 'populate the database with POIs of Paris'
- ./prepare -c paris
-fi
-
-
-