[my-place] Submodules dynamic loading bug fix (utils static library). 16/94016/1
authorMarcin Masternak <m.masternak@samsung.com>
Wed, 26 Oct 2016 17:13:53 +0000 (19:13 +0200)
committerMarcin Masternak <m.masternak@samsung.com>
Wed, 26 Oct 2016 17:13:53 +0000 (19:13 +0200)
Change-Id: I872e137d3f44c4093ee0a0cecb0448e636601f79
Signed-off-by: Marcin Masternak <m.masternak@samsung.com>
25 files changed:
src/my-place/CMakeLists.txt
src/my-place/facade/UserPlaces.h
src/my-place/place/CMakeLists.txt
src/my-place/place/PlaceCateger.cpp
src/my-place/place/PlaceCateger.h
src/my-place/place/PlacesDetector.cpp
src/my-place/place/PlacesDetector.h
src/my-place/utils/CMakeLists.txt [new file with mode: 0644]
src/my-place/utils/Gmap.h
src/my-place/utils/Median.h
src/my-place/utils/Similarity.h
src/my-place/utils/UserPlacesParams.h [moved from src/my-place/facade/UserPlacesParams.h with 100% similarity]
src/my-place/utils/UserPlacesTypes.cpp [moved from src/my-place/facade/UserPlacesTypes.cpp with 99% similarity]
src/my-place/utils/UserPlacesTypes.h [moved from src/my-place/facade/UserPlacesTypes.h with 100% similarity]
src/my-place/visit-categer/CMakeLists.txt
src/my-place/visit-categer/Mahal.h
src/my-place/visit-categer/PiecewiseLin.h
src/my-place/visit-categer/VisitCateger.h
src/my-place/visit-detector/LocationListenerIface.h
src/my-place/visit-detector/LocationLogger.cpp
src/my-place/visit-detector/VisitDetector.cpp
src/my-place/visit-detector/VisitDetector.h
src/my-place/visit-detector/WifiListenerIface.h
src/my-place/visit-detector/WifiLogger.cpp
src/my-place/visit-detector/WifiLogger.h

index 7ea03ee..cc19619 100644 (file)
@@ -1,4 +1,7 @@
 SET(target "${target_prefix}-my-place")
