summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author <philippe colliot>2015-06-16 17:53:58 +0200
committer <philippe colliot>2015-06-16 17:53:58 +0200
commit3918e22c468ff58cc239da310689f951a7d0ce57 (patch)
treed455f1fd1be0431f4d580f357f6340394482a18a /test
parentf297227b640e6ffb1f56c1a01bc4a8c20a4ace32 (diff)
downloadpoi-service-3918e22c468ff58cc239da310689f951a7d0ce57.tar.gz
poi-manager-server tested (with common api interface)
Diffstat (limited to 'test')
-rw-r--r--test/poi-service/.gitignore2
-rw-r--r--test/poi-service/CMakeLists.txt6
-rw-r--r--test/poi-service/poi-manager-client/CMakeLists.txt11
-rw-r--r--test/poi-service/poi-manager-client/main.cpp20
4 files changed, 31 insertions, 8 deletions
diff --git a/test/poi-service/.gitignore b/test/poi-service/.gitignore
index dbdac10..5af3146 100644
--- a/test/poi-service/.gitignore
+++ b/test/poi-service/.gitignore
@@ -12,3 +12,5 @@ Makefile
+
+
diff --git a/test/poi-service/CMakeLists.txt b/test/poi-service/CMakeLists.txt
index 05acffe..6579dfe 100644
--- a/test/poi-service/CMakeLists.txt
+++ b/test/poi-service/CMakeLists.txt
@@ -35,9 +35,11 @@ message(STATUS "WITH_DEBUG = ${WITH_DEBUG}")
set(API_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../api")
set(DBUS_GENERATED_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/dbus-include")
set(DBUS_GENERATED_INCLUDE_DIR_POSITIONING "${CMAKE_CURRENT_BINARY_DIR}/api") # this one is for positioning
+set(COMMON_API_GENERATED_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../api/franca/navigation/src-gen")
set(POI_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../src")
set(COMMON_DIR "${CMAKE_CURRENT_SOURCE_DIR}/poi-common")
set(COMMON_DIR_POI_SERVER "${POI_SRC_DIR}/poi-service/poi-common")
+set(DBUS_LIB_PATH "/usr/local/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
@@ -56,3 +58,7 @@ add_subdirectory(poi-supplier)
add_subdirectory(poi-client)
add_subdirectory(poi-contentaccess-module)
+
+if (WITH_FRANCA_INTERFACE)
+ add_subdirectory(poi-manager-client)
+endif()
diff --git a/test/poi-service/poi-manager-client/CMakeLists.txt b/test/poi-service/poi-manager-client/CMakeLists.txt
index 3e1803c..b7fc9b5 100644
--- a/test/poi-service/poi-manager-client/CMakeLists.txt
+++ b/test/poi-service/poi-manager-client/CMakeLists.txt
@@ -41,19 +41,16 @@ pkg_check_modules(GLIBMM glibmm-2.4)
# Source Files
set(PRJ_SRC_PATH .)
-set(PRJ_COMMON_SRC_PATH ../../../src/poi-service/poi-common)
-set(PRJ_SRC_GEN_PATH ${COMMON_API_PATH_GENERATED_FILES}/org/genivi)
-FILE(GLOB PRJ_LOCAL_SRCS ${PRJ_SRC_PATH}/*.cpp)
-FILE(GLOB PRJ_COMMON_SRCS ${PRJ_COMMON_SRC_PATH}/*.cpp)
+set(PRJ_SRC_GEN_PATH ${COMMON_API_GENERATED_INCLUDE_DIR}/org/genivi)
+FILE(GLOB PRJ_LOCAL_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
FILE(GLOB PRJ_STUB_GEN_SRCS ${PRJ_SRC_GEN_PATH}/${ROOT_API}/${PARENT_API}/*Stub*.cpp)
FILE(GLOB PRJ_STUB_GEN_TYPES ${PRJ_SRC_GEN_PATH}/${ROOT_API}/${PARENT_API}/*Types*.cpp ${PRJ_SRC_GEN_PATH}/${ROOT_API}/*Types*.cpp)
FILE(GLOB PRJ_STUB_IMPL_SRCS ${PRJ_SRC_PATH}/*stub*.cpp)
-set(PRJ_SRCS ${PRJ_LOCAL_SRCS} ${PRJ_COMMON_SRCS} ${PRJ_STUB_GEN_SRCS} ${PRJ_STUB_GEN_TYPES} ${PRJ_STUB_IMPL_SRCS})
+set(PRJ_SRCS ${PRJ_LOCAL_SRCS} ${PRJ_STUB_GEN_SRCS} ${PRJ_STUB_GEN_TYPES} ${PRJ_STUB_IMPL_SRCS})
include_directories(
${PRJ_SRC_PATH}
- ${PRJ_COMMON_SRC_PATH}
- ${COMMON_API_PATH_GENERATED_FILES}
+ ${COMMON_API_GENERATED_INCLUDE_DIR}
${DBUS_INCLUDE_DIRS}
${COMMONAPI_INCLUDEDIR}/${COMMON_API_VERSION}
${COMMONAPI_DBUS_INCLUDEDIR}
diff --git a/test/poi-service/poi-manager-client/main.cpp b/test/poi-service/poi-manager-client/main.cpp
index 12d07d7..19ffb69 100644
--- a/test/poi-service/poi-manager-client/main.cpp
+++ b/test/poi-service/poi-manager-client/main.cpp
@@ -27,11 +27,29 @@
#include <iostream>
#include <thread>
#include <CommonAPI/CommonAPI.h> //Defined in the Common API Runtime library
+#include "org/genivi/navigation/poiservice/POIContentManagerProxy.h"
+using namespace org::genivi::navigation::poiservice;
int main()
{
- std::cout << "Hello World!" << std::endl;
+ // Common API data init
+ std::shared_ptr<CommonAPI::Runtime> runtime = CommonAPI::Runtime::load();
+ std::shared_ptr<CommonAPI::Factory> factory = runtime->createFactory();
+
+ const std::string& serviceAddress = "local:org.genivi.poiservice.POIContentManager:org.genivi.poiservice.POIContentManager";
+ std::shared_ptr<POIContentManagerProxyDefault> myProxy = factory->buildProxy<POIContentManagerProxy>(serviceAddress);
+
+
+ while (!myProxy->isAvailable()) {
+ usleep(10);
+ }
+
+
+ while (true) {
+ std::this_thread::sleep_for(std::chrono::seconds(5));
+ }
+
return 0;
}