summaryrefslogtreecommitdiff
path: root/test/poi-service
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 /test/poi-service
parent2d611927b31167b0d0f51dc3303f582985221b35 (diff)
downloadpoi-service-afd74c2978de340727b7890027acbe855def5821.tar.gz
migration of poi add/remove POC to CommonAPI in progress
Diffstat (limited to 'test/poi-service')
-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
13 files changed, 403 insertions, 343 deletions
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
-
-
-