diff options
author | asanoaozora <fifitaneki@hotmail.com> | 2016-08-23 11:23:03 +0200 |
---|---|---|
committer | asanoaozora <fifitaneki@hotmail.com> | 2016-08-23 11:23:03 +0200 |
commit | 1cfa51e76ba173166c113eccf6a61a5904ff7e7d (patch) | |
tree | e5b1ffb295e786e75f46e8b0f41edcaf2d7b5385 /src | |
parent | 9207b98e3d20750c64e57fea0b5e56c2659e593f (diff) | |
download | poi-service-1cfa51e76ba173166c113eccf6a61a5904ff7e7d.tar.gz |
Common API: POI Search OK
Diffstat (limited to 'src')
-rw-r--r-- | src/poi-service/README.md | 45 | ||||
-rw-r--r-- | src/poi-service/poi-server-capi/main.cpp | 1 |
2 files changed, 44 insertions, 2 deletions
diff --git a/src/poi-service/README.md b/src/poi-service/README.md index c20cff7..a0e8c29 100644 --- a/src/poi-service/README.md +++ b/src/poi-service/README.md @@ -25,11 +25,52 @@ to clean and rebuild all (including invoking cmake) or to build updated parts ```./build.sh``` - - ## 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. + +###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 -cm``` +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``` +If everything is OK, you must see: +Search for hotel and station with keyword: Saint-Germain +Category ID: 2 +Name: hotel +Category ID: 6 +Name: station +Search handle: 1 +language: fra +country: FRA +script: Latn +Search finished +Results: 2 +Hotel: Au Manoir Saint-Germain des Prés +Station: Saint-Germain des Prés +Test PASSED + ## License diff --git a/src/poi-service/poi-server-capi/main.cpp b/src/poi-service/poi-server-capi/main.cpp index 1f9756e..db5f0e1 100644 --- a/src/poi-service/poi-server-capi/main.cpp +++ b/src/poi-service/poi-server-capi/main.cpp @@ -1971,6 +1971,7 @@ void POISearchServerStub::getPoiDetails(const std::shared_ptr<CommonAPI::ClientI coordinate3D.setAltitude(poi.coordinate.getAltitude()); poiDetails.setLocation(coordinate3D); searchResDetails.setDetails(poiDetails); + categories.clear(); categories.push_back(m_availableCategoryTable[poi.categoryIndex].id); //POI only owns to one category for the moment ! searchResDetails.setCategories(categories); |