+SET(target_myplace_utils_static "${target}-utils_static")
+
+INCLUDE_DIRECTORIES(utils)
 
 SET(DEPS ${DEPS}
        gmodule-2.0
@@ -6,7 +9,7 @@ SET(DEPS ${DEPS}
        capi-network-wifi
 )
 
-FILE(GLOB SRCS *.cpp facade/*.cpp utils/*.cpp visit-detector/*.cpp)
+FILE(GLOB SRCS *.cpp facade/*.cpp visit-detector/*.cpp)
 
 INCLUDE(FindPkgConfig)
 PKG_CHECK_MODULES(PKG_MYPLACE REQUIRED ${DEPS})
@@ -16,9 +19,10 @@ FOREACH(flag ${PKG_MYPLACE_CFLAGS})
 ENDFOREACH(flag)
 
 ADD_LIBRARY(${target} SHARED ${SRCS})
-TARGET_LINK_LIBRARIES(${target} ${PKG_MYPLACE_LDFLAGS} ${target_shared})
+TARGET_LINK_LIBRARIES(${target} ${PKG_MYPLACE_LDFLAGS} ${target_shared} ${target_myplace_utils_static})
 
 INSTALL(TARGETS ${target} DESTINATION ${CMAKE_INSTALL_LIBDIR}/${target_dir})
 
+ADD_SUBDIRECTORY(utils)
 ADD_SUBDIRECTORY(place)
 ADD_SUBDIRECTORY(visit-categer)
\ No newline at end of file
index 31bac72..bc552cc 100644 (file)
@@ -24,8 +24,7 @@
 #include <TimerManager.h>
 #include <ITimerListener.h>
 #include "../visit-detector/VisitDetector.h"
-#include "../place/PlacesDetector.h"
-#include "UserPlacesTypes.h"
+#include <UserPlacesTypes.h>
 
 namespace ctx {
 
index fc2c120..7ac705f 100644 (file)
@@ -1,7 +1,10 @@
 SET(target "${target_prefix}-my-place-places-detector")
 
+INCLUDE_DIRECTORIES(../utils)
+
 FILE(GLOB SRCS *.cpp)
 
 ADD_LIBRARY(${target} SHARED ${SRCS})
+TARGET_LINK_LIBRARIES(${target} ${target_myplace_utils_static})
 
 INSTALL(TARGETS ${target} DESTINATION ${CMAKE_INSTALL_LIBDIR}/${target_dir})
\ No newline at end of file
index 1b956a8..603e857 100644 (file)
@@ -15,9 +15,9 @@
  */
 
 #include "PlaceCateger.h"
-#include "../utils/Median.h"
-#include "../facade/UserPlacesParams.h"
-#include "../facade/UserPlacesTypes.h"
+#include <Median.h>
+#include <UserPlacesParams.h>
+#include <UserPlacesTypes.h>
 #include <algorithm>
 #include <Types.h>
 
index 44927b3..dd6943f 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef _CONTEXT_PLACE_RECOGNITION_PLACE_CATEGER_
 #define _CONTEXT_PLACE_RECOGNITION_PLACE_CATEGER_
 
-#include "../facade/UserPlacesTypes.h"
+#include <UserPlacesTypes.h>
 #include <utility>
 #include <vector>
 #include <string>
index e66c5ee..115a44b 100644 (file)
 #include <sstream>
 #include <Types.h>
 #include <Json.h>
-#include "../utils/Similarity.h"
+#include <Similarity.h>
 #include "PlacesDetector.h"
 #include "PlaceCateger.h"
-#include "../utils/Median.h"
+#include <Median.h>
 #ifdef TIZEN_ENGINEER_MODE
-#include "../utils/Gmap.h"
+#include <Gmap.h>
 #endif /* TIZEN_ENGINEER_MODE */
-#include "../facade/UserPlacesTypes.h"
+#include <UserPlacesTypes.h>
 #include <fstream>
 #include <algorithm>
-#include "../facade/UserPlacesParams.h"
-#include "../utils/DebugUtils.h"
+#include <UserPlacesParams.h>
+#include <DebugUtils.h>
 #include <DatabaseManager.h>
 
 #define __DELETE_PLACES_QUERY "DELETE FROM " PLACE_TABLE
@@ -89,7 +89,7 @@ double ctx::PlacesDetector::__doubleValueFromJson(Json &row, const char* key)
 {
        double value;
        row.get(NULL, key, &value);
-       _D("__doubleValueFromJson, key:%s, value: %lf", key, value);
+       _D("key: %s, value: %lf", key, value);
        return value;
 }
 
index d9c47cb..81c6a44 100644 (file)
@@ -20,7 +20,7 @@
 #include <vector>
 #include <cstdint>
 #include <ITimerListener.h>
-#include "../facade/UserPlacesTypes.h"
+#include <UserPlacesTypes.h>
 #include <MyPlaceTypes.h>
 #include "Graph.h"
 
diff --git a/src/my-place/utils/CMakeLists.txt b/src/my-place/utils/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2ecc5e4
--- /dev/null
@@ -0,0 +1,5 @@
+SET(target ${target_myplace_utils_static})
+
+FILE(GLOB SRCS *.cpp)
+
+ADD_LIBRARY(${target} STATIC ${SRCS})
\ No newline at end of file
index 891b851..c6a5482 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef _CONTEXT_PLACE_RECOGNITION_GMAP_H_
 #define _CONTEXT_PLACE_RECOGNITION_GMAP_H_
 
-#include "../facade/UserPlacesTypes.h"
+#include "UserPlacesTypes.h"
 
 #define GMAP_FILE "/tmp/user_places_map.html"
 
index b33e7b2..275fa13 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef _CONTEXT_PLACE_RECOGNITION_MEDIAN_
 #define _CONTEXT_PLACE_RECOGNITION_MEDIAN_
 
-#include "../facade/UserPlacesTypes.h"
+#include "UserPlacesTypes.h"
 #include <vector>
 
 namespace ctx {
index e006164..f78b675 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef _CONTEXT_PLACE_RECOGNITION_SIMILAR_H_
 #define _CONTEXT_PLACE_RECOGNITION_SIMILAR_H_
 
-#include "../facade/UserPlacesTypes.h"
+#include "UserPlacesTypes.h"
 
 namespace ctx {
 
similarity index 99%
rename from src/my-place/facade/UserPlacesTypes.cpp
rename to src/my-place/utils/UserPlacesTypes.cpp
index bf00798..c5ed30c 100644 (file)
@@ -22,7 +22,7 @@
 #include <Types.h>
 #include "UserPlacesTypes.h"
 #include "UserPlacesParams.h"
-#include "../utils/DebugUtils.h"
+#include "DebugUtils.h"
 
 #define __MAC_STRING_COMPONENTS_SEPARATOR ':'
 #define __MAC_SET_STRING_DELIMITER ','
index 93fb055..f127d61 100644 (file)
@@ -1,7 +1,10 @@
 SET(target "${target_prefix}-my-place-visit-categer")
 
+INCLUDE_DIRECTORIES(../utils)
+
 FILE(GLOB SRCS *.cpp)
 
 ADD_LIBRARY(${target} SHARED ${SRCS})
+TARGET_LINK_LIBRARIES(${target} ${target_myplace_utils_static})
 
 INSTALL(TARGETS ${target} DESTINATION ${CMAKE_INSTALL_LIBDIR}/${target_dir})
\ No newline at end of file
index 54ec7f3..26e6235 100644 (file)
@@ -18,7 +18,7 @@
 #define _CONTEXT_PLACE_RECOGNITION_MAHAL_H_
 
 #include <vector>
-#include "../facade/UserPlacesTypes.h"
+#include <UserPlacesTypes.h>
 
 namespace ctx {
 
index a0e92d7..4ff497b 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef _CONTEXT_PLACE_RECOGNITION_PIECEWISE_LIN_
 #define _CONTEXT_PLACE_RECOGNITION_PIECEWISE_LIN_
 
-#include "../facade/UserPlacesTypes.h"
+#include <UserPlacesTypes.h>
 
 namespace ctx {
 
index f1c5456..3edfb93 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef _CONTEXT_PLACE_RECOGNITION_VISIT_CATEGER_H_
 #define _CONTEXT_PLACE_RECOGNITION_VISIT_CATEGER_H_
 
-#include "../facade/UserPlacesTypes.h"
+#include <UserPlacesTypes.h>
 #include "Mahal.h"
 #include "PiecewiseLin.h"
 #include <map>
index 46f2b3f..7d2aef2 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef _CONTEXT_PLACE_RECOGNITION_LOCATION_LISTENER_IFACE_H_
 #define _CONTEXT_PLACE_RECOGNITION_LOCATION_LISTENER_IFACE_H_
 
-#include "../facade/UserPlacesTypes.h"
+#include <UserPlacesTypes.h>
 
 namespace ctx {
 
index 4b95eed..372ee74 100644 (file)
@@ -18,9 +18,9 @@
 #include <Types.h>
 #include <Json.h>
 #include <DatabaseManager.h>
-#include "../facade/UserPlacesTypes.h"
-#include "../facade/UserPlacesParams.h"
-#include "../utils/DebugUtils.h"
+#include <UserPlacesTypes.h>
+#include <UserPlacesParams.h>
+#include <DebugUtils.h>
 #include "LocationLogger.h"
 
 #ifdef TIZEN_ENGINEER_MODE
index 0aa53c5..98460c2 100644 (file)
 #include <sstream>
 #include <Types.h>
 #include <Json.h>
-#include "../facade/UserPlacesTypes.h"
+#include <UserPlacesTypes.h>
 #include "VisitDetector.h"
-#include "../facade/UserPlacesParams.h"
-#include "../utils/Similarity.h"
-#include "../utils/Median.h"
-#include "../utils/DebugUtils.h"
+#include <UserPlacesParams.h>
+#include <Similarity.h>
+#include <Median.h>
+#include <DebugUtils.h>
 #include <gmodule.h>
 #include <DatabaseManager.h>
 
index 98bbda3..b476942 100644 (file)
@@ -22,7 +22,7 @@
 #include <map>
 #include <unordered_map>
 #include <unordered_set>
-#include "../facade/UserPlacesTypes.h"
+#include <UserPlacesTypes.h>
 #include <Json.h>
 #include "VisitListenerIface.h"
 #include "LocationLogger.h"
index 56307d0..84ef489 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef _CONTEXT_PLACE_RECOGNITION_WIFI_LISTENER_IFACE_H_
 #define _CONTEXT_PLACE_RECOGNITION_WIFI_LISTENER_IFACE_H_
 
-#include "../facade/UserPlacesTypes.h"
+#include <UserPlacesTypes.h>
 
 namespace ctx {
 
index 2baa24c..874f494 100644 (file)
@@ -17,8 +17,8 @@
 #include <sstream>
 #include <Types.h>
 #include <DatabaseManager.h>
-#include "../facade/UserPlacesTypes.h"
-#include "../utils/DebugUtils.h"
+#include <UserPlacesTypes.h>
+#include <DebugUtils.h>
 #include "WifiLogger.h"
 
 #define __WIFI_CREATE_TABLE_COLUMNS \
index 0134c2d..7c627a1 100644 (file)
@@ -24,7 +24,7 @@
 #include <TimerManager.h>
 #include "WifiListenerIface.h"
 #include "VisitListenerIface.h"
-#include "../facade/UserPlacesParams.h"
+#include <UserPlacesParams.h>
 
 /* Database usage flag */
 #define WIFI_LOGGER_DATABASE false