diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/poi-service/README.md | 21 | ||||
-rw-r--r-- | src/poi-service/poi-manager-server/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/poi-service/poi-manager-server/README.md | 14 | ||||
-rw-r--r-- | src/poi-service/poi-manager-server/poi-manager-server-stub.cpp | 4 | ||||
-rwxr-xr-x | src/poi-service/poi-manager-server/run.sh | 2 |
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 |