summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorasanoaozora <fifitaneki@hotmail.com>2016-10-31 16:10:42 +0100
committerasanoaozora <fifitaneki@hotmail.com>2016-10-31 16:10:42 +0100
commit8f226312ea99856ce35cf2d8a1ba49ada995f507 (patch)
tree055fa5f8a225f8a29e499b0b3b801be0d0848359 /src
parent1399a1bf18d317e7622e0ce52d1415a3f9efb826 (diff)
downloadpoi-service-8f226312ea99856ce35cf2d8a1ba49ada995f507.tar.gz
POI POC updated to CommonAPI 3.1.9
Diffstat (limited to 'src')
-rw-r--r--src/poi-service/README.md21
-rw-r--r--src/poi-service/poi-manager-server/CMakeLists.txt8
-rw-r--r--src/poi-service/poi-manager-server/README.md14
-rw-r--r--src/poi-service/poi-manager-server/poi-manager-server-stub.cpp4
-rwxr-xr-xsrc/poi-service/poi-manager-server/run.sh2
5 files changed, 32 insertions, 17 deletions
diff --git a/src/poi-service/README.md b/src/poi-service/README.md
index a0e8c29..a8ebd94 100644
--- a/src/poi-service/README.md
+++ b/src/poi-service/README.md
@@ -28,13 +28,21 @@ or to build updated parts
## How To Run
```./bin/poi-server -f ./resource/poi-database-sample.db```
-## How to for the CommonAPI based version (draft)
-The former version of the POCs is based on GLib DBus. A migration to CommonAPI is under progress.
+## How to for the CommonAPI based version
-###Prerequisites
-You need CommonAPI 3.1.5 and Franca 0.9.1 installed
+## Prerequisites
+You need CommonAPI 3.1.9 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
+NB: In case you migrate from 3.1.5 to 3.1.9, due to a cmake issue (wrong management of micro version), it's necessary to do:
+```
+sudo mv /usr/local/lib/cmake/CommonAPI-3.1.5 /usr/local/lib/cmake/oldCommonAPI-3.1.5
+```
+Symbolic links are also not well managed, so you need to fix it:
+```
+sudo ln -sfn /usr/local/lib/libCommonAPI.so.3.1.9 /usr/local/lib/libCommonAPI.so.3
+sudo ln -sfn /usr/local/lib/libCommonAPI-DBus.so.3.1.9 /usr/local/lib/libCommonAPI-DBus.so.3
+```
+NB: the patch common-api-dbus-runtime/src/dbus-patches/capi-dbus-add-support-for-custom-marshalling.patch may fail a little bit, in that case it's needed to update the dbus/dbus-string.h manually
### How to build
First it's required to set some paths:
@@ -49,9 +57,6 @@ to clean and rebuild all (including invoking cmake)
or to build updated parts
```./build.sh -m```
-NB: in case you didn't build the whole code yet, you can also invoke
-```./clone_and_build.sh -m```
-
## How To Test
```./run-capi &```
```../../test/poi-service/test-poi-capi.py```
diff --git a/src/poi-service/poi-manager-server/CMakeLists.txt b/src/poi-service/poi-manager-server/CMakeLists.txt
index 2ea667b..4fe46ce 100644
--- a/src/poi-service/poi-manager-server/CMakeLists.txt
+++ b/src/poi-service/poi-manager-server/CMakeLists.txt
@@ -41,12 +41,12 @@ endif()
# Packages
find_package(PkgConfig REQUIRED)
-find_package(CommonAPI 3.1.5 REQUIRED)
-find_package(CommonAPI-DBus 3.1.5 REQUIRED)
+find_package(CommonAPI)
+find_package(CommonAPI-DBus)
#pkg_check_modules(DBUS "dbus-1 >= 1.8.4") // #to be fixed, it doesn't work so the paths are set manually (see above)
-pkg_check_modules(COMMONAPI "CommonAPI >= 3.1.5")
-pkg_check_modules(COMMONAPI_DBUS "CommonAPI-DBus >= 3.1.5")
+pkg_check_modules(COMMONAPI "CommonAPI >= 3.1.9")
+pkg_check_modules(COMMONAPI_DBUS "CommonAPI-DBus >= 3.1.9")
pkg_check_modules(SQLITE3 REQUIRED sqlite3)
pkg_check_modules(GOBJECT gobject-2.0)
pkg_check_modules(GLIB REQUIRED glib-2.0)
diff --git a/src/poi-service/poi-manager-server/README.md b/src/poi-service/poi-manager-server/README.md
index df99baa..2c65a93 100644
--- a/src/poi-service/poi-manager-server/README.md
+++ b/src/poi-service/poi-manager-server/README.md
@@ -9,9 +9,19 @@ NB: The client part is located under ../../test/poi-manager-client
Desktop: Tested under Ubuntu 16.04 LTS 64 bits
## Prerequisites
-You need CommonAPI 3.1.5 and Franca 0.9.1 installed
+You need CommonAPI 3.1.9 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
+NB: In case you migrate from 3.1.5 to 3.1.9, due to a cmake issue (wrong management of micro version), it's necessary to do:
+```
+sudo mv /usr/local/lib/cmake/CommonAPI-3.1.5 /usr/local/lib/cmake/oldCommonAPI-3.1.5
+```
+Symbolic links are also not well managed, so you need to fix it:
+```
+sudo ln -sfn /usr/local/lib/libCommonAPI.so.3.1.9 /usr/local/lib/libCommonAPI.so.3
+sudo ln -sfn /usr/local/lib/libCommonAPI-DBus.so.3.1.9 /usr/local/lib/libCommonAPI-DBus.so.3
+```
+
+NB: the patch common-api-dbus-runtime/src/dbus-patches/capi-dbus-add-support-for-custom-marshalling.patch may fail a little bit, in that case it's needed to update the dbus/dbus-string.h manually
## How to build
First it's required to set some paths:
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 2beec13..07f4c93 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
@@ -1241,13 +1241,13 @@ void PoiManagerServerStub::getVersion(const std::shared_ptr<CommonAPI::ClientId>
void PoiManagerServerStub::setLocale(const std::shared_ptr<CommonAPI::ClientId> _client, std::string _languageCode, std::string _countryCode, std::string _scriptCode, setLocaleReply_t _reply)
{
- std::vector<uint16_t> changedSettings;
+ std::vector<POIServiceTypes::Settings> changedSettings;
m_languageCode = _languageCode;
m_countryCode = _countryCode;
m_scriptCode = _scriptCode;
- changedSettings.push_back(POIServiceTypes::ConfigurationChangedReason::LOCALES);
+ changedSettings.push_back(POIServiceTypes::Settings::LOCALE);
fireConfigurationChangedEvent(changedSettings);
}
diff --git a/src/poi-service/poi-manager-server/run.sh b/src/poi-service/poi-manager-server/run.sh
index eb6337a..4175d33 100755
--- a/src/poi-service/poi-manager-server/run.sh
+++ b/src/poi-service/poi-manager-server/run.sh
@@ -3,4 +3,4 @@ RESOURCE=../resource
cp $RESOURCE/poi-database-managed.db ./bin
COMMONAPI_DEFAULT_CONFIG=$RESOURCE/commonapi4dbus.ini \
COMMONAPI_DBUS_DEFAULT_CONFIG=$RESOURCE/commonapi-dbus.ini \
-./bin/poi-manager-server -f ./bin/poi-database-managed.db &
+./bin/poi-manager-server -f ./bin/poi-database-managed.db